That works great if you put it in the initPanelHandler - thanks Andy!
var initPanelHandler = function()
{
var basemapSwitcherWidget =
Fusion.getWidgetsByType(BasemapSwitcher)[0];
var menuItems = basemapSwitcherWidget.menuItems;
I was eavesdropping on this post because I have had the same question. I
tried Andy's code in the fusionInitialized function and it does set the menu
item to none but the base map has already loaded. A mapReload doesn't
change things. You have to manually select the base map for it to change.
Hi Gordon,
This works:
var basemapSwitcherWidget = Fusion.getWidgetsByType(BasemapSwitcher)[0];
var menuItems = basemapSwitcherWidget.menuItems;
basemapSwitcherWidget.setBasemap('None');
menuItems['None'].setActive(true);
Andy
--
View this message in context:
Still trying to figure this out. I would love to have None by default, but
the rest available to the user.
http://osgeo-org.1560.x6.nabble.com/file/n5076485/mapguide2_5_external_providers.png
--
View this message in context:
Does this work?
var widget = Fusion.getWidgetsByType(BasemapSwitcher)[0];
widget.setBasemap(None);
- Jackie
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/BASEMAPSWTICHER-tp5018001p5076500.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Thanks Jackie, nice job.
Turns off the external provider layer but does not trigger the drop down
event to put the selected icon on None
I wonder how to refresh that
gordon
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/BASEMAPSWTICHER-tp5018001p5076533.html
Hi All,
does anyone know a shortcut (in javascript) to programmatically enable the
NONE in the BASEMAPSWITCHER widget?
I can manually get the oLMap and to turn off all the basemap layers easily:
*map.setBaseLayer(mapWidget.aMaps[0].oLayerOL, false);*
but then the BASEMAPSWITCHER still shows