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() {
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");
return false;
}
- function customDataLoader(request) {
+ function customDataLoader(request) {
if (browseActive) {
var doc = request.responseXML;
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 );
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 {