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

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Tue Feb 23 06:01:29 EST 2010


Yes, its called SetResource, and the code looks correct to me.

Regards, Kenneth Skovhede, GEOGRAF A/S

On 23-02-2010 10:03, SriRam007 wrote:
> there is no "SetResourceContent"
>
>
> forgive me if i m saying wrong...
>
> MgResourceService resourceService =
> siteConnection.CreateService(MgServiceType.ResourceService) as
> MgResourceService;
>
> MgByteReader byteReader = resourceService.GetResourceContent(layerDefResId);
> --For getting the XML
>
> For saving I m doing like this --->
>
> 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);
> map.Save(resourceService);
>
>
>
> thanks
>
>
>
>    


More information about the mapguide-users mailing list