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:
Tim Schaub
2014-02-03 18:10:52 -07:00
parent b567b888b0
commit d2cd0808a8
9 changed files with 28 additions and 31 deletions

View File

@@ -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'
})
});