Merge pull request #1640 from tschaub/reproject
Use projection option instead of reprojectTo for vector file sources. The projection of the vector source represents the projection of the cached features.
This commit is contained in:
@@ -46,7 +46,7 @@ var style = {
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.GPX({
|
||||
reprojectTo: 'EPSG:3857',
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/gpx/fells_loop.gpx'
|
||||
}),
|
||||
styleFunction: function(feature, resolution) {
|
||||
|
||||
@@ -40,7 +40,7 @@ var styleFunction = function(feature, resolution) {
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.KML({
|
||||
reprojectTo: 'EPSG:3857',
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/kml/2012_Earthquakes_Mag5.kml'
|
||||
}),
|
||||
styleFunction: styleFunction
|
||||
|
||||
@@ -15,7 +15,7 @@ var raster = new ol.layer.Tile({
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.KML({
|
||||
reprojectTo: 'EPSG:3857',
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/kml/2012-02-10.kml'
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user