www.skylinesoft.com Homepage
Forum Home Forum Home > SkylineGlobe Enterprise Products > TerraExplorer for Developers
  New Posts New Posts RSS Feed - how to CreateNewFeatureLayer use the ICreator6 in
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to CreateNewFeatureLayer use the ICreator6 in

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


Joined: December 23 2010
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote zdpiaopiao Quote  Post ReplyReply Direct Link To This Post Topic: how to CreateNewFeatureLayer use the ICreator6 in
    Posted: August 21 2011 at 3:23am
hi,
    when use the  ICreator6  to CreateNewFeatureLayer
the help
CreateFeatureLayer(

      string layerName,

      string sConnectionString,

      int     lParentGroupID)

 How to construct the  Parameter  sConnectionString ?
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 21 2011 at 9:22am
In the programmer's guide, see Overview -> How To -> Feature Layers.
Eylon
Back to Top
zdpiaopiao View Drop Down
Visitor
Visitor


Joined: December 23 2010
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote zdpiaopiao Quote  Post ReplyReply Direct Link To This Post Posted: August 23 2011 at 2:01am
sorry , I made a mistake,the Function is CreateNewFeatureLayer  not CreateFeatureLayer
 the CreateFeatureLayer  is used to load feature ,i want to creat new  feature layer
use the follow function:
CreateNewFeatureLayer(

      string             layerName,

      LayerGeometryType LayerGeomType,

      string             sConnectionString,

      int                lParentGroupID)

 so the how to use the sConnectionString ?
Back to Top
zdpiaopiao View Drop Down
Visitor
Visitor


Joined: December 23 2010
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote zdpiaopiao Quote  Post ReplyReply Direct Link To This Post Posted: September 01 2011 at 5:46am

Some people know  to the CreateNewFeatureLayer ?so

How to construct the  Parameter  sConnectionString ?
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: September 01 2011 at 1:17pm
To create a new point layer use the following:
 
ILayer6 TestNewLayer;

string SimpleAttribConnectionString = @"FileName=NewShape;TEPlugName=OGR;";

TestNewLayer = this.globe.Creator.CreateNewFeatureLayer("NewShape", LayerGeometryType.LGT_POINT, SimpleAttribConnectionString, 0);

TestNewLayer.Load();

 
 
This will create a new shape file named NewShape.fly in your app data (e.g. C:\Users\Administrator\AppData\Roaming\Skyline\TerraExplorer)
Eylon
Back to Top
Neil View Drop Down
Visitor
Visitor


Joined: August 06 2010
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Neil Quote  Post ReplyReply Direct Link To This Post Posted: September 07 2011 at 9:56am
Hi,Eylon

Could I locate this new shp file in another folder ,but not the default app data folder? how?Smile

thanks
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 (1) Thanks(1)   Quote Eylon Quote  Post ReplyReply Direct Link To This Post Posted: September 08 2011 at 10:22am

Since TerraExplorer runs in embedded environments, including web browsers, it must remain “Safe for scripting”.

As a result, its API cannot allow saving to a location on the disc that is different than the application data for TerraExplorer.

If you are running from an embedding application (and not IE), you can use a file system API to move it to where you want after it was created.

 

Eylon
Back to Top
zdpiaopiao View Drop Down
Visitor
Visitor


Joined: December 23 2010
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote zdpiaopiao Quote  Post ReplyReply Direct Link To This Post Posted: September 13 2011 at 5:45am
Hi ,Eylon Thank you for your help!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.391 seconds.