stableversion-3.0
Last change
on this file since 92f109b was
307d09d,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agregaron las librerias
|
-
Propiedad mode establecida a
100644
|
File size:
1.0 KB
|
Línea | |
---|
1 | // API key for http://openlayers.org. Please get your own at |
---|
2 | // http://bingmapsportal.com/ and use that instead. |
---|
3 | var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf"; |
---|
4 | |
---|
5 | var map = new OpenLayers.Map( 'map'); |
---|
6 | |
---|
7 | var road = new OpenLayers.Layer.Bing({ |
---|
8 | key: apiKey, |
---|
9 | type: "Road", |
---|
10 | // custom metadata parameter to request the new map style - only useful |
---|
11 | // before May 1st, 2011 |
---|
12 | metadataParams: {mapVersion: "v1"} |
---|
13 | }); |
---|
14 | var aerial = new OpenLayers.Layer.Bing({ |
---|
15 | key: apiKey, |
---|
16 | type: "Aerial" |
---|
17 | }); |
---|
18 | var hybrid = new OpenLayers.Layer.Bing({ |
---|
19 | key: apiKey, |
---|
20 | type: "AerialWithLabels", |
---|
21 | name: "Bing Aerial With Labels" |
---|
22 | }); |
---|
23 | |
---|
24 | map.addLayers([road, aerial, hybrid]); |
---|
25 | map.addControl(new OpenLayers.Control.LayerSwitcher()); |
---|
26 | // Zoom level numbering depends on metadata from Bing, which is not yet loaded. |
---|
27 | var zoom = map.getZoomForResolution(76.43702827453613); |
---|
28 | map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform( |
---|
29 | new OpenLayers.Projection("EPSG:4326"), |
---|
30 | map.getProjectionObject() |
---|
31 | ), zoom); |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.