[mapguide-users] Re: getWidgetById() function returns a null value
Zac Spitzer
zac.spitzer at gmail.com
Thu Oct 13 04:12:02 EDT 2011
ideally, in your window.onload handler, use the following event
Fusion.registerForEvent(Fusion.Event.FUSION_INITIALIZED, function() {
var map = Fusion.getMapByIndice(0); // or getMapById()
map.registerForEvent(Fusion.Event.MAP_SELECTION_ON, handleSelection);
map.registerForEvent(Fusion.Event.MAP_SELECTION_OFF, clearSelection);
map.registerForEvent(Fusion.Event.MAP_EXTENTS_CHANGED, updateHashBookmarks);
});
On Thu, Oct 13, 2011 at 7:09 PM, Iulia Tamas <iulia_tamas30 at yahoo.com> wrote:
> Thank you very much Gordon. After adding a timeout, the problem didn't
> reproduce anymore!
>
> ________________________________
> From: GordonL <gordon.luckett at arrowgeomatics.com>
> To: mapguide-users at lists.osgeo.org
> Sent: Thursday, October 13, 2011 4:10 AM
> Subject: [mapguide-users] Re: getWidgetById() function returns a null value
>
> If you only run this once, you might miss the object. You might want to set
> a timeout and try again.
>
> gordon
>
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/getWidgetById-function-returns-a-null-value-tp6885405p6887284.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
More information about the mapguide-users
mailing list