Hot answers tagged


You can start with geotools tutorials, which is helpful for beginners. It provides an introduction to GIS workshop making use of examples from GeoTools and other Java libraries.


You need to close the polygon by adding the start point to the end of the list of points that you build the WKT with. So change it to: for (var z = 0; z < arreglo.length; z++) { arreglo2.push(arreglo[z][0]+" "+arreglo[z][1]); } arreglo2.push(arreglo[0][0]+" "+arreglo[0][1]); But I'm pretty sure you can use the OpenLayers WKT ...


That note is over 7 years old so things have moved on a little since then :-) For current best practice you should look at the org.geotools.swing.tool package in the unsupported swing module. As far as I can see the idiom is to work directly on the MapPane passed in at construction.

Only top voted, non community-wiki answers of a minimum length are eligible