I made polygons editable in Google Maps and now I can change the shape, make holes in it, combine two of more polygons to multipolygons and disaggregate them again.
See http://maps.amsterdam.nl/testshape/beheer and read the Instructions in the Legenda to try it yourself.
One question I can't figure out is how to combine two overlapping polygons to one polygon with no overlap. Something like this:
function(path1, path2) {
algorithm...
return newPath;
}
Thank you.
Thanks a lot for the lib suggestion. I used https://github.com/bjornharrtell/jsts/blob/master/examples/overlay.html with:
to combine shapes and to make holes in shapes or to clip shapes. Therefor I had to convert the Google Maps paths to WKT and I wrote this Javascript:
You can try/see everthing working in http://maps.amsterdam.nl/testshape/beheer (read Instructions in the Legend)