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:
Tim Schaub
2014-02-04 17:07:59 -08:00
9 changed files with 28 additions and 31 deletions

View File

@@ -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) {

View File

@@ -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

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