new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.ScaleLine({geodesic: true})
],
- units: "m",
- maxResolution: 156543.0339,
numZoomLevels: 20,
displayProjection: new OpenLayers.Projection("EPSG:4326"),
theme: "<%= asset_path 'theme/default/style.css' %>"
displayInLayerSwitcher: false,
numZoomLevels: 20,
maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
- maxResolution: 156543,
- units: "m",
projection: "EPSG:900913"
});
map.addLayer(markers);
}
function addObjectToMap(url, zoom, callback) {
- var layer = new OpenLayers.Layer.GML("Objects", url, {
- format: OpenLayers.Format.OSM,
+ var layer = new OpenLayers.Layer.Vector("Objects", {
+ strategies: [
+ new OpenLayers.Strategy.Fixed()
+ ],
+ protocol: new OpenLayers.Protocol.HTTP({
+ url: url,
+ format: new OpenLayers.Format.OSM()
+ }),
style: {
strokeColor: "blue",
strokeWidth: 3,
});
map.addLayer(layer);
-
- layer.loadGML();
}
function addBoxToMap(boxbounds, id, outline) {