Skip to content
New issue

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

Polygon holes #3

Open
LMarcinkowski opened this issue May 19, 2019 · 2 comments
Open

Polygon holes #3

LMarcinkowski opened this issue May 19, 2019 · 2 comments

Comments

@LMarcinkowski
Copy link

LMarcinkowski commented May 19, 2019

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.

@fqborges
Copy link
Owner

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

@LMarcinkowski
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants