[mapguide-users] Mapguide Fusion: Enable Maptip widget by default
Jackie Ng
jumpinjackie at gmail.com
Wed Jul 18 07:03:35 PDT 2018
In your template, try modifying your fusionInitialized function like so:
var fusionInitialized = function() {
$('AppContainer').resize({forceResize: true});
var mapWidget = Fusion.getMapById('Map');
mapWidget.registerForEvent(Fusion.Event.MAP_LOADED, initPanelHandler);
//Activate the first maptip UI instance
var maptip = Fusion.Widget.uiInstances.Maptip[0];
if (maptip) {
maptip.mapTipBtn.setActive(true);
if(!Fusion.Widget.Maptip.ActiveInstance) {
maptip.activate();
Fusion.Widget.Maptip.ActiveInstance = maptip;
}
}
}
It's not enough to just activate the widget as the button representing the
widget also needs its active state changed, hence the need to peek inside
the widget internals to get at the button.
Hope that helps.
- Jackie
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
More information about the mapguide-users
mailing list