www.skylinesoft.com Homepage
Forum Home Forum Home > SkylineGlobe Enterprise Products > TerraExplorer for Developers
  New Posts New Posts RSS Feed - How to use the method SetValue() of ILayer
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to use the method SetValue() of ILayer

 Post Reply Post Reply
Author
Message
alien View Drop Down
Visitor
Visitor


Joined: April 14 2010
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote alien Quote  Post ReplyReply Direct Link To This Post Topic: How to use the method SetValue() of ILayer
    Posted: 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?
Back to Top
Eylon View Drop Down
Skyline Admin Group
Skyline Admin Group
Avatar

Joined: May 05 2003
Location: Israel
Status: Offline
Points: 263
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eylon Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.047 seconds.