X-Plane / xptools

X-Plane Scenery Tools: WorldEditor (WED) and more
91 stars 34 forks source link

Change Slippy Map MAX_ZOOM to 21. #10

Closed mdajr closed 5 years ago

mdajr commented 5 years ago

I want to be able to use high resolution imagery when using a custom slippy map. I found that the provider I was using could provide down to z23. The WED map window only allows the user to zoom to z21. The MAX_ZOOM should be updated to match for custom providers offering high resolution data. Also could make it user customization in the preferences pane.

meikelm commented 5 years ago

We can not do that - this would violate our server use agreements with the openstreetmap fondation and licensing terms with the ERSI, respectively.

mdajr commented 5 years ago

That's not true though. Those constants are defined on line 65. static const int max_zoom[PREDEFINED_MAPS] = { 16, // OSM tiles below this zoom are not cached, but on-demand generated. Openstreetmap foundation asks to limit their use. 17 }; // ESRI maps are available down to this level in general

mdajr commented 5 years ago

The MAX_ZOOM definition is solely used for custom URL pulls as it says in the comment. If it truly is custom and user defined, the user should be able to set the max ZL or it should default to the map window for maximum quality.

mdajr commented 5 years ago

Looks like on line 106 there is a ternary check if we are using predefined sources. If so then it pulls from the max_zoom array, otherwise from the #define. That's the only place it seems to be used. int max_zl = mMapMode <= PREDEFINED_MAPS ? max_zoom[mMapMode-1] : MAX_ZOOM;