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() {
if (browseActive) {
browseActive = false;
- if (browseDataLayer) {
- browseDataLayer.destroy();
- browseDataLayer = null;
- }
-
if (browseSelectControl) {
browseSelectControl.destroy();
browseSelectControl = null;
browseActiveFeature = null;
}
+ if (browseDataLayer) {
+ browseDataLayer.destroy();
+ browseDataLayer = null;
+ }
+
map.dataLayer.setVisibility(false);
map.events.unregister("moveend", map, showData);
}
return false;
}
- function customDataLoader(request) {
+ function customDataLoader(request) {
if (browseActive) {
var doc = request.responseXML;
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 {