Use projection option instead of reprojectTo
The projection option for vector file sources currently has no good meaning. The reprojectTo option is used to set the projection for cached features. This change makes it so the projection option is used for this purpose. The getProjection method (not currently exported) can then be used to get the cached feature projection. This also removes the default of 'EPSG:3857' for vector file sources. If a projection is not configured, features will not be transformed.
This commit is contained in:
@@ -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