[mapguide-users] change layer definition runtime

Liglio liglio at pobox.com
Thu Sep 8 15:54:28 PDT 2016


You have to refresh the map using javascript.

Put in UtilMap class:
        /// <summary>
        /// Refresh the Map in the Client using JavaScrit
        /// </summary>
        /// Page Object calling this method
        public void RefreshMapClient(Page objPage)
        {
            try
            {
                string strScript = "";

                strScript += "" + "\r\n";

                // Detect if the page has ScriptManager
                if (System.Web.UI.ScriptManager.GetCurrent(objPage) == null)
                   
objPage.ClientScript.RegisterStartupScript(objPage.GetType(),
"RefreshMapClient", strScript, false);
                else
                   
System.Web.UI.ScriptManager.RegisterStartupScript(objPage,
objPage.GetType(), "RefreshMapClient", strScript, false);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }


Put in the your page server-side, after setting the filter layer:
objUtilMap.RefreshMapClient(this);





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/change-layer-definition-runtime-tp5284382p5284858.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list