fromLatLongs static method
@param latLongs the coordinates list.
Implementation
static BoundingBox fromLatLongs(List<ILatLong> latLongs) {
double minLatitude = double.infinity;
double minLongitude = double.infinity;
double maxLatitude = double.negativeInfinity;
double maxLongitude = double.negativeInfinity;
for (ILatLong latLong in latLongs) {
double latitude = latLong.latitude;
double longitude = latLong.longitude;
minLatitude = min(minLatitude, latitude);
minLongitude = min(minLongitude, longitude);
maxLatitude = max(maxLatitude, latitude);
maxLongitude = max(maxLongitude, longitude);
}
// Projection.checkLatitude(minLatitude);
// Projection.checkLongitude(minLongitude);
// Projection.checkLatitude(maxLatitude);
// Projection.checkLongitude(maxLongitude);
return BoundingBox(minLatitude, minLongitude, maxLatitude, maxLongitude);
}