• Content count

  • Joined

  • Last visited

About MarkPetty

  • Rank
    Forum Newbie
  1. Thanks for the response, but #1 actually stops the firefox browser for updating, and doesn't resolve the issue for IE, and #2 doesn't do anything.
  2. I'm trying to implement a map using jsp and javascript in a way that updates on a regular basis. My original implementation was this: <%--Viewing the map --%> <a4j:outputPanel id="oldConnectionsMapView"> <div id="mapdiv" align="left"> FusionMaps. </div> <script type="text/javascript"> var map = new FusionMaps("/edm/FusionMaps/FCMap_${mapBean.mapName}.swf", "Map1Id", "750", "460", "0", "1"); map.setDataXML("${mapBean.mapDataAsXML}"); map.setTransparent(true); map.render("mapdiv"); </script> </a4j:outputPanel> <a4j:outputPanel id="connectionsMapView"> <script type="text/javascript"> var map = getMapFromId("Map1Id"); if (map.hasRendered) { map.setDataXML("${mapBean.mapDataAsXML}"); } </script> </a4j:outputPanel> where mapBean represents a bean with methods used to retrieve the appropriate data for the map (the name and the xml of the data). In addition, connectionsMapView is part of list of elements that are being refreshed regularly by the java code. Because of the methods being used to drive the maps, all of this is included on a form. I was in the process of trying to eliminate screen flicker (which is still an issue) when I discovered that this code fails to update on IE, and I receive the dreaded 'Object doesn't support this property or method". I chased down possible causes and solutions, and the only one that seemed to be relevant was the "DOM and getMapFromId () doesn't work inside a Form". So I changed the code to this: outside the <a4j:form> declaration, I have this: <script type="text/javascript" src="/edm/FusionMaps/FusionMaps.js"></script> <script LANGUAGE="Javascript" SRC="../JSClass/FusionMaps.js"></script> <script LANGUAGE="JavaScript"> function createConnectionMap(MapName, Data){ var map = new FusionMaps(MapName, "Map1Id", "750", "460", "0", "1"); map.setDataXML(Data); map.setTransparent(true); map.render("mapdiv"); } function updateConnectionMap(Data){ var map = getMapFromId("Map1Id"); if (map.hasRendered) { map.setDataXML(Data); } } </script> and I modified the code inside the Form declaration to this: <%--Viewing the map --%> <a4j:outputPanel id="oldConnectionsMapView"> <div id="mapdiv" align="left"> FusionMaps. </div> <script type="text/javascript"> createConnectionMap ("/edm/FusionMaps/FCMap_${mapBean.mapName}.swf", "${mapBean.mapDataAsXML}"); </script> </a4j:outputPanel> <a4j:outputPanel id="connectionsMapView"> <script type="text/javascript"> updateConnectionMap ("${mMapBean.mapDataAsXML}"); </script> </a4j:outputPanel> It still works on FireFox (aside from the initial draw, and I haven't attacked that issue yet), and the redraw works fine (aside from the flicker), but IE is still throwing Bad Object errors. Any solutions or suggestions? I've moved the var map declarations out of the form. I was expecting getMapFromId () to work at this point. Firefox version is 8.0.1, Explorer is 9.0.8. OS is Windows 7 Pro.
  3. Fusionmaps And Jsp

    Hi, I'm looking at implementing FusionMaps with jsp, but I can't seem to find any complete examples. Any chance that something could be made available, or at least a more extensive set of documentation? -Thanks