15

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?

3 Answers 3

11

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.

3
  • 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. Commented Mar 3, 2015 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
    Commented Oct 26, 2015 at 3:26
  • github.com/clydedacruz/openstreetmap-wkt-playground. WKT playground on OpenstreetMap Commented Mar 7, 2018 at 9:22
7

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.

2
  • 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
    Commented May 14, 2013 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. Commented May 14, 2013 at 2:53
1

Just to provide an updated answer for anyone new coming to this question:

  • https://wktmap.com/ is a simple online editor for WKT geometries. Allows you to paste in WKT or draw shapes and generate WKT from them. It to use different coordinate reference systems, export the geometry to WKB, etc.
  • https://wkbrew.tszheichoi.com/ is a converter and editor for WKT, and allows you to export to a wider variety of formats, including GeoJSON.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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