react-native-maps-osmdroid icon indicating copy to clipboard operation
react-native-maps-osmdroid copied to clipboard

Polygon holes

Open LMarcinkowski opened this issue 5 years ago • 2 comments

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.

LMarcinkowski avatar May 19 '19 22:05 LMarcinkowski

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. ;-)

fqborges avatar May 21 '19 12:05 fqborges

Any chance that you will be able to add it soon?

LMarcinkowski avatar May 31 '19 13:05 LMarcinkowski