Merge branch 'master' of https://github.com/abrensch/brouter
This commit is contained in:
commit
0ca83f5bfc
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue