iOS Question xSD_OpenMaps Creating a hole in a polygon

Davisbc

Member
Licensed User
Does anyone know how to create a hole in a map polygon? I assume i can overlay a second polygon (the hole) on top of the original but i would expect the top polygon fill would combine with the original and look abnormal. This is a normal feature of geoJson, and i assume other exchange formats. The B4A google maps also supports this but not the b4i version.

Thanks in advance,
B
 

Attachments

  • polygon with hole.png
    polygon with hole.png
    107.3 KB · Views: 31

Sandman

Expert
Licensed User
Longtime User
Someone here will surely know the exact answer (and I feel like I've known this, but forgot). But I do know how holes in font characters work, and perhaps it's the same here?

If so, it's only a matter of making sure that the points in the inner polygon goes in the other direction from the outer polygon.

Meaning, if the outer polygon has its points clockwise, the inner one should have its points counterclockwise.
 
Upvote 0

Davisbc

Member
Licensed User
GoogleMapsExtra for B4A does have method to add a polygon hole. B4i does not, as far as i can tell. The question above was about OpenMaps, which does not seem to handle accounting for a polygon hole. The question was really directed to Stardust (the developer) to see if he had a idea how to represent the polygon hole (example above in initial post.

Thanks,
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
You can create a hole by creating a polygon similar to a closed (or almost closed) U,

OpenMap involves the creation of polygons with a hole inside, passing as parameters the list of points of the external polygon and then of the internal one.
It is not currently implemented. It will probably be available in the future but not now because it requires modification and testing of the code which is challenging for me
 
Upvote 0
Top