Use strings rather than ol.projection.get in examples

This commit is contained in:
Tom Payne
2013-03-06 18:53:59 +01:00
parent eaa17758bd
commit 874583656e
3 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ var layers = [
}), }),
new ol.layer.TileLayer({ new ol.layer.TileLayer({
source: new ol.source.DebugTileSource({ source: new ol.source.DebugTileSource({
projection: ol.projection.get('EPSG:3857'), projection: 'EPSG:3857',
tileGrid: new ol.tilegrid.XYZ({ tileGrid: new ol.tilegrid.XYZ({
maxZoom: 22 maxZoom: 22
}) })

View File

@@ -35,7 +35,7 @@ var map = new ol.Map({
renderers: [ol.RendererHint.CANVAS, ol.RendererHint.DOM], renderers: [ol.RendererHint.CANVAS, ol.RendererHint.DOM],
target: 'map', target: 'map',
view: new ol.View2D({ view: new ol.View2D({
projection: ol.projection.get('EPSG:4326'), projection: 'EPSG:4326',
center: new ol.Coordinate(0, 0), center: new ol.Coordinate(0, 0),
zoom: 2 zoom: 2
}) })

View File

@@ -13,7 +13,7 @@ var map = new ol.Map({
controls: ol.control.defaults({}, [ controls: ol.control.defaults({}, [
new ol.control.MousePosition({ new ol.control.MousePosition({
coordinateFormat: ol.Coordinate.toStringHDMS, coordinateFormat: ol.Coordinate.toStringHDMS,
projection: ol.projection.getFromCode('EPSG:4326'), projection: 'EPSG:4326',
target: document.getElementById('mouse-position'), target: document.getElementById('mouse-position'),
undefinedHTML: ' ' undefinedHTML: ' '
}) })