I see the example for server side rendering. Do you have an example that shows how to change the serverLayerOverlay after the map has been loaded, perhaps, when a button is clicked on the map.
Example on server side rendering
Here is my method that gets called over WCF from the client to the server when a button is pressed.
public void UpdateMapImage()
{
CooperWCFServiceClient m_Proxy;
m_Proxy = new CooperWCFServiceClient("CNServer");
MapConfiguration mapconfig = m_Proxy.GetMapParam();
//SilverlightMapConnector1.InitParameters = "UserIP=" + Request.UserHostAddress;
GdiPlusRasterLayer gdiPlusRasterLayer = new GdiPlusRasterLayer(@"C:\Images" + mapconfig.MapFormBaseLayerName); //New Image to update map too
gdiPlusRasterLayer.Open();
RectangleShape mapBoundingBox = gdiPlusRasterLayer.GetBoundingBox();
gdiPlusRasterLayer.Close();
ServerLayerOverlay overlay = new ServerLayerOverlay("UserBaseMap");
overlay.Layers.Add(gdiPlusRasterLayer);
SilverlightMapConnector1.ServerLayerOverlays.Add(overlay); // <<----- Never returns from this.
SilverlightMapConnector1.ServerLayerOverlays.MoveToTop(overlay);
overlay.ServerCache = new ServerCache();
overlay.ServerCache.CacheId = "ActiveCache";
}
Hi Mark,
Does it work for you?
Regards,
Edgar