Sunday, 9 October 2016

editing - Seeking online WKT editor?


We need to do are very simple administrative boundary drawings over a (insert fav map here) via some website.


Our requirements are:



  1. click to create points which then form a polygon

  2. drag existing points to edit a polygon



I know Google Maps and others can do all of this but we are hoping to leverage an existing site that can already offer this.


We would also love to 'load' some WKT data, so we can edit that (if required), where load means paste into a textbox.


Anyone know of any sites out there with this functionality?



Answer



You can do this with OpenLayers.


Please have a look at the Vector Format's sample. Just select 'Well Known Text' from the drop down, and draw your shape. You will get your shape in WKT format.


For the Editing/Modifying functionality, have a look at the Modify Feature Example. This shows how you can modify an existing geometry.


You could copy the code to from both these examples to your own server and Integrate and edit it if required.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...