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?

up vote 7 down vote accepted

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.

  • Ah interesting :) Problems. 1) that map is not google :( 2) tiny map. Any other sites that might do this but have it on a bigger map and it's a google map? – Pure.Krome May 14 '13 at 2:25
  • You can copy the code on your system, and edit it to have: 1)Larger size, 2)Google Maps as the background. I don't recollect a ready made solution for you. – Devdatta Tengshe May 14 '13 at 2:53

Take a look at Wicket, it's awesome:

http://arthur-e.github.io/Wicket/sandbox-gmaps3.html

The demo sandbox might be enough for you, if not you could probably use it to develop a simple Javascript app.

  • 1
    Wicket seems to have issues with larger WKT files, i found orielo.com/projects/wkt2geojson to process almost any size of WKT and a bonus preview of the resulted GeoJson. – Dementic Mar 3 '15 at 15:48
  • Unfortunately the wicket page linked above is overly tolerant of things like missing parenthesis (it's perfectly happy to draw you a nice triangle with POLYGON(( 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 0.0) for example!) it's not particularly useful if you are trying to ensure that the WKT shapes will subsequently work in other places. – Gus Oct 26 '15 at 3:26
  • github.com/clydedacruz/openstreetmap-wkt-playground. WKT playground on OpenstreetMap – Clyde D'Cruz Mar 7 at 9:22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.