Avoid error if missing poi name

This commit is contained in:
Gautier P 2021-06-06 14:50:29 +02:00
parent cdac1cc5aa
commit 93b8d36675

View file

@ -244,6 +244,9 @@ public class ServerHandler extends RequestHandler {
{ {
String[] lonLatName = lonLatNameList[i].split(","); String[] lonLatName = lonLatNameList[i].split(",");
if (lonLatName.length != 3)
continue;
OsmNodeNamed n = new OsmNodeNamed(); OsmNodeNamed n = new OsmNodeNamed();
n.ilon = (int)( ( Double.parseDouble(lonLatName[0]) + 180. ) *1000000. + 0.5); n.ilon = (int)( ( Double.parseDouble(lonLatName[0]) + 180. ) *1000000. + 0.5);
n.ilat = (int)( ( Double.parseDouble(lonLatName[1]) + 90. ) *1000000. + 0.5); n.ilat = (int)( ( Double.parseDouble(lonLatName[1]) + 90. ) *1000000. + 0.5);