This is a migrated thread and some comments may be shown as answers.

Reposition Shapefile at Runtime

4 Answers 78 Views
Map
This is a migrated thread and some comments may be shown as answers.
Rebecca
Top achievements
Rank 1
Rebecca asked on 06 May 2011, 09:44 PM
Hello,

I'd like create a map that contains a shapefile with several shapes (similar to the usa states sample.)  When a user selects a shape, I'd like the application to load in another shape with the selected shape and then be able to drag/drop that shapefile to a new position.  The shapefiles seem to load according to their lat/long positions provided within the DBF.  Is it possible to modify those values within the DBF at run time?  If so, is there a sample of this?  Or is there a more direct approach where the shapefile can be positioned with location values like a hotspot would be positioned?

Thanks,
Rebecca

4 Answers, 1 is accepted

Sort by
0
Kineas
Top achievements
Rank 1
answered on 10 May 2011, 01:33 PM
Just fyi, the geometry is kept in the shp file, not the dbf. I don't think you can modify that data and then consider retrieving it. I think they wrote only a decoder for it, nothing else. What you should do is modify the geometries on the client and send the modifications to the server. There you should manipulate somehow the shp file. The ogr opensource library can be a good alternative, but I would say to use a database (postgresql with postgis is simple to use) and do the modifications there and then generate the shp file at client request. You can do so either by using utilitaries from postgis or a server that does that (geoserver comes to mind, also free). But if you want to keep the modifications on the server too I think it's the only way to go.
0
Andrey
Telerik team
answered on 11 May 2011, 10:02 AM
Hello Rebecca,

Unfortunately the map control does not allow to update the shape files (.shp or .dbf).
Also the dbf file contains additional information about shapes only. All shapes with their geographic coordinates are contained inside the shp file.
For more information about shapefiles support you can take a look at the following documantation topic:
http://www.telerik.com/help/silverlight/radmap-features-shapefiles-support.html
Also you can use the following article to learn more about the ESRI shapefiles:
http://en.wikipedia.org/wiki/Shapefile

Best wishes,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason Horspool
Top achievements
Rank 1
answered on 11 May 2011, 09:01 PM
Just to confirm, you aren't planning on adding this support anytime soon?  We are currently evaluating various third party controls and need to be able to add shapes to existing shape files on the fly.
0
Andrey
Telerik team
answered on 13 May 2011, 07:37 AM
Hi Jason,

We aren't planning to add the ability to edit ESRI shape files in our control in the nearest future. I will make sure it is reconsidered when discussing our future plans, but I am afraid no certain time frame can be given at the moment.

All the best,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Rebecca
Top achievements
Rank 1
Answers by
Kineas
Top achievements
Rank 1
Andrey
Telerik team
Jason Horspool
Top achievements
Rank 1
Share this question
or