markers = new OpenLayers.Layer.Markers("Markers", {
displayInLayerSwitcher: false,
numZoomLevels: 20,
- maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
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) {