[mapguide-users] Call legend palette method from scriptFrame

Tom Chadwin tom.chadwin at nnpa.org.uk
Thu Jun 19 04:18:43 EDT 2008




Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> If you call SetScale on the legend, it will display the legend as if the 
> map was in that scale.
> That is probably not what you want.
> 

No, indeed it isn't. I am using ExecuteMapAction to zoom to a selection, but
when the selection is a point object, the viewer is zoomed in so far that
there is no context visible, and one has to zoom out a long way before one
can see any other features. I therefore simply wanted to change the scale of
the map after zooming to the selection.


Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> Javascript is case sensitive, you must use GetLegendCtrl(), not 
> getLegendCtrl().
> 

My error - apologies. There is now no error thrown, so presumably the method
is being called successfully. However, what on earth does it actually do?
What, in real terms, does it mean to change the scale of the legend? I
assumed that SetScale() was simply an easy way to change the scale of the
map, without having to bother with the coordinates, but plainly this is not
the case.

Thanks for all your help, though. The method you described works perfectly
for me.

Cheers

Tom
-- 
View this message in context: http://www.nabble.com/Call-legend-palette-method-from-scriptFrame-tp17986614p17999653.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list