[jboss-user] [JBoss Portal] - Portlet for Google Map, problem with Refresh
cedorman65
do-not-reply at jboss.com
Fri Oct 13 16:09:33 EDT 2006
I am trying to put a Google Map into a portlet. It is easy enough to have
an html fragment that pulls in the google map javascript, add a button,
and when the user clicks on the button, draws the map. It looks like:
<script LANGUAGE=JavaScript>
function loadMap() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(0.0, 0.0), 5);
}
}
The problem is that if I include this in a doView fn, then every time that a refresh is done, it replaces the map with a new map. I don't really have
a handle on the state of the map (zoom, lat/long, overlays, etc.) so I can't
tell it to redraw it's current state. I would not want to anyway.
I would think that the same problem would happen with most Ajax / dhtml apps. Since the state of the stuff inside the portlet is stored somewhere else, for example, on the client, the state gets lost when a refresh is done. Is there anyway to tell the portal to not refresh, or how do I write doView so that it leaves it alone after initialization?
Clark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978277#3978277
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978277
More information about the jboss-user
mailing list