<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m new to the MapGuide list, but have been working some with MapGuide for the past couple of years and reading a lot here. I’m testing a new PHP utility using MGOS 2.2 RC2 with the Ajax viewer.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The code I’m writing allows a user to zoom to a given location by typing in a coordinate in the local projected coordinate system, or optionally using LL (WGS84). I think I’m on track with everything except that the Main frame ZoomToView() function seems to break my session. After my code does the ZoomToView, the session is broken for any other operation until a browser refresh.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If I hard-code a similar ZoomToView function as a custom command in MapGuide Studio using InvokeScript, it works fine and the session continues normally. It appears as though this has something to do with calling the function from a different frame.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The command executes in the Task view pane and I’m calling ZoomToView() from there as follows:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>…<o:p></o:p></p><p class=MsoNormal>function GetParent()<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> if(popup)<o:p></o:p></p><p class=MsoNormal> return opener;<o:p></o:p></p><p class=MsoNormal> else<o:p></o:p></p><p class=MsoNormal> return parent.parent;<o:p></o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>function ZoomToCoord(){<o:p></o:p></p><p class=MsoNormal style='text-indent:.5in'>GetParent().ZoomToView(document.getElementById('ProjectedX').value, document.getElementById('ProjectedY').value, 2000.0, true);<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The zoom works correctly, but then I get an error in the browser with any subsequent operation.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>For example, using the scroll wheel to zoom results in this error message in the browser:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-indent:.5in'>Message: Invalid argument.<o:p></o:p></p><p class=MsoNormal style='text-indent:.5in'>Line: 3856<o:p></o:p></p><p class=MsoNormal style='text-indent:.5in'>Char: 9<o:p></o:p></p><p class=MsoNormal style='text-indent:.5in'>Code: 0<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>URI: <a href="http://gisvr1/mapguide/mapviewerajax/mapframe.php?MAPDEFINITION=Library%3A%2F%2FCounty%2FCounty_Premium_GIS_SQL.MapDefinition&TYPE=HTML&SHOWLEGEND=1&SHOWPROP=1&INFOWIDTH=240&LOCALE=en&HLTGT=2&HLTGTNAME=&SHOWSLIDER=1&SESSION=86b0a858-4e79-11e0-8000-0003ffca20da_en_C0A8C8D2591C591B591A">http://gisvr1/mapguide/mapviewerajax/mapframe.php?MAPDEFINITION=Library%3A%2F%2FCounty%2FCounty_Premium_GIS_SQL.MapDefinition&TYPE=HTML&SHOWLEGEND=1&SHOWPROP=1&INFOWIDTH=240&LOCALE=en&HLTGT=2&HLTGTNAME=&SHOWSLIDER=1&SESSION=86b0a858-4e79-11e0-8000-0003ffca20da_en_C0A8C8D2591C591B591A</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Since nothing else appears to be wrong and my session is dead, I assume this is indicating the expired session.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for any ideas.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Steve Finch<o:p></o:p></p><p class=MsoNormal>Engineering Design Systems, Inc.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>