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

2010-02-23 Thread SriRam007
Thank u very much to both of u Kenneth Skovhede, GEOGRAF A/S And zspitzer Really u both helped me a lot. Specially Kenneth Skovhede And here is the Full and Final Code Everyone can use it Utility.InitializeWebTier(Request); string myLayerName = ddlLayer.SelectedItem.Text.ToS

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

2010-02-23 Thread Kenneth Skovhede, GEOGRAF A/S
The change should be "permanent" until the end of the session (eg. press F5 or similar). If you want every new session to use the label, you have to modify the MapDefinition to use the modified layer. In this case, it is easiest to simply modify the LayerDefinition Xml. Open, modify, save. Whe

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

2010-02-23 Thread SriRam007
thank u very much for ur very quick reply Now Its changing the feature label but temporarly. Can't we make it permanently. thanks -- View this message in context: http://n2.nabble.com/Is-it-Possible-to-set-Feature-Label-for-a-layer-dynamically-tp4590194p4618447.html Sent from the MapGuide

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

2010-02-23 Thread Kenneth Skovhede, GEOGRAF A/S
The second to last line, you set the layer to point at the original, not the copy. Change the line to: layer.SetLayerDefinition(layerResId, resourceService); Regards, Kenneth Skovhede, GEOGRAF A/S On 23-02-2010 12:39, SriRam007 wrote: Utility.InitializeWebTier(Request); string myLayer

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

2010-02-23 Thread SriRam007
Utility.InitializeWebTier(Request); string myLayerName = "Districts"; MgUserInformation userInfo = new MgUserInformation(Session["ID"].ToString()); MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo); MgResou

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

2010-02-23 Thread SriRam007
Utility.InitializeWebTier(Request); string myLayerName = "Districts";//layerSelect.Value.ToString() //args = Utility.GetRequestParameters(Request); //Query Qry = new Query(args); MgUserInformation userInfo = new MgUserInformation(Session["ID"].ToString());

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

2010-02-23 Thread SriRam007
MgResourceService resourceService = siteConnection.CreateService(MgServiceType.ResourceService) as MgResourceService; MgResourceIdentifier resId = new MgResourceIdentifier(layer.GetFeatureSourceId()); MgResourceIdentifier layerDefResId = layer.GetLayerDefinition(); MgByteReader byt

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

2010-02-23 Thread Kenneth Skovhede, GEOGRAF A/S
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.Resour

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

2010-02-23 Thread SriRam007
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 savi

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

2010-02-23 Thread Kenneth Skovhede, GEOGRAF A/S
Yes, you should change the node for the 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 GetResourceC

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

2010-02-22 Thread SriRam007
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. "Key" :: "Name" I just replaced "Nam

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

2010-02-19 Thread SriRam007
Thank u very much for ur reply Now I m trying according to u. If i get success i will post here all the code. thanks -- View this message in context: http://n2.nabble.com/Is-it-Possible-to-set-Feature-Label-for-a-layer-dynamically-tp4590194p4597444.html Sent from the MapGuide Users mailing lis

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

2010-02-19 Thread Kenneth Skovhede, GEOGRAF A/S
If you look at the second link (to the documentation), the method "SetLayerDefinition" can make the layer point to another resource. As with the first example, you need to make a copy of the LayerDefinition xml. If you just modify the LayerDefinition xml without making a copy, the change will

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

2010-02-19 Thread SriRam007
All the link what u have given are for a new layer which is working fine and I got some help from Buffer.aspx page. But I want to change feature label for an existing layer. The layer is having 3 fields like (Id,Name,Adress) Currently its showing Id in the map. But i want to change it to name

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

2010-02-19 Thread Kenneth Skovhede, GEOGRAF A/S
http://lists.osgeo.org/pipermail/mapguide-users/2009-January/016165.html Yes, it is in PHP. Given that you have asked for this numerous times, and had no response, its very likely that no one has what you are asking for. Using the above link, you can see what you need to do, but in php. You will

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

2010-02-18 Thread SriRam007
Can u please post the exact link I went through all the link but still not getting anything which will be useful for me. I am using C#.Net and Javascript but some links are in PHP and some diffeerent topic are also comming i did not get which one should i use and which should be my first step

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

2010-02-18 Thread SriRam007
Can u please post the exact link I went through all the link but still not getting anything which will be useful for me. I am using C#.Net and Javascript but some links are in PHP and some diffeerent topic are also comming i did not get which one should i use and which should be my first Here

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

2010-02-18 Thread Kenneth Skovhede, GEOGRAF A/S
Please look at search result number #2, it does not mention MaestroAPI. Regards, Kenneth Skovhede, GEOGRAF A/S On 18-02-2010 11:16, SriRam007 wrote: ell u that i m not using maestro api. I have only Mapguide Open source. Can it be done by using .net and Javascript

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

2010-02-18 Thread SriRam007
Sorry i forget to tell u that i m not using maestro api. I have only Mapguide Open source. Can it be done by using .net and Javascript thanks. -- View this message in context: http://n2.nabble.com/Is-it-Possible-to-set-Feature-Label-for-a-layer-dynamically-tp4590194p4590960.html Sent from the

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

2010-02-17 Thread Zac Spitzer
http://www.google.com.au/search?hl=en&q=mapguide+runtime+map On Thu, Feb 18, 2010 at 6:12 PM, SriRam007 wrote: > > thanks for ur quick reply > > Can u please give some more idea and some sample code for this... > > thanks > > -- > View this message in context: > http://n2.nabble.com/Is-it-Possib

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

2010-02-17 Thread SriRam007
thanks for ur quick reply Can u please give some more idea and some sample code for this... thanks -- View this message in context: http://n2.nabble.com/Is-it-Possible-to-set-Feature-Label-for-a-layer-dynamically-tp4590194p4590389.html Sent from the MapGuide Users mailing list archive at Nabb