[mapguide-users] R: set filter on layer at runtime make selection tools not work

Franco Caloni franco.caloni at stacec.com
Wed Jul 2 04:30:44 PDT 2014


Thanks Jackie, that solved!
In the page that set the filter I call (after saved the runtime map):


if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(),
"setfilterrefresh"))
	Page.ClientScript.RegisterStartupScript(this.GetType(),
"setfilterrefresh", "top.reloadmappa();", true);


And on the "main" page I create a routine:


function reloadmappa() {
	var mapWidget = Fusion.getWidgetById('Map');
	if (mapWidget && mapWidget.isMapLoaded()) {
                mapWidget.reloadMap();
                mapWidget.redraw();
	}
}

Doing this the widgets work

Franco


> -----Messaggio originale-----
> Da: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-
> bounces at lists.osgeo.org] Per conto di Jackie Ng
> Inviato: martedì 1 luglio 2014 18:55
> A: mapguide-users at lists.osgeo.org
> Oggetto: Re: [mapguide-users] R: set filter on layer at runtime make
> selection tools not work
> 
> Have you triggered a viewer refresh from the Fusion side so that it
> knows about the new layer?
> 
> You can look at the buffer widget for an example of how that's done.
> 
> - Jackie






More information about the mapguide-users mailing list