use of org.opennms.features.poller.remote.gwt.client.utils.BoundsBuilder in project opennms by OpenNMS.
the class OpenLayersMapPanel method toGWTBounds.
private static GWTBounds toGWTBounds(final Bounds fromBounds) {
if (fromBounds == null) {
return new GWTBounds(-180, -90, 180, 90);
}
final Bounds bounds = fromBounds.transform(PROJECTION_SPHERICAL_MERCATOR, PROJECTION_LAT_LON);
BoundsBuilder bldr = new BoundsBuilder();
bldr.extend(Math.max(-90, bounds.getLowerLeftY()), Math.max(-180, bounds.getLowerLeftX()));
bldr.extend(Math.min(90, bounds.getUpperRightY()), Math.min(180, bounds.getUpperRightX()));
return bldr.getBounds();
}
Aggregations