Operate without OpenLayers here as well
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
ded3f6382d
commit
31b2e776e6
@ -119,6 +119,9 @@ function loadJSAndGISEditor(value, field, type, input_name, token) {
|
||||
script.onload = function () {
|
||||
loadGISEditor(value, field, type, input_name, token);
|
||||
};
|
||||
script.onerror = function() {
|
||||
loadGISEditor(value, field, type, input_name, token);
|
||||
}
|
||||
|
||||
script.src = 'js/openlayers/OpenLayers.js';
|
||||
head.appendChild(script);
|
||||
|
||||
@ -424,7 +424,8 @@ class GISVisualization
|
||||
$this->init();
|
||||
$scale_data = $this->_scaleDataSet($this->_data);
|
||||
$output
|
||||
= 'var options = {'
|
||||
= 'if (typeof OpenLayers !== "undefined") {'
|
||||
. 'var options = {'
|
||||
. 'projection: new OpenLayers.Projection("EPSG:900913"),'
|
||||
. 'displayProjection: new OpenLayers.Projection("EPSG:4326"),'
|
||||
. 'units: "m",'
|
||||
@ -450,7 +451,8 @@ class GISVisualization
|
||||
. 'map.zoomTo(2);'
|
||||
. '}'
|
||||
. 'map.addControl(new OpenLayers.Control.LayerSwitcher());'
|
||||
. 'map.addControl(new OpenLayers.Control.MousePosition());';
|
||||
. 'map.addControl(new OpenLayers.Control.MousePosition());'
|
||||
. '}';
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user