Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maps looks bad on retina screen #75

Open
2 of 3 tasks
johnd0e opened this issue Jan 21, 2019 · 8 comments
Open
2 of 3 tasks

Maps looks bad on retina screen #75

johnd0e opened this issue Jan 21, 2019 · 8 comments
Labels
enhancement New feature or request plugin

Comments

@johnd0e
Copy link
Contributor

johnd0e commented Jan 21, 2019

Many included basemaps are looking not good enough, like low-res.
I suppose that it's possible to play with argument in order to improve maps.

Here will be the list with maps that have to be enhanced

  • Bing
  • Yandex
  • ...
@johnd0e johnd0e changed the title Improve tiles resolution Maps looks bad on retina screen Jan 22, 2019
@modos189
Copy link
Contributor

Increasing quality will require increasing traffic. It is not uncommon for IITC to get confused when there is poor Internet connection away from city during any operation.

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 23, 2019

Increasing quality will require increasing traffic.

Well, IITC was created many years ago, and since then mobile internet get much better, so I suppose we can afford it.
In many cases connection is fast enough, and traffic even may not be charged.

Besides, this could be optional.

@modos189
Copy link
Contributor

As optional, it would be useful.

But even now, we sometimes play in places where internet is almost absent)

@modos189 modos189 added enhancement New feature or request plugin mobile labels Jan 23, 2019
@modos189
Copy link
Contributor

Option should only be placed in the mobile version, I think

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 23, 2019

Option should only be placed in the mobile version, I think

Could be useful in desktop as well.

But I wonder how we should implement this option.
Simplest way is to control it with plugin, but applying it can require full iitc reloading.

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 27, 2019

Some general thoughts:

  • Standard tile size is 256*256.
    • Some tile providers are able to deliver other sizes, such as 128x128 and 512x512.
  • Leaflet can detect hi-res mode (see L.Browser.retina), and use hi-res icons (if defined) and map tiles (see below):
    • Leaflet has template {r} to request high-res tiles, this can be used to add scale modifier @2x to url (e.g. thunderforest).
      NB: some services (e.g. HERE) use other url parameters to specify tile size.
    • Also leaflet has special layer option detectRetina, which is more universal.
      NB: this option is broken in our current leaflet version (1.3.0), so we need to update it (see leaflet update #78).
  • While using hi-res tiles all labels/captions get smaller.
    Workarounds:
    • Some services allow to specify ppi parameter
    • Labels could be added as separate layer (in some services)

@johnd0e
Copy link
Contributor Author

johnd0e commented Feb 5, 2019

  • detectRetina option is individual per tilelayer, but better if we could control it in single place (still leaving the possibility to disable it per some maps).
  • Sometimes we may need to force-disable the option (e.g.: poor connection conditions).
  • Sometimes we may need to force-enable the option even on non-retina screen.
  • We have not rely solely on detectRetina, as:
    • The option has no effect on some maps with own API (Bing, Google, Yandex).
    • There could be other possibilities to increase tile resolution (like request 512*512 tiles, which is available in some providers).

@johnd0e
Copy link
Contributor Author

johnd0e commented Jul 12, 2019

I've made some corrections in Bing and Yandex plugins (and their upstreams).
Now maps seems looking better.

But anyway, we need global retina option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin
Projects
None yet
Development

No branches or pull requests

2 participants