[OpenLayers-Users] Problem (bug?) with OL and IFRAME
Marco Pragliola
cranio at quipo.it
Tue Mar 31 10:27:56 EDT 2009
Hi all.
I had some problems including OpenLayers in a Joomla-based site. One of the weirdest is due to the use of an IFRAME tag to include the page that displays the map.
Here's a description of the situation:
- I have a main page which is generated by the Joomla CMS
- This page contains a Joomla Wrapper object, which basically is an IFRAME
- This IFRAME points to the page where the map is, which I will call "Map Page" - the Map Page uses the 2.5 version of the Framework with some customizations, and is based on the Google Layers and some WMS Mapserver layers
- The IFRAME contains also a Search Page, with links to the Map Page
I ended up in having different behaviours when switching to the Satellite layer:
- If I point the browser directly to the address of the Map Page (so it is NOT in the IFRAME), it works correctly
- If I click a link ON the Main Page that points to the Map Page it works fine, too
- If I click a link INSIDE the IFrame that points to the map page (f. ex., I open the search page in the Frame, then I click on a search result that points me to the Map Page), i have the issue that the satellite layer gets shifted.
It seems like when I zoom in or out, the satellite map loses is center by an amount that seems to match exactly the offset between the upper-left corner of the outermost DIV of the Main Page, and the upper left corner of the Map Page.
In other words, I suppose that when I step into the map page from a link within the same IFRAME, and I change to the satellite map, there are some problems in reading the correct mouse coords, it seems like they are read from the main page and not from the Frame. Really don't know if I'm right though...
But last thing... if I refresh the Frame alone (not the whole page) via Firefox, it magically works fine again...
You can see the map here:
http://marti.homelinux.net/mymap
Click on "WebGIS" and switch to satellite: all fine
Click on "Ricerca" and on the internal link: problem.
Thanks for you help in advance.
--
View this message in context: http://n2.nabble.com/Problem-%28bug-%29-with-OL-and-IFRAME-tp2563256p2563256.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list