+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,
+ displayProjection: new OpenLayers.Projection("EPSG:4326")
+ });
+
+ var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
+ displayOutsideMaxExtent: true,
+ wrapDateLine: true
+ });