www.skylinesoft.com Homepage
Forum Home Forum Home > SkylineGlobe General Support > Using SkylineGlobe API
  New Posts New Posts RSS Feed: How to Refresh a layer
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How to Refresh a layer

 Post Reply Post Reply
Author
Message
aeshaq View Drop Down
Visitor
Visitor
Avatar

Joined: November 20 2009
Location: Saudi Arabia
Online Status: Offline
Posts: 2
Post Options Post Options   Quote aeshaq Quote  Post ReplyReply Direct Link To This Post Topic: How to Refresh a layer
    Posted: November 20 2009 at 6:33am

Hi everybody , I want to Refresh a layer programmatically during run time
I’m using IinformationTree to find the layer , and GetLayer Method to get That Layer that i want to refresh
Here is the code 
  
       var ItemID = IInformationTree.FindItem ("mylayername");
      if(IInformationTree.IsLayer(ItemID))
          {
           var mylayer; 
           mylayer = IInformationTree.GetLayer(ItemID);
           mylayer.Refresh();
 
          }

BUT when I run this code , I get a message that the object does not support  this property or methode
Can someone help me ?
Thanks and best regards
Back to Top
Eylon View Drop Down
Skyline Admin Group
Skyline Admin Group
Avatar

Joined: May 05 2003
Location: Israel
Online Status: Offline
Posts: 216
Post Options Post Options   Quote Eylon Quote  Post ReplyReply Direct Link To This Post Posted: November 30 2009 at 9:46am

aeshaq, your code works for me.

Check what line the error refers to and check the variable values.

Here is my full code:

 

<HTML><BODY>

<OBJECT id=TE classid=CLSID:3a4f9191-65a8-11d5-85c1-0001023952c1></OBJECT>
<
FORM name="form0">
<INPUT type="button" value="aaa" name="btnaaa" onclick="aaa();">
</
FORM>
<
script language="javascript" >
function
aaa()
{
IInformationTree = TE.
interface("IInformationTree5");
var ItemID = IInformationTree.FindItem ("mylayername");
if(IInformationTree.IsLayer(ItemID))
{
var mylayer;
mylayer = IInformationTree.GetLayer(ItemID);
mylayer.Refresh();
}
}
</script>
</
BODY>
</
HTML>

Eylon
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.125 seconds.