OpenStreetMap reprojection example
This commit is contained in:
committed by
Petr Sloup
parent
76974a5888
commit
043b206705
13
examples/reprojection-wgs84.html
Normal file
13
examples/reprojection-wgs84.html
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
template: example.html
|
||||
title: OpenStreetMap reprojection example
|
||||
shortdesc: Demonstrates client-side reprojection of OpenStreetMap in WGS84.
|
||||
docs: >
|
||||
This example shows client-side reprojection of OpenStreetMap in WGS84.
|
||||
tags: "reprojection, projection, openstreetmap, wgs84, tile"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
19
examples/reprojection-wgs84.js
Normal file
19
examples/reprojection-wgs84.js
Normal file
@@ -0,0 +1,19 @@
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.source.OSM');
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.OSM()
|
||||
})
|
||||
],
|
||||
renderer: common.getRendererFromQueryString(),
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
projection: 'EPSG:4326',
|
||||
center: [0, 0],
|
||||
zoom: 1
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user