[Mapbender-users] Overview map in tabs + external Script reference trouble

karsten karsten at terragis.net
Fri Apr 6 04:54:32 EDT 2012


Hi All,
 
I have been in the process of porting my MB application from an old server
to a new one and at the same time from MapBender version 2.4.4 to 2.7.2.
Is seems that I am 90% there but I ran into some trouble in a couple of
areas when I just tried to implement the same additions / specifics I had
working in the old server with MapBender 2.4.4 and then trying to make them
work in MB 2.7.2.
 
1. I have used the ExtJS API to add Grid and query builder functionality to
my site . In MB 2.4.4 I simply referenced the ExtJS files in index file and
got it to work. The architecture in 2.7.2 is different and it seems there
are a lot of checks in place what was loading, is loaded, and is allowed to
be loaded? Thus so far  I was not able to reference the ExtJS lib and sue
them . On IRC Verena pointed out that one way would be to create an element
that includes a JS file as a ref just like the Jquery jq_ui-Element element
. However I am still not bale to make this work. I tried to reference Ext in
the directory /var/www/sites/mapbender/http/ext/ext-all.js in an element ext
as javasript ../ext/ext-all.js
 
INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment,
e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height,
e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod,
e_target, e_requires, e_url) VALUES('xygui','ext',1,1,'The Extjs
core','','','','',NULL ,NULL ,NULL ,NULL ,NULL
,'','','','../ext/ext-all.js','','','','');
 
This in Firebug gets no error (except is says extjs not defined when trying
ton us it) but I can see that it does not earn my a reference to ext-all.js
- so not sure what is going on ...
Any ideas what is wrong and how I can fix this ?. Do I need to out my ExtJS
into a specific directory for this to be allowed?
 
2. I am trying to have an overview map in the tabs structure (just like used
it in the old installation v 2.4.4, there that worked out any trouble). 
Now in 2.7.2 I am getting the problem that the overview map always does not
seem to (using the same WMS as before) zoom  the full extent and also in I
cannot get the map to work properly with the tabs display order . That means
initially in the GUI all looks fine, however when I open the Overview map
tab the display does not go away when I close that tab (or  a  different
tab):  the map overlaps the new content and does not display as it should,
be (z index trouble ?) My settings are as below the end of the message.
screenshot 1:
http://www.terragis.net/images/overview_map_overlaps_other_content1.png
screenshot 2:
http://www.terragis.net/images/overview_map_overlaps_other_content2.png
 
Also in Firebug I realized that there multiple overview map divs created
(actually dozens ? how weird) might that be a bug or just my configuration
error ?
screen shot 3 - multiple overview divs :
http://www.terragis.net/images/multiple_ovmaps_divs.png
 
If anyone could shed some light on how I can solve or or the other (or both)
or one of this would be great as I have been stuck with this for several
month off and on working ion it.
 
Cheers
Karsten
 
 
details on ovmap and tabs:
 
ovmap element:
INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment,
e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height,
e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod,
e_target, e_requires, e_url)
VALUES('ocla4','overview',2,1,'OverviewFrame','Overview
Map','div','','scrolling="no" frameborder=''0''',1,1,1,1,NULL
,'visibility:hidden;','<div id="overview_maps"
style="position:absolute;left:0px;right:0px;"></div>','div','../plugins/mb_o
verview.js','../../lib/history.js,map_obj.js,map.js,wms.js,wfs_obj.js,initWm
cObj.php','mapframe1','mapframe1','http://www.mapbender.org/index.php/Overvi
ew');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'overview', 'skipWmsIfSrsNotSupported',
'0', 'if set to 1, it skips the WMS request if the current SRS is not
supported by the WMS; if set to 0, the WMS is always queried. Default is 0,
because of backwards compatibility' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'overview', 'overview_wms', '8', 'wms
that shows up as overview' ,'var');

tabs:
INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment,
e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height,
e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod,
e_target, e_requires, e_url) VALUES('ocla4','tabs',2,1,'vertical tabs to
handle iframes','','div','','',2,80,250,20,2,'font-family:
Arial,Helvetica;font-weight:bold;','','div','mod_tab.php','','','','');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'expandable', '0', '1 = expand
the tabs to fit the document vertically, default is 0' ,'php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_frameHeight[2]', '350', ''
,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_ids[5]', 'oclahelp', ''
,'php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_frameHeight[5]', '350', ''
,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_ids[4]', 'overview', ''
,'php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_frameHeight[4]', '180', ''
,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'open_tab', '0', 'define which
tab should be opened when a gui is opened' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_frameHeight[0]', '500', ''
,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_ids[0]', 'treeGDE', ''
,'php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_ids[2]', 'legend', ''
,'php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_prefix', ' ', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_ids[3]', 'credit', ''
,'php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_frameHeight[3]', '350', ''
,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_style',
'position:absolute;visibility:visible;border: 1px solid
#FFFFFF;font-size:12;font-style:strong;color:#FFFFFF;background:#639A9B;',
'' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_ids[1]', 'ocla_printPDF', ''
,'php_var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
context, var_type) VALUES('ocla4', 'tabs', 'tab_frameHeight[1]', '350', ''
,'var');




=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 9.0.0.888, Virus/Spyware Database: 6.19590)
http://www.pctools.com/
=======
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapbender_users/attachments/20120406/aa60d5e9/attachment.html


More information about the Mapbender_users mailing list