[mapguide-users] AJAX versus DWF problem
Hello mapguide users, I've been reading the DWF viewer API and still didn't find a solution of how to find out when a map has loaded using the DWF viewer. For the AJAX viewer it works like a charm.Here is some sample code using the AJAX viewer :In the first page I have :<[EMAIL PROTECTED] file="utilityfunctionsMapguide.jsp" %> <% /* Initialize a JSP session and register a variable to hold the session id, then initialize the Web Extensions, and connect to the site, and create a session. */ try { createSessionMapguide(request); } catch (Throwable t) { response.sendRedirect("errorPageMapguide.jsp?ERROR=" + t.getMessage()); } %> var timeout; function executeActions() { if (document.getElementById("viewerFrame").readyState == "complete") { clearTimeout(timeout); var tempWin = window.open('ajaxviewerMapguideScriptFrame.jsp?SESSION=<%=sessionId%>&WEBLAYOUT=<%=webLayout%>&GUID=<%=GUID%>', 'scriptFrame', ''); } else { timeout = setTimeout("executeActions()", 500); } } As you can see here when the iframe has loaded I open a new jsp page where I test if the map has loadedThe page has the following content: <% String sessionId = request.getParameter("SESSION"); String webLayout = request.getParameter("WEBLAYOUT"); String GUID = request.getParameter("GUID"); %> var t; function onPageLoad() { if (parent.mapFrame.mapInit) { clearTimeout(t); window.open('ajaxviewerMapguideJS.jsp?SESSION=<%=sessionId%>&WEBLAYOUT=<%=webLayout%>&GUID=<%=GUID%>', 'scriptFrame', ''); } else { t = setTimeout("onPageLoad()", 500); } } From what I have read from the DWF API I have to use something like this http://download.autodesk.com/global/dwf/gallery/files/085825-1-zobell_residence.dwf";> and this if (bstrItemType == 'DOCUMENT') { //Indicates the document is finished loading ListSections(); } ok, but how do I implement this into my code, where should I put it, because I have an iframe tag that uses a webLayout not a dwf file ? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
RE: [mapguide-users] AJAX versus DWF problem
I don't know the exact command off the top of my head, but the DWF Viewer has its own similar API with which you could do a similar check. Dave From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sebastian NICIU Sent: Thursday, October 16, 2008 5:53 AM To: mapguide-users@lists.osgeo.org Subject: [mapguide-users] AJAX versus DWF problem Hello, I have a small problem, please help !!! I am using the java development environment and need to execute some java code when the map has finished loading. Using the AJAX viewer I use a JSP page that has on the onload property of the body this function : function onPageLoad() { if (parent.mapFrame.mapInit) { clearTimeout(t); window.open('ajaxviewerMapguideJS.jsp?SESSION=<%=sessionId%>&WEBLAYOUT=<%=webLayout%>&GUID=<%=GUID%>', 'scriptFrame', ''); } else { t = setTimeout("onPageLoad()", 500); } The problem is when I am using the DWF viewer the mapFrame.mapInit variable is always false, because, I understand, the viewer don't use this variable. Do anybody know how could I verify if the map has loaded using the DWF viewer ? Thanks :) ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] AJAX versus DWF problem
Hello, I have a small problem, please help !!! I am using the java development environment and need to execute some java code when the map has finished loading. Using the AJAX viewer I use a JSP page that has on the onload property of the body this function : function onPageLoad() { if (parent.mapFrame.mapInit) { clearTimeout(t); window.open('ajaxviewerMapguideJS.jsp?SESSION=<%=sessionId%>&WEBLAYOUT=<%=webLayout%>&GUID=<%=GUID%>', 'scriptFrame', ''); } else { t = setTimeout("onPageLoad()", 500); } The problem is when I am using the DWF viewer the mapFrame.mapInit variable is always false, because, I understand, the viewer don't use this variable. Do anybody know how could I verify if the map has loaded using the DWF viewer ? Thanks :) ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] AJAX versus DWF problem
Hello, ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users