Update OSMIndoorLayer.java (#364)

The getlevel method does not work for geojson files created without @relations tags.
Here is the example of two levels 1 & 2 file:https://gist.githubusercontent.com/akarsh/a92d1c3be234ab1ff7d2469d511ad03a/raw/f483daa278647c5353a784f0081423474cfc7f17/bothlevels.geojson

Created using JOSM and following simple indoor tagging.
This commit is contained in:
akarsh
2017-06-16 09:19:39 +03:00
committed by Emux
parent 34ddf3a005
commit 0d14473132
@@ -1,6 +1,7 @@
/* /*
* Copyright 2014 Hannes Janetzek * Copyright 2014 Hannes Janetzek
* Copyright 2016-2017 devemux86 * Copyright 2016-2017 devemux86
* Copyright 2017 Akarsh Seggemu
* *
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org). * This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
* *
@@ -168,6 +169,12 @@ public class OSMIndoorLayer extends JeoVectorLayer {
} }
} }
} }
o = f.get("level");
if (o instanceof String) {
return Integer.parseInt((String) o);
}
return 0; return 0;
} }