On May 14, 9:19 am, Brice <[email protected]> wrote: > > Thanks for your response but if it now "works" it's not perfect as you > can see there > :http://boucard.brice.perso.neuf.fr/geoculture/tests/test/geoloc.html > after a click on the red marker. > The maxContent infoWindow loads this page > :http://boucard.brice.perso.neuf.fr/geoculture/tests/test/nadaud.html > But after having removed all the html elements except those in the > body element, it doesn't load the little map and doesn't use the css > style, yet defined into the main google map page. > > What would you suggest to solve that issue ?
I'd suggest putting the Easyscroll CSS into the maxContent page. InfoWindows are constructed and injected into the main page, so they won't get CSS applied until it's too late (if it happens at all). I'd also suggest not calling your maxContent map div "map". You already have a map with that id in the main page. It does seem to work, but it's not good practice. The reason your entire page went blank when you included the map was that you also included the API script again in the maxContent. The API scripts use document.write, and if that happens when a page is finished the browser clears everything and starts again. Leaving that out of the maxContent window allows the existing API to be used; it doesn't have to be loaded again. It does seem that putting everything you want in the maxContent window into a page which is called as the src of an iframe would make things far easier. You would probably need to load the API again, but you could construct your maxContent layout as a completely separate page and all that the maxContent infoWindow needs to contain is an <iframe> element. If you go down this route, work on *copies* of your existing pages: it's a fairly major change. -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
