how to add layer Dyanamically?

1/30/2013 4:40:09 AM
Total Posts 4

how to add layer Dyanamically?

Hello,

 

In ASPMAP we show that they used layer statically.It means using AddLayer() Method and in this we statically add layer using Layer=Map1.AddLayer(LayerFolder & "County.shp").

 

But if i want to add dynamically and this is add by admin.

 

How it will be done ?

 

1/30/2013 7:19:11 AM
MVP
Total Posts 323

Re: how to add layer Dyanamically?

Please clarify what do you mean. Any layer is added dynamically, in code.

2/6/2013 12:41:00 AM
Total Posts 4

Re: how to add layer Dyanamically?

 my question is all the layers or map that we want we used or store directly in code file using this syntax.

dim layer as asp

Dim layerfolder as string=mappath("/MAP/parcle.shp")

layer=map.addLayer(Layerfolder & "parcle.shp")

 

but i have not need this.

 

I want to add this layer not using code but directly i select shape files and this shape files add my map folder and then i used one by one.

 

Is that possible ?

 

2/6/2013 1:59:00 AM
MVP
Total Posts 323

Re: how to add layer Dyanamically?

Any shapefile stored on the server can be added by the AddLayer method. The layers in our samples are added by using string constants for demonstartion purposes. You may pass a variable to the method:

map.AddLayer(shpFilePath);

3/16/2013 2:43:24 AM
Total Posts 4

Re: how to add layer Dyanamically?

My Question is I want to add shape files when i upload it.

In samples you provide add shape files using code and that all shape files predefined when you developed the project.

 

I am developing web application in which admin upload shape files when he will use the application not add predefined shape files.

 

Using shape files through upload button and when shape files uploaded on server admin show and analysis on shape files.

 

Is that Possible ?

3/16/2013 2:43:52 AM
Total Posts 4

Can we edit in shape files?

hi,

 

I want to edit in shape files .

 

Is that Possible ?

 

 

3/16/2013 5:48:10 AM
MVP
Total Posts 323

Re: how to add layer Dyanamically?

Shapefiles must reside on the server to be added. How to upload them is up to a developer. Once a shapefile is uploaded, it can be added via the AddLayer method.

Shapefiles cannot be edited currently.