Example geojson uses ol.style.Circle
This commit is contained in:
+13
-6
@@ -4,16 +4,19 @@ goog.require('ol.RendererHint');
|
|||||||
goog.require('ol.View2D');
|
goog.require('ol.View2D');
|
||||||
goog.require('ol.layer.Tile');
|
goog.require('ol.layer.Tile');
|
||||||
goog.require('ol.layer.Vector');
|
goog.require('ol.layer.Vector');
|
||||||
goog.require('ol.shape');
|
|
||||||
goog.require('ol.source.GeoJSON');
|
goog.require('ol.source.GeoJSON');
|
||||||
goog.require('ol.source.OSM');
|
goog.require('ol.source.OSM');
|
||||||
|
goog.require('ol.style.Circle');
|
||||||
goog.require('ol.style.Fill');
|
goog.require('ol.style.Fill');
|
||||||
goog.require('ol.style.Stroke');
|
goog.require('ol.style.Stroke');
|
||||||
goog.require('ol.style.Style');
|
goog.require('ol.style.Style');
|
||||||
|
|
||||||
|
|
||||||
var image = ol.shape.renderCircle(5, null,
|
var image = new ol.style.Circle({
|
||||||
new ol.style.Stroke({color: 'red', width: 1}));
|
radius: 5,
|
||||||
|
fill: null,
|
||||||
|
stroke: new ol.style.Stroke({color: 'red', width: 1})
|
||||||
|
});
|
||||||
|
|
||||||
var styles = {
|
var styles = {
|
||||||
'Point': [new ol.style.Style({
|
'Point': [new ol.style.Style({
|
||||||
@@ -61,9 +64,13 @@ var styles = {
|
|||||||
fill: new ol.style.Fill({
|
fill: new ol.style.Fill({
|
||||||
color: 'magenta'
|
color: 'magenta'
|
||||||
}),
|
}),
|
||||||
image: ol.shape.renderCircle(10, null, new ol.style.Stroke({
|
image: new ol.style.Circle({
|
||||||
color: 'magenta'
|
radius: 10,
|
||||||
}))
|
fill: null,
|
||||||
|
stroke: new ol.style.Stroke({
|
||||||
|
color: 'magenta'
|
||||||
|
})
|
||||||
|
})
|
||||||
})]
|
})]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user