var Top =20037508.34; var Bottom = -20037508.34; var Right = 20037508.34; var Left = -20037508.34; extent = new OpenLayers.Bounds(Left, Bottom, Right, Top); var options = { projection: "EPSG:900913", minResolution: "auto", maxResolution: "auto", maxExtent: new OpenLayers.Bounds(Left, Bottom, Right, Top), restrictedExtent: new OpenLayers.Bounds(Left, Bottom, Right, Top),//.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")), controls: [ new OpenLayers.Control.Attribution(), new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher() ] }; map = new OpenLayers.Map('divMap',options);//, options map.addControl(new OpenLayers.Control.LayerSwitcher()); var apiKey = "ApH0iiSTo5x4noXsrRzSAuwUsj5cqcvx_pquBecrT3htmE7pJ7kMTs4mOWGwlVkI"; var road = new OpenLayers.Layer.Bing({ name: "Road", key: apiKey, type: "Road" }); var hybrid = new OpenLayers.Layer.Bing({ name: "Hybrid", key: apiKey, type: "AerialWithLabels" }); var aerial = new OpenLayers.Layer.Bing({ name: "Aerial", key: apiKey, type: "Aerial" }); layer = new OpenLayers.Layer.GML("GeoJSON", "geo.json", { projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GeoJSON });