Problem/Motivation
When one of the Stamen options is selected as the map style, some map tiles now show a warning (right on top of the map): "These basemap tiles will no longer be available as of October 31, 2023. The site administrator can upgrade to the new map at stamen.com/faq." See attached screenshot.
Proposed resolution
Update URLs as described in Stadia's documentation.
Remaining tasks
Add information on the form page that Stamen and Stadia maps requires registering an account.
Emphasize that Domain-based authentication is the recommended method:
Stamen maps from Stadia use Domain-based authentication, so you need to register an account and add your local domain. Add *.ddev.site for DDEV, *.lndo.site for Lando, and so on. Development from 127.0.0.1 or localhost will "just work".
Testing without Stadia account, at 127.0.0.1
You can test the MR without registering an account and a domain, by using the alternative DDEV 127.0.0.1 URL:
$ ddev describe | grep "Host: 127.0.0.1:"
│ Host: 127.0.0.1:32769,32770 │ docroot:'web' │
│ Host: 127.0.0.1:32768 │ User/Pass: 'db/db' │
In the example above, it's https://127.0.0.1:32769, which you need to adjust to you local port number.
| Comment | File | Size | Author |
|---|---|---|---|
| stamen warning.png | 529.86 KB | jlstrecker |
Issue fork leaflet_more_maps-3393412
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3393412-stamen-map-tiles
changes, plain diff MR !5
Comments
Comment #2
ressaThanks! It does looks like an account is required, and a fee to be paid for Commercial use "... defined as any usage by a company which is for-profit, or as part of a product that is sold or generates revenue.":
... where you can then register a domain with the account:
https://docs.stadiamaps.com/authentication/#domain-based-authentication
Comment #3
ressaComment #5
ressaI added all the available Stamen layers and subsets, please review.
Comment #6
ressaComment #7
jlstreckerThanks! I looked over the code and tested with the Stamen Toner style. The tiles successfully load on both a local dev site and an AWS-hosted site. I confirmed that it's no longer requesting tiles from
stamen-tiles-*.ssl.fastly.net, now onlytiles.stadiamaps.com. On the public site, once I deployed the change, rebuilt caches, and registered for domain-based authentication with Stadia, the "basemap tiles will no longer be available" message no longer appeared. (On the dev site the message never appeared.)Comment #8
ressaGreat, thanks for a fast review, and for confirming that the patch works as expected!
Comment #9
ressaI updated the Stamen license link, so changing status.
Comment #10
petr illekI tested the patch, and can see the map tiles comming from new location.
But there are tiles randomly missing, still displaying the same message already mentioned.
I do not have Stadia account, but if it is required, it would be good to mentioned it on the settings page in the "Map provider…" section.
Personally I would remove all the
target="_blank"from the code as that is mostly considered a bad practice.Comment #11
ressaThanks for a fast review! I agree very much about
target="_blank"and never use it personally. But that's the format they want .... If you check for example Stamen Watercolor attribution, and I think we need to respect that.You're correct, Stadia requires an account, so I added info on the form about that, and updated the patch.
Comment #12
ressaComment #13
petr illekLooks fine to me now.
The target blank is annoying, but not a blocker for having this again working.
Comment #14
rachel_norfolkAs I try this out, I’m amused by the quote Development from 127.0.0.1 or localhost does not require setting up a domain; these requests will "just work". — especially as I’m currently using DDEV running on Codespaces and my iPad to check - I have to localhost…
Comment #15
rachel_norfolkAh - tiny thing but it’s worth updating - there’s an update to the Google terms of service link in the README that seems out of scope of the issue. Can you remove that change from the MR, set back to RTBC and I’ll merge?
If you want to create a follow up issue for the Google terms link, that’d be great!
Comment #16
ressaSure, thanks!
Comment #17
ressaWhen this and the other improvements such as retina support are committed, perhaps a fresh release could be considered? The last one was Nov. 2022. I have created #3410669: [Meta] Release version 2.2 to keep track of the issues.
Comment #18
ressaComment #19
krilo_89 commented@rachel_norfolk and @ressa, I'm missing the most important thing of the Stamen update and that's the API Key. The whole point of the switch to stadia.com, is that you need to register and retrieve an API Key to use the maps in Drupal.
Right now it works only on localhost and I don't think we only build local websites here ;).
The best way is to add an extra field in the backend for the API key. And 'navionics' is already doing that, so why don't do the same?
Comment #20
ressaStadia recommends domain-based authentication:
Domain-based authentication.
I have updated the link to point to that anchor, to make this clearer. What do you think?
Comment #21
itamair commentedHi folks here ... I jumped on this "unpassant" as I don't have much time for the Leaflet More Maps module, but still I care as I can deploy new releases on this.
I quickly tested the leaflet_more_maps-3393412 MR locally (I have a Stadia account but the API Key is not needed locally) and none of the Stadia maps work for me. Am I missing something or the MR still doesn't fix this issue properly?
Please let me know when this is fully RTBC so that we could deploy into new release ...
Comment #22
itamair commentedOh well I can see that also @berramou is able to generate new releases of Leaflet More Maps ... (isn't it?)
Comment #23
ressaThanks for looking at this @itamair. You're correct that using API Key is an option.
Stadia recommends using "Domain-based authentication" though, so If you're using DDEV, you need to add a property called for example "DDEV" and *.ddev.site.
I have expanded the info text on the form page, to make this clearer. Is it better now?
Comment #24
ressaUpdate Issue Summary, adding "Domain-based authentication" info.
Comment #25
rachel_norfolkI like it. If someone can test that this is now working, describing the steps they took to test it, I'll merge it.
Comment #26
ressaAwesome, thanks @rachel_norfolk. I am adding a method for testing the MR without a Stadia account to the Issue Summary.
Comment #27
ressaComment #28
ressa@Petr Illek: I saw
target="_blank"got removed in #3426678: Attribution links open new windows without informing user, and have also deleted them here.Wouldn't it be great to get this MR committed?
Comment #31
berramou commented