[mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically

SriRam007 binod_tripathy at yahoo.co.in
Tue Feb 23 06:31:34 EST 2010


MgResourceService resourceService =
siteConnection.CreateService(MgServiceType.ResourceService) as
MgResourceService;
MgResourceIdentifier resId = new
MgResourceIdentifier(layer.GetFeatureSourceId());
        MgResourceIdentifier layerDefResId = layer.GetLayerDefinition();
        MgByteReader byteReader =
resourceService.GetResourceContent(layerDefResId);

        string layerDefinition = ReplaceXMLValue(byteReader);

        MgResourceIdentifier layerResId = new
MgResourceIdentifier("Session:" + Session["ID"].ToString() +
"//Districts.LayerDefinition");
        MgByteReader reader = new MgByteReader(layerDefinition, "text/xml");
        resourceService.SetResource(layerResId, new
MgByteReader(layerDefinition, "text/xml"), null);
        layer.SetLayerDefinition(layerDefResId, resourceService); --->Any
correction require here        map.Save(resourceService);



please tell me where i went wrong.

-- 
View this message in context: http://n2.nabble.com/Is-it-Possible-to-set-Feature-Label-for-a-layer-dynamically-tp4590194p4618316.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list