mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 06:08:51 +00:00
OeffiMapView: Prevent IndexOutOfBoundsException.
This commit is contained in:
parent
aa4bed07f4
commit
aa445c460e
1 changed files with 4 additions and 1 deletions
|
@ -607,7 +607,10 @@ public class OeffiMapView extends MapView {
|
|||
}
|
||||
|
||||
public void zoomToStations(final List<Station> stations) {
|
||||
// show at least 16 stations
|
||||
if (stations.isEmpty())
|
||||
return;
|
||||
|
||||
// show at most 16 stations
|
||||
final List<GeoPoint> points = new LinkedList<>();
|
||||
for (final Station station : stations) {
|
||||
points.add(new GeoPoint(station.location.getLatAsDouble(), station.location.getLonAsDouble()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue