Jason,
Not all widgets have an activateTool method (maybe they should?), and
for the Pan widget that just calls mapWidget.activateWidget. It's
probably best to call mapWidget.activateWidget because the mapWidget
keeps track of which widget is currently active, so that only one
mutually exclusive widget will be active at a time.
Documenting th API is a matter of applying the time and resources to
that issue. mapWidget.activateWidget() would be the preferred API to
use in my opinion.
Mike
Jason Birch wrote:
Mike,
In the Nanaimo CemeteryMap, I think Paul did something like this:
Fusion.getWidgetsByType('Pan')[0].activateTool();
Could this just be added to the initialized callback, or is it an
undocumented function (heh, as opposed to all the other undocumented
documented functions) that shouldn't be encouraged?
Jason
-----Original Message-----
From: Mike Adair
Subject: Re: [mapguide-users] fusion - default tool selected?
Andrew,
Testing that code snippet doesn't work for me because the
activateWidget() method is only defined on the MapWidget.
A more generic solution for this would be to add an
<Activated>true</Activated> element for widgets in the
ApplicationDefinition file. Currently there is a <Disabled> property
for widgets to disable widgets on startup, this would be something
similar.
Mike
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users