IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
284 stars 110 forks source link

Some minor bugs to fix later #163

Open johnd0e opened 5 years ago

johnd0e commented 5 years ago

(It's a reminder for myself to fix the bugs later, during refactoring)

johnd0e commented 5 years ago

https://github.com/IITC-CE/ingress-intel-total-conversion/blob/256f9c53a866a254b40e40b1f766e58b4d2a89f4/main.js#L28 TypeError when user is not logged in, see https://github.com/iitc-project/ingress-intel-total-conversion/pull/1249#discussion_r274823201

johnd0e commented 5 years ago

https://github.com/IITC-CE/ingress-intel-total-conversion/blob/256f9c53a866a254b40e40b1f766e58b4d2a89f4/plugins/farms-find.user.js#L254

  1. This part of code executed on script initial load, before setup, so google could be not defined
  2. I doubt that we really need to change prototype
  3. I doubt that we ever need google api for this plugin. And what if current baselayer is not google (need to check).
johnd0e commented 5 years ago

https://github.com/IITC-CE/ingress-intel-total-conversion/blob/256f9c53a866a254b40e40b1f766e58b4d2a89f4/code/utils_misc.js#L411-L412

  1. layerGroup._leaflet_id is private property
  2. And it does not correspond to layerChooser._layers index, so this function just cannot work properly
  3. Actually it is not used in any known plugin
  4. All this layerChooser numerous stuff needs to be refactored and placed in single class (instead of random parts of source files).
johnd0e commented 5 years ago

Here is missed styler for default ingress map:

{featureType:"road",elementType:"labels.icon",stylers:[{invert_lightness:!0}]}