|
@@ -442,14 +442,15 @@ OpenLayers.ProxyHost = "index-ajax.php?_zasobID=<?php echo $this->_zasobID; ?>&_
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
priv.showPopup = function(feature) {
|
|
priv.showPopup = function(feature) {
|
|
|
- console.log('showPopup() ... ');
|
|
|
|
|
|
|
+ if (priv.options.debug) console.log('showPopup() ... ');
|
|
|
if (!feature) return;
|
|
if (!feature) return;
|
|
|
- var popupContent = "<div style='font-size:.8em'>Feature: " + feature.id +"<br>Area: " + feature.geometry.getArea()+"</div>";
|
|
|
|
|
|
|
+ var popupContent = '';
|
|
|
if (feature.attributes._newRecordId > 0) {
|
|
if (feature.attributes._newRecordId > 0) {
|
|
|
popupContent = 'Rekord: ' + feature.attributes._newRecordId;
|
|
popupContent = 'Rekord: ' + feature.attributes._newRecordId;
|
|
|
} else if (feature.attributes.recordId > 0) {
|
|
} else if (feature.attributes.recordId > 0) {
|
|
|
popupContent = 'Rekord: ' + feature.attributes.recordId;
|
|
popupContent = 'Rekord: ' + feature.attributes.recordId;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!popupContent) return;
|
|
|
popupContent = '<div style="font-size:.8em">' + popupContent + '</div>';
|
|
popupContent = '<div style="font-size:.8em">' + popupContent + '</div>';
|
|
|
var popup = new OpenLayers.Popup("popups",
|
|
var popup = new OpenLayers.Popup("popups",
|
|
|
feature.geometry.getBounds().getCenterLonLat(),
|
|
feature.geometry.getBounds().getCenterLonLat(),
|
|
@@ -463,7 +464,7 @@ OpenLayers.ProxyHost = "index-ajax.php?_zasobID=<?php echo $this->_zasobID; ?>&_
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
priv.hidePopup = function(feature) {
|
|
priv.hidePopup = function(feature) {
|
|
|
- console.log('hidePopup() ... ');
|
|
|
|
|
|
|
+ if (priv.options.debug) console.log('hidePopup() ... ');
|
|
|
if (feature && feature.popup) {
|
|
if (feature && feature.popup) {
|
|
|
_map.removePopup(feature.popup);
|
|
_map.removePopup(feature.popup);
|
|
|
feature.popup.destroy();
|
|
feature.popup.destroy();
|
|
@@ -472,7 +473,7 @@ OpenLayers.ProxyHost = "index-ajax.php?_zasobID=<?php echo $this->_zasobID; ?>&_
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
priv.onPopupClose = function() {
|
|
priv.onPopupClose = function() {
|
|
|
- console.log('onPopupClose() ...');
|
|
|
|
|
|
|
+ if (priv.options.debug) console.log('onPopupClose() ...');
|
|
|
priv.hidePopup(_selectedFeature);
|
|
priv.hidePopup(_selectedFeature);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -863,6 +864,11 @@ OpenLayers.ProxyHost = "index-ajax.php?_zasobID=<?php echo $this->_zasobID; ?>&_
|
|
|
_map.updateSize();
|
|
_map.updateSize();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ publ.refresh = function(options) {
|
|
|
|
|
+ if (priv.options.debug) console.log('publ.refresh ... ', options);
|
|
|
|
|
+ _layer.refresh({force:true});
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
publ.zoomToExtent = function(extent) {
|
|
publ.zoomToExtent = function(extent) {
|
|
|
if (!extent) return;
|
|
if (!extent) return;
|
|
|
var sourceProj = new OpenLayers.Projection("EPSG:4326");
|
|
var sourceProj = new OpenLayers.Projection("EPSG:4326");
|
|
@@ -913,6 +919,17 @@ OpenLayers.ProxyHost = "index-ajax.php?_zasobID=<?php echo $this->_zasobID; ?>&_
|
|
|
return this;
|
|
return this;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ $.fn.TableAjaxMapRefresh = function(options) {
|
|
|
|
|
+ options = options || {};
|
|
|
|
|
+ return this.each(function() {
|
|
|
|
|
+ var tblAjaxMap = $(this).data('TableAjaxMap');
|
|
|
|
|
+ if (tblAjaxMap) {
|
|
|
|
|
+ tblAjaxMap.refresh(options);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return this;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
$.fn.TableAjaxMapZoomToExtent = function(extent) {
|
|
$.fn.TableAjaxMapZoomToExtent = function(extent) {
|
|
|
if (!extent) return;
|
|
if (!extent) return;
|
|
|
return this.each(function() {
|
|
return this.each(function() {
|