page.replace_html :sidebar_content, :partial => 'start'
page << <<EOJ
var browseBoxControl;
- var browseActive;
var browseMode = "auto";
var browseBounds;
var browseFeatureList;
OpenLayers.Feature.Vector.style['default'].cursor = "pointer";
function startBrowse() {
- browseActive = true;
+ map.dataLayer.active = true;
openSidebar({ onclose: stopBrowse });
}
function stopBrowse() {
- if (browseActive) {
- browseActive = false;
+ if (map.dataLayer.active) {
+ map.dataLayer.active = false;
if (browseSelectControl) {
browseSelectControl.destroy();
}
function customDataLoader(request) {
- if (browseActive) {
+ if (this.map.dataLayer.active) {
var doc = request.responseXML;
if (!doc || !doc.documentElement) {
}
function dataLoaded() {
- if (browseActive) {
+ if (this.map.dataLayer.active) {
clearStatus();
-
+
browseObjectList = document.createElement("div")
var heading = document.createElement("p");