Skip to content

Improve the usability for incorporating multiple map tile services#1

Open
imysl0 wants to merge 2 commits intodeltachat:mainfrom
imysl0:main
Open

Improve the usability for incorporating multiple map tile services#1
imysl0 wants to merge 2 commits intodeltachat:mainfrom
imysl0:main

Conversation

@imysl0
Copy link

@imysl0 imysl0 commented Jun 12, 2024

  1. Add the mapServices.js file to facilitate the easier addition of map providers.
  2. Include a dropdown menu to conveniently select different tile services.
    图片 图片

…ap providers.

2. Include a dropdown menu to conveniently select different tile services.
Copy link
Member

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, didn't test yet

@Simon-Laux
Copy link
Member

Simon-Laux commented Sep 27, 2024

maybe save last selected tile provider in LocalStorage?

Also we could whitelist all those providers as a temporary fix in deltachat desktop:

const hostRules = 'MAP * ~NOTFOUND, EXCLUDE *.openstreetmap.org, EXCLUDE tile.openstreetmap.org, EXCLUDE *.tile.osm.org, EXCLUDE *.tile.openstreetmap.de, EXCLUDE *.tile.openstreetmap.fr, EXCLUDE *.tile.opentopomap.org, EXCLUDE *.is.autonavi.com, EXCLUDE tm.amap.com, EXCLUDE *.map.gtimg.com, EXCLUDE *.tianditu.gov.cn'

But for a more permanent solution I'd prefer if those requests go over delta chat core (http request api), so that they respect proxy settings for that account.

@imysl0
Copy link
Author

imysl0 commented Oct 13, 2024

maybe save last selected tile provider in LocalStorage?

Also we could whitelist all those providers as a temporary fix in deltachat desktop:

const hostRules = 'MAP * ~NOTFOUND, EXCLUDE *.openstreetmap.org, EXCLUDE tile.openstreetmap.org, EXCLUDE *.tile.osm.org, EXCLUDE *.tile.openstreetmap.de, EXCLUDE *.tile.openstreetmap.fr, EXCLUDE *.tile.opentopomap.org, EXCLUDE *.is.autonavi.com, EXCLUDE tm.amap.com, EXCLUDE *.map.gtimg.com, EXCLUDE *.tianditu.gov.cn'

But for a more permanent solution I'd prefer if those requests go over delta chat core (http request api), so that they respect proxy settings for that account.

Hi Simon:
Both suggestions are pretty good, but I'm still not sure how to proceed, because I'm not a programmer. The previous code was also written with the help of AI. Let me think about it (maybe wait for AI to improve a bit, hahaha).

@nicodh
Copy link
Member

nicodh commented Aug 29, 2025

When testing this PR I find that at least the first 5 of the chinese tile server show no data and the last one shows data only for a very low zoom level.

What's the reason? Are the tileserver maybe blocked for IPs out of china?

@imysl0
Copy link
Author

imysl0 commented Aug 30, 2025

When testing this PR I find that at least the first 5 of the chinese tile server show no data and the last one shows data only for a very low zoom level.

What's the reason? Are the tileserver maybe blocked for IPs out of china?

It's working normally on my end. It seems that access restrictions have been imposed somewhere. Can you directly access https://ditu.amap.com/? This is Amap's online website.

@nicodh
Copy link
Member

nicodh commented Aug 30, 2025

Yes I can access it, but it requires some registration to access the map. So that's probably the problem

@nicodh
Copy link
Member

nicodh commented Aug 30, 2025

Maybe depending from where I call the website?

@nicodh
Copy link
Member

nicodh commented Aug 30, 2025

Ok, I didn't understand the chinese text, it was just an overlay I could click away

@nicodh
Copy link
Member

nicodh commented Aug 30, 2025

So when testing this PR again with extended hostRules it turned out it's a question of zoom level. If I stay on a low zoom level I can see the map, but not when I zoom in to see details

Edit: that seems to happen outside of china. In China mainland I can zoom into a much higher level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants