Use strings rather than ol.projection.get in examples
This commit is contained in:
@@ -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
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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: ' '
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user