iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 553 forks source link

default-intel-detail: action doesn't correspond to description #1296

Open johnd0e opened 5 years ago

johnd0e commented 5 years ago

Use the portal level detail levels from the standard intel site. By default, IITC shows less detail when zoomed out, as this is enough for general use, is more friendly to the niantic servers, and loads much faster. This plugin restores the default zoom level to portal level mapping. Note: using this plugin causes a larger number of requests to the intel server, and at high resolutions can cause excessive requests to be made (yes: the default intel site also has this problem!), so it is not recommended except for low resolution screens.

Here is all the code: https://github.com/iitc-project/ingress-intel-total-conversion/blob/f90452765baf1baffd918117598ef9becd41db87/plugins/default-intel-detail.user.js#L29-L35

https://github.com/iitc-project/ingress-intel-total-conversion/blob/f90452765baf1baffd918117598ef9becd41db87/code/map_data_calc_tools.js#L129-L151

As I can understand this part of getDataZoomForMapZoom, the optimization does not affect details level, and that it exact intent of the getDataZoomForMapZoom. So (contrary to the description) option window.CONFIG_ZOOM_DEFAULT_DETAIL_LEVEL is unable to increase details level, and there is no reason to use it (even for lo-res screens).