Reposition Shapefile at Runtime

5 posts, 0 answers
  1. Rebecca
    Rebecca avatar
    8 posts
    Member since:
    Feb 2011

    Posted 06 May 2011 Link to this post

    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
  2. Kineas
    Kineas avatar
    11 posts
    Member since:
    Apr 2011

    Posted 10 May 2011 Link to this post

    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.
  3. DevCraft banner
  4. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 11 May 2011 Link to this post

    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
  5. Jason Horspool
    Jason Horspool avatar
    10 posts
    Member since:
    Oct 2006

    Posted 11 May 2011 Link to this post

    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.
  6. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 13 May 2011 Link to this post

    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
Back to Top
DevCraft banner