diff options
author | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
commit | ea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch) | |
tree | af67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/examples/bing-tiles-restrictedzoom.js | |
parent | 59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff) | |
download | postrunner-ea346a785dc1b3f7c156f6fc33da634e1f1a627b.zip |
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/examples/bing-tiles-restrictedzoom.js')
-rw-r--r-- | misc/openlayers/examples/bing-tiles-restrictedzoom.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/misc/openlayers/examples/bing-tiles-restrictedzoom.js b/misc/openlayers/examples/bing-tiles-restrictedzoom.js new file mode 100644 index 0000000..45c226f --- /dev/null +++ b/misc/openlayers/examples/bing-tiles-restrictedzoom.js @@ -0,0 +1,37 @@ +// API key for http://openlayers.org. Please get your own at +// http://bingmapsportal.com/ and use that instead. +var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf"; + +var map = new OpenLayers.Map('map', { + controls: [ + new OpenLayers.Control.Attribution(), + new OpenLayers.Control.Navigation(), + new OpenLayers.Control.PanZoomBar(), + new OpenLayers.Control.LayerSwitcher() + ] +}); + +var road3 = new OpenLayers.Layer.Bing({ + name: "Road tiles with 3 zoom levels", + type: "Road", + key: apiKey, + maxResolution: 76.43702827453613, + numZoomLevels: 3 +}); +var road5 = new OpenLayers.Layer.Bing({ + name: "Road tiles with 5 zoom levels", + type: "Road", + key: apiKey, + numZoomLevels: 5 +}); +var road = new OpenLayers.Layer.Bing({ + name: "Road tiles with all zoom levels", + type: "Road", + key: apiKey +}); + +map.addLayers([road3, road5, road]); +map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() +), 1); |