- var mapnik = new OpenLayers.Layer.TMS("Mapnik",
- "http://tile.openstreetmap.org/",
- { type: 'png', getURL: getTileURL, displayOutsideMaxExtent: true });
+function createMap(divName) {
+ map = new OpenLayers.Map(divName, {
+ controls: [
+ new OpenLayers.Control.ArgParser(),
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.LayerSwitcher(),
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.PanZoomBar(),
+ new OpenLayers.Control.ScaleLine()
+ ],
+ units: "m"
+ });
+
+ var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
+ displayOutsideMaxExtent: true,
+ wrapDateLine: true
+ });