[mapguide-users] Initial cursor with Fusion and MGOS 2.1

Paul Spencer pagameba at gmail.com
Thu Jul 9 21:29:53 EDT 2009


This was the way it worked previously but when I just checked the  
code, its not going to work this way any more.  I need to add an easy  
API method for activating a widget programmatically!

Now I think you need to do this:

selectWidget.uiObj.setActive(true);

which will activate the button and call the activate method of the  
widget for you.

Cheers

Paul

On 9-Jul-09, at 8:30 PM, GreenMapSanMiguel wrote:

>
> I am converting my maps to Fusion and would like them to open in  
> 'select'
> mode and use 'select' until the user chooses a different mode.  I've
> succeeded in changing the initial cursor, but am still having some  
> problems
> with it.
>
> Here's my code to activate the select cursor on initialization:
>
> var fusionInitialized = function() {
>    $('AppContainer').resize({forceResize: true});
>
>    var mapWidget = Fusion.getMapById('Map'); // the id of the div
> containing the map
>    var selectWidget=Fusion.getWidgetsByType('Select')[0]; // select  
> the
> first widget of type Select
>    selectWidget.activate(mapWidget);
> }
>
> Here are the problems:
>
> 1.  Although the select cursor appears and it functions in select  
> mode, the
> 'pan' cursor remains highlighted on the toolbar
>
> 2.  After zooming in, the select cursor still appears but it  
> functions in
> pan mode (and the pan cursor is still highlighted on the toolbar.)
>
> There must be something else I need to do to completely switch from  
> 'pan' to
> 'select' mode.  Does anyone know what I'm missing?
>
> Thanks very much!
>
>
>
>
> -- 
> View this message in context: http://n2.nabble.com/Initial-cursor-with-Fusion-and-MGOS-2.1-tp3234992p3234992.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



More information about the mapguide-users mailing list