use OSM as base layer
This commit is contained in:
@@ -22,18 +22,23 @@
|
||||
var map;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map');
|
||||
var options = {
|
||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
||||
units: "m",
|
||||
maxResolution: 156543.0339,
|
||||
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508)
|
||||
};
|
||||
map = new OpenLayers.Map('map', options);
|
||||
|
||||
var gmap = new OpenLayers.Layer.Google(
|
||||
"Google Streets",
|
||||
{sphericalMercator: true}
|
||||
var osm = new OpenLayers.Layer.OSM(
|
||||
"OSM", null, {wrapDateLine: true}
|
||||
);
|
||||
var vector = new OpenLayers.Layer.Vector("Editable Vectors");
|
||||
|
||||
map.addLayers([gmap, vector]);
|
||||
map.addLayers([osm, vector]);
|
||||
map.addControl(new OpenLayers.Control.EditingToolbar(vector));
|
||||
|
||||
var extent = new OpenLayers.Bounds(-24225034.496992, -11368938.517442, -14206280.326992, -1350184.3474418);
|
||||
var extent = new OpenLayers.Bounds(15849982.183008, -11368938.517442, -14206280.326992, -1350184.3474418);
|
||||
map.zoomToExtent(extent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user