fpw / avitab

X-Plane plugin that displays a tablet to aid VR usage
GNU Affero General Public License v3.0
300 stars 59 forks source link

Configurable online slippy maps 4 #168

Closed cyberang3l closed 11 months ago

cyberang3l commented 11 months ago

Support configurable tile_width_px and tile_height_px in custom maps

The most common tile size is 256x256 pixels, but some tiles servers serve tiles of different sizes. With this commit, we add support for user-configurable tile sizes with two new, optional OnlineSlippyMapConfig parameters:

tile_width_px: As implied by the name, tile_width_px defines the tile width in pixels that the server serves for the corresponding map configuration. It is an optional parameter, and if not provided by the user, 256px is the default value.

tile_height_px: As implied by the name, tile_height_px defines the tile height in pixels that the server serves for the correspodning map configuration. It is an optional parameter, and if not provided by the user, 256px is the default value.

An example of a popular map that uses 512x512 tiles is Open Flight Maps. I tested this commit with open flight maps and works as expected.

fpw commented 11 months ago

That worked very smoothly, thanks!