[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 03:32:02 EST 2010
Yes, you should change the <Text> node for the <Label> element.
The xml format is not as documented as it should be, but there are some
xsd files
in the MapGuide folder that explains the technical format.
To save the resource, simply call SetResourceContent,
much in the same way that you called GetResourceContent to
get the xml.
6) is layer.SetLayerDefinition(...) (MgLayer::SetLayerDefinition)
7) map.Save(...) (MgMap::Save)
8) GetMap().Refresh()
Regards, Kenneth Skovhede, GEOGRAF A/S
On 23-02-2010 08:17, SriRam007 wrote:
> hi,
>
> Upto 5th step is done. I got the LayerDefinition in XML format and modified
> the "text" tag but Could u please explain the 6th step little more. I m not
> getting what exactly i need to do.
>
> I am not sure should i change the "Text" tag for changing the label.
> <Text>"Key"</Text> ::<Text>"Name"</Text>
> I just replaced "Name" in place of "Key".
> "Name" is a another property.
>
> Finally i got that modified XML file in a string. Please guide me for the
> remaining steps
>
> 6) Make the layer from step 2 point to the copy of the LayerDefinition
> from step 5 (link 2)
> 7) Save the MgMap instance from step 1
> 8) Refresh the map on the client (developer guide)
>
> thanks
>
More information about the mapguide-users
mailing list