TownyAdvanced / MapTowny

A Towny add-on Bukkit plugin that enables towns to show up on a web-map.
MIT License
15 stars 17 forks source link

Display Polygon With Holes in Dynmap/BlueMap #23

Open silverwolfg11 opened 2 years ago

silverwolfg11 commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, MapTowny does not display a polygon with holes on Dynmap or BlueMap, but does display it for other web-map plugins. This makes claims rendered inaccurate since the rendered claim fills in the holes of the polygon.

Describe the solution you'd like The holes in the polygon will not be filled in on BlueMap or Dynmap.

Describe alternatives you've considered N/A

Additional context Some great ideas on how to approach this were provided by PolitcubesDeveloper: https://github.com/TownyAdvanced/MapTowny/issues/22#issuecomment-1083129568

ItsJuls commented 1 year ago

Anything from this?

ItsJuls commented 1 year ago

https://github.com/Chicken/BlueMap-Towny/ has holes for wilderness chunks, might be useful

silverwolfg11 commented 1 year ago

https://github.com/Chicken/BlueMap-Towny/ has holes for wilderness chunks, might be useful

That plugin seems to use this file with algorithms for achieving holes in wilderness. I haven't had time to look into those algorithms, but I'm sure it would be possible to adapt them for MapTowny. If anyone wants to take a shot at it and PR it to MapTowny, that would be heavily appreciated.

That code is licensed under GPL v3 and integrating it into the project is a little tricky. I would have to make MapTowny mostly MIT, and include a GPL portion. Since IANAL, I have no idea if that is even something I could do or if I need to do anything extra to make the project follow proper licensing.

In terms of a sort of ETA on this, it will definitely be a while. I currently want to work on mapping the town blocks like Dynmap-Towny does so that both plugins can be at feature parity with each other. Then I would take a look at this.

illuziator commented 1 year ago

That plugin seems to use this file

regions with holes are divided into segments using breadth-first search and the border-line is drawn separately.

silverwolfg11 commented 5 months ago

Finally added this in v3.0.0. Thanks for everyone's tips and suggestions, it really helped in implementing this! Try the alpha version and let me know if it doesn't work.