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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to