Loading play-services-core/src/main/java/org/microg/gms/maps/GmsMapsTypeHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ public class GmsMapsTypeHelper { double maxLon = MercatorProjection.toLongitude(box.xmax); double minLat = MercatorProjection.toLatitude(box.ymax); double maxLat = MercatorProjection.toLatitude(box.ymin); if (Double.isNaN(minLon) || Double.isNaN(maxLon) || Double.isNaN(minLat) || Double.isNaN(maxLat)) minLon = maxLon = minLat = maxLat = 0; return new LatLngBounds(new LatLng(minLat, minLon), new LatLng(maxLat, maxLon)); } Loading play-services-core/src/main/java/org/microg/gms/maps/ProjectionImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import org.oscim.map.Viewport; public class ProjectionImpl extends IProjectionDelegate.Stub { private Viewport viewport; private float[] extents = new float[8]; public ProjectionImpl(Viewport viewport) { this.viewport = viewport; Loading @@ -51,6 +52,8 @@ public class ProjectionImpl extends IProjectionDelegate.Stub { @Override public VisibleRegion getVisibleRegion() throws RemoteException { viewport.getMapExtents(extents, 0); // TODO: Support non-flat map extents return new VisibleRegion(GmsMapsTypeHelper.toLatLngBounds(viewport.getBBox(null, 0))); } } play-services-core/src/main/java/org/microg/gms/maps/markup/PolygonImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,10 @@ public class PolygonImpl extends IPolygonDelegate.Stub implements DrawableMarkup for (LatLng point : options.getPoints()) { points.add(GmsMapsTypeHelper.fromLatLng(point)); } if (points.size() < 3 || (points.size() == 3 && points.get(2).equals(points.get(0)))) { // Need at least 3 distinguished points to draw a polygon return null; } // TODO: holes return new PolygonDrawable(points, Style.builder() .fillAlpha(1) Loading Loading
play-services-core/src/main/java/org/microg/gms/maps/GmsMapsTypeHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ public class GmsMapsTypeHelper { double maxLon = MercatorProjection.toLongitude(box.xmax); double minLat = MercatorProjection.toLatitude(box.ymax); double maxLat = MercatorProjection.toLatitude(box.ymin); if (Double.isNaN(minLon) || Double.isNaN(maxLon) || Double.isNaN(minLat) || Double.isNaN(maxLat)) minLon = maxLon = minLat = maxLat = 0; return new LatLngBounds(new LatLng(minLat, minLon), new LatLng(maxLat, maxLon)); } Loading
play-services-core/src/main/java/org/microg/gms/maps/ProjectionImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import org.oscim.map.Viewport; public class ProjectionImpl extends IProjectionDelegate.Stub { private Viewport viewport; private float[] extents = new float[8]; public ProjectionImpl(Viewport viewport) { this.viewport = viewport; Loading @@ -51,6 +52,8 @@ public class ProjectionImpl extends IProjectionDelegate.Stub { @Override public VisibleRegion getVisibleRegion() throws RemoteException { viewport.getMapExtents(extents, 0); // TODO: Support non-flat map extents return new VisibleRegion(GmsMapsTypeHelper.toLatLngBounds(viewport.getBBox(null, 0))); } }
play-services-core/src/main/java/org/microg/gms/maps/markup/PolygonImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,10 @@ public class PolygonImpl extends IPolygonDelegate.Stub implements DrawableMarkup for (LatLng point : options.getPoints()) { points.add(GmsMapsTypeHelper.fromLatLng(point)); } if (points.size() < 3 || (points.size() == 3 && points.get(2).equals(points.get(0)))) { // Need at least 3 distinguished points to draw a polygon return null; } // TODO: holes return new PolygonDrawable(points, Style.builder() .fillAlpha(1) Loading