react-native-maps-osmdroid
react-native-maps-osmdroid copied to clipboard
Polygon holes
Is any chance to support polygon holes on android?
I added this function:
`
public void setHoles(ReadableArray holes) {
this.holes = new ArrayList<>(holes.size());
for (int i = 0; i < holes.size(); i++) {
ReadableArray hole = holes.getArray(i);
List<GeoPoint> coordinates = new ArrayList<>(hole.size()+1);
for (int j = 0; j < hole.size(); j++) {
ReadableMap coordinate = hole.getMap(j);
coordinates.add(j,
new GeoPoint(coordinate.getDouble("latitude"), coordinate.getDouble("longitude")));
}
coordinates.add(coordinates.get(0));
this.holes.add(coordinates);
}
if (polygon != null) {
polygon.setHoles(this.holes);
mapView.invalidate();
}
}`
But it doesn't work.
It is not implemented yet.
As seem here osmdroid already added support. So, i just need to add it to the lib.
Added to my backlog here.
PRs are accepted also. ;-)
Any chance that you will be able to add it soon?