+function createMap(divName, options) {
+ options = options || {};
+
+ map = new OpenLayers.Map(divName, {
+ controls: options.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",
+ maxResolution: 156543.0339,
+ numZoomLevels: 20
+ });
+
+ var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
+ displayOutsideMaxExtent: true,
+ wrapDateLine: true
+ });