[Mapbender-users] GUI elements are not arranged in iframe
Sebastian Krohn-Grimberghe
sebastian.krohn-grimberghe at ipsyscon.de
Thu Oct 8 04:16:37 EDT 2009
Hello,
for everyone interested in the solution...
Sebastian wrote:
> The elements causing the problems are overview, highlight_POI and
> zoomCoords. When I deactivate these elements, all other elements are
> arranged correctly and do work in the iframe (except for printPDF
> which makes use of overview, and the tools/buttons of the measure element).
The problem seems to be caused by unnecessary uses of the javascript "parent" element. E.g. if you make the following changes in javascript/ovnf.php, the overview works fine, both when the gui is loaded inside an iframe or loaded directly in the browser:
parent.eventInitMap.register(function init_overview(){ ...
must be changed to:
eventInitMap.register(function init_overview(){ ...
By the use of the "parent" element the script tries to perform the function outside the iframe and of course this fails.
By removing unnecessary "parent" elements I could also get all other tools to work with my GUIs inside an iframe (and they also still work when I load the gui directly). More examples:
javascript/mod_highlightPOI.php -> function mod_highlightPOI_draw():
var $div = parent.$("<div id='" + mapObject.elementName ...
change to:
var $div = $("<div id='" + mapObject.elementName ...
javascript/mod_measure.php -> function mod_closePolygon(), function mod_rubber(),function mod_getArea():
By removing every "parent." within onmouseup, onmouseover und onmouseout in these function, the measure tools displayed inside the map are working.
Best regards,
Sebastian
--
Sebastian Krohn-Grimberghe
Entwicklung
IP SYSCON GmbH
Tiestestraße 16-18
D-30171 Hannover
Tel.: +49 (511) 85 03 03 - 0
Fax: +49 (511) 85 03 03 - 30
E-Mail: sebastian.krohn-grimberghe at ipsyscon.de
http://www.ipsyscon.de/
More information about the Mapbender_users
mailing list