map.events.unregister("moveend", map, showData);
}
}
-
+
function startDrag() {
$("browse_select_box").innerHTML='Drag a box on the map to select an area';
};
$("browse_select_box").onclick = startDrag;
-
+
function useMap() {
var bounds = map.getExtent();
var projected = bounds.clone().transform(map.getProjectionObject(), epsg4326);
}
$("browse_select_view").onclick = useMap;
-
+
function endDrag(bbox) {
var bounds = bbox.getBounds();
var projected = bounds.clone().transform(map.getProjectionObject(), epsg4326);
$("browse_select_box").innerHTML = "Manually select a different area";
$("browse_select_view").style.display = "inline";
}
-
+
function displayFeatureWarning() {
clearStatus();
$("browse_content").innerHTML = "";
$("browse_content").appendChild(div);
}
-
+
function loadFeatureList() {
browseDataLayer.addFeatures(browseFeatureList);
browseDataLayer.events.triggerEvent("loadend");
if (size > 0.25) {
setStatus("Unable to load: Bounding box size of " + size + " is too large (must be smaller than 0.25)");
} else {
- loadGML("/api/0.5/map?bbox=" + projected.toBBOX());
+ loadGML("/api/#{API_VERSION}/map?bbox=" + projected.toBBOX());
}
}
requestSuccess: customDataLoader,
displayInLayerSwitcher: false,
styleMap: new OpenLayers.StyleMap({
- default: style,
- select: { strokeColor: '#0000ff', strokeWidth: 8 }
+ 'default': style,
+ 'select': { strokeColor: '#0000ff', strokeWidth: 8 }
})
});
browseDataLayer.events.register("loadend", browseDataLayer, dataLoaded );
this.link.href = "";
this.link.innerHTML = "Wait...";
- new Ajax.Request("/api/0.5/" + this.type + "/" + this.feature.osm_id + "/history", {
+ new Ajax.Request("/api/#{API_VERSION}/" + this.type + "/" + this.feature.osm_id + "/history", {
onComplete: OpenLayers.Function.bind(displayHistory, this)
});