This commit is contained in:
Arndt Brenschede 2019-02-25 09:08:23 +01:00
commit 0ca83f5bfc

View file

@ -271,7 +271,8 @@ public class ServerHandler extends RequestHandler {
if ( lonLatList.length > 1 )
{
OsmNogoPolygon polygon = new OsmNogoPolygon(closed);
for (int j = 0; j < lonLatList.length-1;)
int j;
for (j = 0; j < 2 * (lonLatList.length / 2) - 1;)
{
String slon = lonLatList[j++];
String slat = lonLatList[j++];
@ -279,6 +280,9 @@ public class ServerHandler extends RequestHandler {
int lat = (int)( ( Double.parseDouble(slat) + 90. ) *1000000. + 0.5);
polygon.addVertex(lon, lat);
}
if (j < lonLatList.length) {
polygon.nogoWeight = Double.parseDouble( lonLatList[j] );
}
if ( polygon.points.size() > 0 )
{
polygon.calcBoundingCircle();