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:f483daa278/bothlevels.geojson

Created using JOSM and following simple indoor tagging.
This commit is contained in:
akarsh 2017-06-15 20:13:30 +02:00 committed by Emux
parent 34ddf3a005
commit 0d14473132

View File

@ -1,6 +1,7 @@
/*
* Copyright 2014 Hannes Janetzek
* Copyright 2016-2017 devemux86
* Copyright 2017 Akarsh Seggemu
*
* 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;
}