GUI elements are not arranged in iframe

7 messages Options
Embed this post
Permalink
Sebastian Krohn-Grimberghe

GUI elements are not arranged in iframe

Reply Threaded More More options
Print post
Permalink
Hello,

I’m trying to integrate a GUI into a HTML site by loading it into an iframe
with version 2.6. Up to version 2.5.2 this worked fine. But with version 2.6
the elements which are arranged depending on the map frame position (e.g.
navFrame and dragMapSize) are not arranged around the map. Instead they are
displayed on their initial position (e.g. top: 0, left: 0) and don’t work.
If I load the GUIs directly and not in an iframe everything works fine.
If the HTML file with the iframe is called from a different host than
Mapbender, firebug often displays an error message that the Mapbender host
doesn’t have the permission to read the attribute “Window.eventInitMap”. If
both runs on the same host I don’t get error messages from firebug, but
still the same elements are not arranged. It makes no difference whether I
use my own customized GUIs or the existing templates.
Does anyone know how I get all elements arranged correctly in the iframe
with version 2.6?

Best regards,
Sebastian Krohn-Grimberghe

--

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: [hidden email]
http://www.ipsyscon.de/

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
adoering

Re: GUI elements are not arranged in iframe

Reply Threaded More More options
Print post
Permalink
Hello Sebastian,

did you find any solution for your problem?

I am facing the same problem and couldn't find a solution yet.

Best regards

Andreas Doering

Sebastian Krohn-Grimberghe wrote:
Hello,

I’m trying to integrate a GUI into a HTML site by loading it into an iframe
with version 2.6. Up to version 2.5.2 this worked fine. But with version 2.6
the elements which are arranged depending on the map frame position (e.g.
navFrame and dragMapSize) are not arranged around the map. Instead they are
displayed on their initial position (e.g. top: 0, left: 0) and don’t work.
If I load the GUIs directly and not in an iframe everything works fine.
If the HTML file with the iframe is called from a different host than
Mapbender, firebug often displays an error message that the Mapbender host
doesn’t have the permission to read the attribute “Window.eventInitMap”. If
both runs on the same host I don’t get error messages from firebug, but
still the same elements are not arranged. It makes no difference whether I
use my own customized GUIs or the existing templates.
Does anyone know how I get all elements arranged correctly in the iframe
with version 2.6?

Best regards,
Sebastian Krohn-Grimberghe

--

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@ipsyscon.de
http://www.ipsyscon.de/

_______________________________________________
Mapbender_users mailing list
Mapbender_users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Sebastian Krohn-Grimberghe

Re: GUI elements are not arranged in iframe

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sebastian Krohn-Grimberghe
Hello Andreas

Andreas Doering wrote:
> did you find any solution for your problem?
>
> I am facing the same problem and couldn't find a solution yet.


I could not find a solution so far but I am still trying to. I will let you know if I make progress.

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: [hidden email]
http://www.ipsyscon.de/

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Sebastian Krohn-Grimberghe

RE: GUI elements are not arranged in iframe

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sebastian Krohn-Grimberghe
Hello,

Sebastian wrote:
> I could not find a solution so far but I am still trying to. I will let
> you know if I make progress.

This is what I found out so far:

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).

I could also locate the functions in the code causing the problem. In all three cases it is related to event registrations:
ovnf.php : parent.eventInitMap.register(function init_overview(){…})
mod_highlightPOI.php: eventAfterMapRequest.register(function(){…})
mod_zoomCoords.php: parent.eventInitMap.register(function zoomCoorsInit(){…})

After removing these functions I can activate overview, highlight_POI and zoomCoords and the other elements are still working in the iframe. But of course by removing the code overview, highlight_POI and zoomCoords do not work correctly anymore.

Maybe one of the more advanced mapbender developers can help us here?

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: [hidden email]
http://www.ipsyscon.de/


_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Sebastian Krohn-Grimberghe

Re: GUI elements are not arranged in iframe

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sebastian Krohn-Grimberghe
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: [hidden email]
http://www.ipsyscon.de/

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
birger.heinss

AW: GUI elements are not arranged in iframe

Reply Threaded More More options
Print post
Permalink
Hello together,

Congratulations for finding the problems solution. If this works fine in any case this code change should be integrated in a official mapbender release. Does anybody know if this is scheduled?


Mit freundlichen Grüßen

Birger Heinß
Consultant
Net Information Solutions

Vattenfall Europe Information Services GmbH
Kopenhagener Str. 83-101
13158 Berlin

Tel. +49 30 60005 2619
Fax +49 30 60005 2609
Mobil +49 160 898 4440
[hidden email]
www.vattenfall.de/is

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Sebastian Krohn-Grimberghe
Gesendet: Donnerstag, 8. Oktober 2009 10:17
An: 'Mapbender User List'
Betreff: Re: [Mapbender-users] GUI elements are not arranged in iframe

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: [hidden email]
http://www.ipsyscon.de/

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
#======================================================================#
Vattenfall Europe Information Services GmbH, Hamburg, Amtsgericht Hamburg - HRB 86516
Vorsitzender des Aufsichtsrates: Dr. Stefan Keese
Geschäftsführer: Ernst Wudtke, Armin Fischer, Lennart Atternäs

---------------------------------------------------------------------------------
Diese E-Mail wurde digital signiert.
Sie koennen anhand der Signatur nachvollziehen, dass die E-Mail wirklich von
Vattenfall stammt und dass deren Inhalt auf dem Transportweg nicht manipuliert
wurde. Weitere Informationen ueber die eingesetzten Signaturen finden Sie auf
unserer Website unter http://www.vattenfall.de/pki.
---------------------------------------------------------------------------------


_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

smime.p7s (8K) Download Attachment
Michael Schulz

Re: GUI elements are not arranged in iframe

Reply Threaded More More options
Print post
Permalink
Hi,

yes, all modules are subsequently moved to support the new JavaScript
Api and module character. The used register functions are already
marked deprecated and will be replaced accordingly. This means each
module has to be revised and at least partially be rewritten, which is
still an ongoing effort at the moment.

Cheers, Michael


2009/10/8  <[hidden email]>:

> Hello together,
>
> Congratulations for finding the problems solution. If this works fine in any case this code change should be integrated in a official mapbender release. Does anybody know if this is scheduled?
>
>
> Mit freundlichen Grüßen
>
> Birger Heinß
> Consultant
> Net Information Solutions
>
> Vattenfall Europe Information Services GmbH
> Kopenhagener Str. 83-101
> 13158 Berlin
>
> Tel. +49 30 60005 2619
> Fax +49 30 60005 2609
> Mobil +49 160 898 4440
> [hidden email]
> www.vattenfall.de/is
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Sebastian Krohn-Grimberghe
> Gesendet: Donnerstag, 8. Oktober 2009 10:17
> An: 'Mapbender User List'
> Betreff: Re: [Mapbender-users] GUI elements are not arranged in iframe
>
> 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: [hidden email]
> http://www.ipsyscon.de/
>
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users
> #======================================================================#
> Vattenfall Europe Information Services GmbH, Hamburg, Amtsgericht Hamburg - HRB 86516
> Vorsitzender des Aufsichtsrates: Dr. Stefan Keese
> Geschäftsführer: Ernst Wudtke, Armin Fischer, Lennart Atternäs
>
> ---------------------------------------------------------------------------------
> Diese E-Mail wurde digital signiert.
> Sie koennen anhand der Signatur nachvollziehen, dass die E-Mail wirklich von
> Vattenfall stammt und dass deren Inhalt auf dem Transportweg nicht manipuliert
> wurde. Weitere Informationen ueber die eingesetzten Signaturen finden Sie auf
> unserer Website unter http://www.vattenfall.de/pki.
> ---------------------------------------------------------------------------------
>
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users
>
>



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------
Michael Schulz
[hidden email]

in medias res
Gesellschaft für Informationstechnologie mbH

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

http://www.webgis.de / http://www.zopecms.de
--------------------------------------------------------------
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users