We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I want to change radius online and then I use with setHoles. But signature of this function is List<? extends List>
I tried it: private static List<? extends List> createHole2(LatLng center, float radius) { int points = 50; // number of corners of inscribed polygon
double radiusLatitude = Math.toDegrees(radius / (float) EARTH_RADIUS); double radiusLongitude = radiusLatitude / Math.cos(Math.toRadians(center.latitude)); List<? extends List<LatLng>> result = new ArrayList<>(points); double anglePerCircleRegion = 2 * Math.PI / points; for (int i = 0; i < points; i++) { double theta = i * anglePerCircleRegion; double latitude = center.latitude + (radiusLatitude * Math.sin(theta)); double longitude = center.longitude + (radiusLongitude * Math.cos(theta)); List <LatLng> l = new ArrayList<>(); l.add(new LatLng(latitude, longitude)); result.add(l); } return result; }
But I got error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I want to change radius online and then I use with setHoles.
But signature of this function is List<? extends List>
I tried it:
private static List<? extends List> createHole2(LatLng center, float radius) {
int points = 50; // number of corners of inscribed polygon
But I got error
The text was updated successfully, but these errors were encountered: