source: ether_iasi/trunk/web/resources/js/OpenLayers-2.12/examples/bing-tiles-restrictedzoom.js @ 738

Last change on this file since 738 was 738, checked in by vmipsl, 11 years ago

OpenLayers?

File size: 1.0 KB
Line 
1// API key for http://openlayers.org. Please get your own at
2// http://bingmapsportal.com/ and use that instead.
3var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
4
5var map = new OpenLayers.Map('map', {
6    controls: [
7        new OpenLayers.Control.Attribution(),
8        new OpenLayers.Control.Navigation(),
9        new OpenLayers.Control.PanZoomBar(),
10        new OpenLayers.Control.LayerSwitcher()
11    ]
12});
13
14var road3 = new OpenLayers.Layer.Bing({
15    name: "Road tiles with 3 zoom levels",
16    type: "Road",
17    key: apiKey,
18    maxResolution: 76.43702827453613,
19    numZoomLevels: 3
20});
21var road5 = new OpenLayers.Layer.Bing({
22    name: "Road tiles with 5 zoom levels",
23    type: "Road",
24    key: apiKey,
25    numZoomLevels: 5
26});
27var road = new OpenLayers.Layer.Bing({
28    name: "Road tiles with all zoom levels",
29    type: "Road",
30    key: apiKey
31});
32
33map.addLayers([road3, road5, road]);
34map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform(
35    new OpenLayers.Projection("EPSG:4326"),
36    map.getProjectionObject()
37), 1);
Note: See TracBrowser for help on using the repository browser.