<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I am not quite sure what you want to do.<br>
If you call SetScale on the legend, it will display the legend as if
the map was in that scale.<br>
That is probably not what you want.<br>
<br>
Javascript is case sensitive, you must use GetLegendCtrl(), not
getLegendCtrl().<br>
<br>
I can only recommend that you install FireFox and the FireBug plugin.<br>
With firebug, you can set breakpoints in code, and examine objects (ea.
list all avalible functions on a given object):<br>
<a class="moz-txt-link-freetext" href="http://getfirebug.com/">http://getfirebug.com/</a><br>
<br>
(PS: You will need a FireBug beta for FF3:
<a class="moz-txt-link-freetext" href="http://getfirebug.com/releases/firebug/1.1/firebug-1.1.0b12.xpi">http://getfirebug.com/releases/firebug/1.1/firebug-1.1.0b12.xpi</a>)<br>
<br>
<pre class="moz-signature" cols="72">Regard,. Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Tom Chadwin skrev:
<blockquote cite="mid:17988347.post@talk.nabble.com" type="cite">
  <pre wrap="">This works:

  </pre>
  <blockquote type="cite">
    <pre wrap="">mapFrame.ZoomToView(mapFrame.GetCenter().X, mapFrame.GetCenter().Y, scale)
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Brilliant!

Still, in the spirit of understanding things fully, how does one proceed
using the method you just described? This fails from the scriptFrame:

parent.mapFrame.getLegendCtrl().SetScale(1000);

Thanks for the help.

Tom



Kenneth Skovhede, GEOGRAF A/S wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Arh... you have to call mapFrame.GetLegendCtrl()

Regards, Kenneth Skovhede, GEOGRAF A/S



Tom Chadwin skrev:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi Kenneth

Thanks for the reply. I know the description and diagram are in the
Developers' Guide, but the Legend Palette is not present in either the
list
of frames or the diagram. Is it part of mapFrame? If so, it must be a
frame
within it, since I believe that mapFrame.SetScale() throws an error.

Thanks

Tom



Kenneth Skovhede, GEOGRAF A/S wrote:
  
      </pre>
      <blockquote type="cite">
        <pre wrap="">The viewer frame layout is described in the "MapGuide Developers Guide" 
on page 19:
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/2.0/documentation.html">http://mapguide.osgeo.org/2.0/documentation.html</a>

Regards, Kenneth Skovhede, GEOGRAF A/S



Tom Chadwin skrev:
    
        </pre>
        <blockquote type="cite">
          <pre wrap="">Hello

I cannot work out which frame contains the legend palette functions. I
want
to execute the Viewer API function SetScale from a script in the
scriptFrame, but cannot seem to get the path right.

Can anyone help?

Many thanks

Tom
  
      
          </pre>
        </blockquote>
        <pre wrap="">_______________________________________________
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>
      <pre wrap="">  
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
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>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>