OpenLayers.Feature.Vector.style['default'].cursor = "pointer";
function startBrowse() {
+ browseActive = true;
+
openSidebar({ onclose: stopBrowse });
var vectors = new OpenLayers.Layer.Vector();
map.events.register("moveend", map, showData);
map.events.triggerEvent("moveend");
-
- browseActive = true;
}
function showData() {
return false;
}
- function customDataLoader(request) {
+ function customDataLoader(request) {
if (browseActive) {
var doc = request.responseXML;
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());
}
}
map.addLayer(browseDataLayer);
browseSelectControl = new OpenLayers.Control.SelectFeature(browseDataLayer, { onSelect: onFeatureSelect });
- browseSelectControl.handler.stopDown = false;
- browseSelectControl.handler.stopUp = false;
+ browseSelectControl.handlers.feature.stopDown = false;
+ browseSelectControl.handlers.feature.stopUp = false;
map.addControl(browseSelectControl);
browseSelectControl.activate();
} else {
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)
});