Move extractStyles option to ol.format.KML

This commit is contained in:
Frederic Junod
2015-04-16 09:05:04 +02:00
parent 646a7bb96e
commit a81f414065
3 changed files with 9 additions and 6 deletions

View File

@@ -124,9 +124,10 @@ var vector = new ol.layer.Vector({
source: new ol.source.Cluster({ source: new ol.source.Cluster({
distance: 40, distance: 40,
source: new ol.source.Vector({ source: new ol.source.Vector({
extractStyles: false,
url: 'data/kml/2012_Earthquakes_Mag5.kml', url: 'data/kml/2012_Earthquakes_Mag5.kml',
format: new ol.format.KML() format: new ol.format.KML({
extractStyles: false
})
}) })
}), }),
style: styleFunction style: styleFunction

View File

@@ -40,9 +40,10 @@ var styleFunction = function(feature, resolution) {
var vector = new ol.layer.Vector({ var vector = new ol.layer.Vector({
source: new ol.source.Vector({ source: new ol.source.Vector({
extractStyles: false,
url: 'data/kml/2012_Earthquakes_Mag5.kml', url: 'data/kml/2012_Earthquakes_Mag5.kml',
format: new ol.format.KML() format: new ol.format.KML({
extractStyles: false
})
}), }),
style: styleFunction style: styleFunction
}); });

View File

@@ -47,9 +47,10 @@ var styleFunction = function(feature, resolution) {
var vector = new ol.layer.Vector({ var vector = new ol.layer.Vector({
source: new ol.source.Vector({ source: new ol.source.Vector({
extractStyles: false,
url: 'data/kml/timezones.kml', url: 'data/kml/timezones.kml',
format: new ol.format.KML() format: new ol.format.KML({
extractStyles: false
})
}), }),
style: styleFunction style: styleFunction
}); });