[Mapbender-commits] r3391 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jan 2 09:09:16 EST 2009
Author: nimix
Date: 2009-01-02 09:09:15 -0500 (Fri, 02 Jan 2009)
New Revision: 3391
Modified:
trunk/mapbender/http/javascripts/mod_box1.js
trunk/mapbender/http/javascripts/mod_selArea1.php
trunk/mapbender/http/javascripts/ovnf.php
Log:
http://trac.osgeo.org/mapbender/ticket/360
Modified: trunk/mapbender/http/javascripts/mod_box1.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_box1.js 2009-01-02 13:50:30 UTC (rev 3390)
+++ trunk/mapbender/http/javascripts/mod_box1.js 2009-01-02 14:09:15 UTC (rev 3391)
@@ -173,3 +173,13 @@
//zoom(mb_zF,true,1.0,pos[0], pos[1]);
}
}
+
+function mod_box_setValidClipping(coords){
+ if(coords.length > 2){
+ mb_calculateExtent(mb_zF,coords[0],coords[1],coords[2],coords[3]);
+ setMapRequest(mb_zF);
+ }
+ else{
+ zoom(mb_zF,true,1.0,coords[0], coords[1]);
+ }
+}
Modified: trunk/mapbender/http/javascripts/mod_selArea1.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_selArea1.php 2009-01-02 13:50:30 UTC (rev 3390)
+++ trunk/mapbender/http/javascripts/mod_selArea1.php 2009-01-02 14:09:15 UTC (rev 3391)
@@ -61,16 +61,7 @@
mb_zF = mod_selArea_target;
}
function mod_selArea_get(e){
- mod_selArea_setValidClipping(mod_box_stop(e));
mb_isBF = mod_selArea_target;
mb_zF = mod_selArea_target;
+ mod_box_setValidClipping(mod_box_stop(e));
}
-function mod_selArea_setValidClipping(coords){
- if(coords.length > 2){
- mb_calculateExtent(mb_zF,coords[0],coords[1],coords[2],coords[3]);
- setMapRequest(mb_zF);
- }
- else{
- zoom(mb_zF,true,1.0,coords[0], coords[1]);
- }
-}
Modified: trunk/mapbender/http/javascripts/ovnf.php
===================================================================
--- trunk/mapbender/http/javascripts/ovnf.php 2009-01-02 13:50:30 UTC (rev 3390)
+++ trunk/mapbender/http/javascripts/ovnf.php 2009-01-02 14:09:15 UTC (rev 3391)
@@ -1 +1,29 @@
-mb_registerMapObj('', 'overview', null,150, 150);
\ No newline at end of file
+var mod_overview_target = "<?php echo $e_target[0]; ?>";
+<?php include '../include/dyn_js.php';?>
+if (typeof(overview_wms) === 'undefined')overview_wms = 0;
+overview_wms = parseInt(overview_wms);
+
+mb_registerMapObj('', 'overview', overview_wms ,150, 150);
+parent.eventInitMap.register(function init_overview(){
+ var ind = getMapObjIndexByName('overview');
+
+ var el = mb_mapObj[ind].getDomElement();
+ el.onmouseover = mod_ovSetHandler;
+ el.onmousedown = mod_box_start;
+ el.onmouseup = mod_ovGetExtent;
+ el.onmousemove = mod_box_run;
+
+ var ov_extent = mb_mapObj[ind].getExtentInfos();
+ mb_mapObj[ind].isOverview = true;
+});
+
+function mod_ovSetHandler(e){
+ mb_isBF = 'overview';
+ mb_zF = mod_overview_target;
+}
+function mod_ovGetExtent(e){
+ mb_isBF = 'overview';
+ mb_zF = mod_overview_target;
+ mod_box_setValidClipping(mod_box_stop(e));
+}
+
More information about the Mapbender_commits
mailing list