<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Try to put a breakpoint at the line in question, then click "Start
debugging".<br>
Now once the page hits the line, the debugger will stop and show the
line with a highlight.<br>
Then, go to the 4th tab on the right ("Show"), and type in "GetParent"
and press enter.<br>
It will now show you what it thinks GetParent is (a function or null).<br>
If it is a function, try to type "GetParent()", to see what GetParent()
returns.<br>
If it returns null, try to type "window", and expand the "[Methods]"
item, to see what methods you have loaded/defined.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Fraser Burgess skrev:
<blockquote
 cite="mid:50DE6F70588444499E383C5102155B891ADA0F@energyops.lakelandenergy.local"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Palatino Linotype";
        panose-1:2 4 5 2 5 5 5 3 3 4;}
@font-face
        {font-family:"MS Shell Dlg 2";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* 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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1298144985;
        mso-list-type:hybrid;
        mso-list-template-ids:-1716240742 -427016794 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:11;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
  </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]-->
  <div class="Section1">
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Thanks,
I&#8217;ve done some
more reading and think I understand.&nbsp; But that being said, I&#8217;m
confused as to why this still isn&#8217;t working.&nbsp; <o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
 style="color: rgb(31, 73, 125);"><span style="">-<span
 style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><!--[endif]--><span
 style="color: rgb(31, 73, 125);">In my navigatetask.aspx
is where I grab the XY and scale parameters.&nbsp; <o:p></o:p></span></p>
  <p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
 style="color: rgb(31, 73, 125);"><span style="">-<span
 style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><!--[endif]--><span
 style="color: rgb(31, 73, 125);">From here I create a
url pointing to gotopoint.aspx and pass in the XY and scale paremeters
to the
URL.<o:p></o:p></span></p>
  <p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
 style="color: rgb(31, 73, 125);"><span style="">-<span
 style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><!--[endif]--><span
 style="color: rgb(31, 73, 125);">The gotopoint.aspx
is being held and fired from the hidden scriptFrame in MapGuide.&nbsp; <o:p></o:p></span></p>
  <p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
 style="color: rgb(31, 73, 125);"><span style="">-<span
 style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><!--[endif]--><span
 style="color: rgb(31, 73, 125);">Gotopoint.aspx
contains the onPageLoad function which calls ZoomToView.<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">So since
I want the script frame
to interact with the mapFrame I should be able to start from the top
frame and
drill down like this:<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">function
OnPageLoad()<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">{<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;
window.top.fusion.ZoomToView(&lt;%= GetRequestParameters()["X"]
%&gt;, &lt;%= GetRequestParameters()["Y"] %&gt;, &lt;%=
GetRequestParameters()["Scale"] %&gt;, true);<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">}<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;/script&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;body
onLoad="OnPageLoad()"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Or I
could also use the
GetParent() function which should fire at the first if (parent.Fusion)
section
as the scriptFrame should be one level below the Fusion frame which is
essentially defined as window.top.fusion to begin with.&nbsp; <o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Both
these methods fire the
script and open the URL passed in from Navigate.aspx in a new IE
window. I can
only assume this is because the reference to the mapFrame is invalid
and
somehow the URL defaults to opening in a new window?&nbsp; Do I need to
reference MapGuideViewerAPI.js in this script somewhere?? &#8211; I don&#8217;t
think this is the case as I didn&#8217;t need to do it for the mapFrame
references.<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">-----------<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span style="color: rgb(31, 73, 125);">I
tried the IE8 debugger and my code (see below) fails at</span><span
 style="font-size: 9pt; font-family: &quot;Courier New&quot;;"> <span
 style="background: yellow none repeat scroll 0%; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">GetParent().ZoomToView(605793.225947542,
5057603.85822154, 25000, true)</span>; with the error </span><span
 style="font-size: 8.5pt; font-family: &quot;MS Shell Dlg 2&quot;; color: red;">'undefined'
is
null or not an object.</span>&nbsp; I assume this means it doesn&#8217;t know
what GetParent() is.<o:p></o:p></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Any ideas?<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">F<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;%@ Page
language="c#"%&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;!-- #Include
File="utilityfunctions.aspx" --&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN" &gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;html&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;head&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;
&lt;title&gt;Viewer Sample
Application - Goto Point&lt;/title&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp; &lt;meta
content="text/html;
charset=utf-8" http-equiv="Content-Type"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp; &lt;meta
http-equiv="content-script-type"
content="text/javascript"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;/head&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;!-- Emit this
function and assocate it with the
onLoad event for the --&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;!-- page so
that it gets executed when this page
loads in the&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;!-- browser.
The function calls the ZoomToView
method on the&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;!-- Viewer
frame forcing the Viewer to navigate
to the specified&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;!-- point and
scale.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
--&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;script
language="javascript"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">function
GetParent()<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (parent.Fusion) {<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return parent;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} else if (parent.parent.Fusion) {<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return parent.parent;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp; }<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">function
OnPageLoad()<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">{<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;
GetParent().ZoomToView(&lt;%=
GetRequestParameters()["X"] %&gt;, &lt;%=
GetRequestParameters()["Y"] %&gt;, &lt;%=
GetRequestParameters()["Scale"] %&gt;, true);<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">}<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;/script&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;body
onLoad="OnPageLoad()"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;/body&gt;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&lt;/html&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Chris
Claydon<br>
  <b>Sent:</b> Wednesday, September 16, 2009 4:30 PM<br>
  <b>To:</b> MapGuide Users Mail List<br>
  <b>Subject:</b> RE: [mapguide-users] RE:
parent.parent.parent.mapFrame - AJAX
vsFUSION<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&#8216;parent&#8217;
takes you
to the frame that is the parent of the one you&#8217;re running the script
in.
The GetParent() method as defined below looks for &#8216;Fusion&#8217; to be
defined either in the direct parent or the parent of that frame. If
you&#8217;re launching in a new window, you&#8217;ll never get to a parent that
has Fusion defined. I think you need to use &#8216;opener&#8217; instead&#8230;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Fraser
Burgess<br>
  <b>Sent:</b> Wednesday, September 16, 2009 2:04 PM<br>
  <b>To:</b> MapGuide Users Mail List<br>
  <b>Subject:</b> RE: [mapguide-users] RE:
parent.parent.parent.mapFrame - AJAX
vs FUSION<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">So GetParent()
worked when things were called with
&#8220;parent.parent.parent.mapFrame&#8221;; however, what if I have something in
AJAX like this:<i><o:p></o:p></i></span></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">function
OnPageLoad()<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">{<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;
parent.ZoomToView(&lt;%= GetRequestParameters()["X"] %&gt;, &lt;%=
GetRequestParameters()["Y"] %&gt;, &lt;%=
GetRequestParameters()["Scale"] %&gt;, true);<o:p></o:p></span></i></p>
  <p class="MsoNormal"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">}<o:p></o:p></span></i></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">I
then modify by adding your code below and then try:<o:p></o:p></span></p>
  <p class="MsoNormal"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">function
GetParent()<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (parent.Fusion) {<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return parent;<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} else if (parent.parent.Fusion) {<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return parent.parent;<o:p></o:p></span></i></p>
  <p class="MsoNormal"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 0.5in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;
}<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);"><o:p>&nbsp;</o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">function
OnPageLoad()<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">{<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">&nbsp;&nbsp;&nbsp;
GetParent().ZoomToView(&lt;%= GetRequestParameters()["X"] %&gt;,
&lt;%= GetRequestParameters()["Y"] %&gt;, &lt;%=
GetRequestParameters()["Scale"] %&gt;, true);<o:p></o:p></span></i></p>
  <p class="MsoNormal"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(79, 129, 189);">}</span><span
 style="color: rgb(79, 129, 189);"><o:p></o:p></span></i></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">This code is using the sample gotopoint.aspx
file.&nbsp;
When I select the link that activates this gotopoint, the URL contains
the X Y
and scale <a moz-do-not-send="true"
 href="http://172.16.186.38/mapguide2010/UtilityMap/gotopoint.aspx?X=632593.974151717&amp;Y=4989398.03115329&amp;Scale=25000">http://172.16.186.38/mapguide2010/UtilityMap/gotopoint.aspx?X=632593.974151717&amp;Y=4989398.03115329&amp;Scale=25000</a>
which should be passed into this onPageLoad() function.&nbsp; However it
appears that nothing is firing for OnPageLoad &#8211; so when I click the
link
nothing happens, no error message or anything.<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Can anyone help with this problem?&nbsp; Also, can
anyone
point me to something that would help explain this parent.parent.
syntax?&nbsp;
I&#8217;m not really certain why at one point we would use parent.function()
vs
parent.parent.parent.function() etc.<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Thanks again<o:p></o:p></p>
  <p class="MsoNormal">Fraser<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;"><o:p>&nbsp;</o:p></span></b></p>
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>]
  <b>On Behalf Of </b>Berdel, Brian<br>
  <b>Sent:</b> Wednesday, September 16, 2009 9:02 AM<br>
  <b>To:</b> MapGuide Users Mail List<br>
  <b>Subject:</b> [mapguide-users] RE: parent.parent.parent.mapFrame -
AJAX vs
FUSION<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">If you
want to add the reference
to your fusion index page, add the following to your aspx (task pane)
page<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: blue;">function</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> GetParent()<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <span style="color: blue;">if</span> (parent.Fusion) {<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <span style="color: blue;">return</span> parent;<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} <span style="color: blue;">else</span> <span style="color: blue;">if</span>
(parent.parent.Fusion) {<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <span style="color: blue;">return</span> parent.parent;<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></p>
  <p class="MsoNormal" style="margin-left: 0.5in;"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp; }<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Then
you can call functions in the same way as before but substitute<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">GetParent().<i>DigitizePoint(OnPointDigitized);<o:p></o:p></i></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <div>
  <div>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Palatino Linotype&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);">Brian
Berdel</span><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  </div>
  <div>
  <div>
  <div>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Palatino Linotype&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);">McMahon
Associates, Inc.</span><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  </div>
  </div>
  </div>
  <div>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Palatino Linotype&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);">p:
215.283.9444 x 260</span><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  </div>
  <div>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Palatino Linotype&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);"><a
 moz-do-not-send="true" href="http://www.mcmtrans.com">www.mcmtrans.com</a></span><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  </div>
  <div>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);">&nbsp;<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);">&nbsp;</span><span
 style="color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Chris
Claydon<br>
  <b>Sent:</b> Tuesday, September 15, 2009 4:43 PM<br>
  <b>To:</b> MapGuide Users Mail List<br>
  <b>Subject:</b> [mapguide-users] RE: parent.parent.parent.mapFrame -
AJAX vs
FUSION<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">I think
you should be able to
reference the MapGuideViewerAPI.js script from your aspx page, and then
just
call DigitizePoint directly without any window.top or parent references.<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">It should
also be possible to
add a reference to MapGuideViewerAPI.js to the index.html file in the
Fusion
template you&#8217;re using, and reference it using window.top&#8230;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">It&#8217;s been
a while since
I&#8217;ve played around with this stuff, so someone else may be able to
provide
specifics&#8230;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Fraser
Burgess<br>
  <b>Sent:</b> Tuesday, September 15, 2009 1:40 PM<br>
  <b>To:</b> MapGuide Users Mail List<br>
  <b>Subject:</b> [mapguide-users] parent.parent.parent.mapFrame - AJAX
vs FUSION<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Hi List,<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">I&#8217;m making steady progress with my project and
learning many things about MapGuide along the way thanks largely to the
help
from those on this list &#8211; many thanks to those who have helped so far<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">From what I can tell
parent.parent.parent.mapFrame is how
the map frame is referenced from the task pane in the AJAX viewer.&nbsp; I
have
been reading posts about how this is referenced in Fusion and it seems
the <i>MapGuideViewerAPI.js</i>
file has a bit of info.&nbsp; Unfortunately I&#8217;m having a bit if trouble
putting the pieces together and was hoping that someone here may steer
me in
the right direction.<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">In both AJAX and FUSION I&#8217;m working from the
taskpane
and using the markup scripts that are part of the AJAX demo&#8217;s and
tutorials.<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">I assume I need to substitute either &#8216;Fusion&#8217; or
&#8216;window.top.Fusion&#8217; somehow for &#8216;<i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">parent.parent.parent.mapFrame.DigitizePoint(OnPointDigitized);&#8217;.
  </span></i>in my script however I have yet to do this in such a way
that it
works.&nbsp; I keep getting &#8216;Object doesn&#8217;t support this property
or method&#8217;.<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">So for example in my editmarkup.aspx code for
example, I
have the following function which should be activated when I click the
digitize
point button<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
function AddPoint()<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SetDigitizeInfo(EDIT_POINT_HELP);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
parent.parent.parent.mapFrame.DigitizePoint(OnPointDigitized);<o:p></o:p></span></i></p>
  <p class="MsoNormal"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><o:p></o:p></i></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">In Fusion this code gives an error
&#8216;parent.parent,parent.mapFrame&#8217; is null or not an object<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">I see that in MapGuideViewerAPI.js<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">function
DigitizePoint(handler)
{<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp; if
(handler) {<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
var Fusion = window.top.Fusion;<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
var mapWidget = Fusion.getWidgetById(mapWidgetId);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
var digitizer = new Fusion.Tool.Canvas.Point(mapWidget);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
digitizer.mouseUp = PointHandlers.prototype.mouseUp;<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Object.inheritFrom(digitizer, Fusion.Tool.Canvas.prototype, []);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
digitizer.initializeCanvas();<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
var activeWidget = mapWidget.buttonSet.activeButton;<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mapWidget.buttonSet.setActiveButton(null);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
digitizer.handler = function() {<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;handler.apply(null, arguments);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
activeWidget.setActive(true);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
digitizer.activateCanvas();<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//add a listener to update the position of the features<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
var mapWidget = Fusion.getWidgetById(mapWidgetId);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mapWidget.registerForEvent(Fusion.Event.MAP_EXTENTS_CHANGED, <o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
function(){<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
digitizer.updatePx();<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
digitizer.clearContext();<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
digitizer.draw(digitizer.context);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
);<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></i></p>
  <p class="MsoNormal" style="margin-left: 1in;"><i><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">}</span><o:p></o:p></i></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Thanks<o:p></o:p></p>
  <p class="MsoNormal">Fraser<o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
  <div class="MsoNormal" style="text-align: center;" align="center"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">
  <hr align="center" size="2" width="100%"></span></div>
  <p class="MsoNormal"><span
 style="font-size: 7.5pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: gray;">Important
notice to recipients:<br>
Copies of documents that may be relied upon by you are limited to the
printed copies
(also known as 'hard copies') that are signed and sealed by the
Engineer and/or
Land Surveyor. Files in electronic formats, or other types of
information
furnished by the Engineer and/or Land Surveyor to you such as text,
data or
graphics are for your convenience only. Any conclusions or information
obtained
or derived from such electronic files will be at the user's sole risk.
When
transferring documents in electronic formats, the Engineer and/or Land
Surveyor
makes no representation as to long-term compatibility, usability, or
readability of the documents resulting from the use of software
application
packages, operating systems or computer hardware differing from those
used by
McMahon Associates, Inc. at the beginning of the project.</span><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><o:p></o:p></span></p>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
</blockquote>
</body>
</html>