Created
August 22, 2012 15:03
-
-
Save Isxida/3426490 to your computer and use it in GitHub Desktop.
Mapa ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map; | |
function init() { | |
//creo el pinche mapa.... | |
map = new OpenLayers.Map({ | |
div: "map", | |
allOverlays: true | |
}); | |
//Agrego las capas una es OSM y el otro es de Google | |
var osm = new OpenLayers.Layer.OSM(); | |
var gmap = new OpenLayers.Layer.Google("Google Streets", {visibility: false}); | |
// Luego acomodo las capas en orden ("osm" primero, "gmap" segundo) | |
map.addLayers([osm, gmap]); | |
//Añadir el control para que cambien entre capas | |
map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
//Añadir Zoom | |
map.zoomToMaxExtent(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment