Merge pull request #308 from bagage/fix-empty-poi

Avoid error if missing poi name
This commit is contained in:
afischerdev 2021-09-05 17:02:14 +02:00 committed by GitHub
commit 85f9df6cb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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