![]() |
How to use the method SetValue() of ILayer |
Post Reply
|
| Author | |
alien
Visitor
Joined: April 14 2010 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Topic: How to use the method SetValue() of ILayerPosted: July 22 2010 at 11:11am |
|
How to use the method SetValue() of ILayer to classify the attribute?
Now I have a imageLabel point layer, I want to use ILayer.SetValue() method to classify the attribute of scale according to point layer attribute.
Following is my code(in javascript):
var itemId = IInformationTree.FindItem("mk_pt.shp");
var classStr = "<Classification><Class>" + "<Condition><#text>\"[Text]\"=\"testString\"</#text></Condition>" + "<Value><#text>100</#text></Value>" + "</Class>" + "<DefaultValue><#text>0</#text></DefaultValue>" + "</Classification>"; IInformationTree.GetLayer(itemId).SetFeature(); IInformationTree.GetLayer(itemId).SetValue("Scale",1,classStr); But there is an error, which is "A name was started with an invalid charactor". WHY?
|
|
![]() |
|
Eylon
Skyline Admin Group
Joined: May 05 2003 Location: Israel Status: Offline Points: 263 |
Post Options
Thanks(0)
Quote Reply
Posted: August 12 2010 at 3:17pm |
|
Try setting the classification you wish in the TerraExplorer Pro's GUI, then use GetValue to see the proper syntax of the classification XML.
|
|
|
Eylon
|
|
![]() |
|
Post Reply
|
|
|
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |