return "/openlayers/";
}
-function createMap(divName) {
+function createMap(divName, options) {
+ options = options || {};
+
map = new OpenLayers.Map(divName, {
- controls: [
+ controls: options.controls || [
new OpenLayers.Control.ArgParser(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.ScaleLine()
],
units: "m",
- maxResolution: 156543,
+ maxResolution: 156543.0339,
numZoomLevels: 20
});
for (var layers = map.getLayersBy("isBaseLayer", false), i = 0; i < layers.length; i++) {
var c = layerConfig.charAt(l++);
- layers[i].setVisibility(c == "T");
+ if (c == "T") {
+ layers[i].setVisibility(true);
+ } else if(c == "F") {
+ layers[i].setVisibility(false);
+ }
}
}