3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
257 stars 143 forks source link

[Question]: A question o base layers on recent LMWC versions #4890

Closed gioman closed 1 week ago

gioman commented 1 week ago

What is the question? (in English)

I admit that I got lost (and frequently confused) on some of the changes that have been introduced on LMWC since 3.7, to the point that I have chosen to stick to 3.6 until possible. Now moving on is no more an option, so I'm looking to find some answer.

Until LMWC baselayers like Google and Bing could be added using the LM plugin, and that needed an API key from those providers. But I could add basically the same imagery using the QGIS plugin QuickMapServices and no key was needed, because I guess that those layers from QMS are basically WMS layers and not coming from a tile server.

So why is the key now needed for that QMS layers in LMWC > 3.6?

Thanks in advance

Versions, safeguards, check summary etc

Not relevant for the question.

Check Lizmap plugin

Operating system

Ubuntu 22.04

Browsers

Firefox, Chrome

Browsers version

Latest updates

Relevant log output

No response

Gustry commented 1 week ago

Hi @gioman

There is a good answer on this other issue : https://github.com/3liz/lizmap-web-client/issues/4749#issuecomment-2376131752

Using QuickMapServices for a Google layer, without an API key is possible, but it's not guaranteed to work.

Gustry commented 1 week ago

So why is the key now needed for that QMS layers in LMWC > 3.6?

Did you get the "Check" in the Lizmap plugin about missing an API key ? There is the "How to fix" :

image

gioman commented 1 week ago

There is a good answer on this other issue : #4749 (comment)

@Gustry thanks for the pointer. So if I understand correctly the key/token is necessary because otherwise would be illegal (not using the tiled service which requires the key), correct? In QMS to be able to add layers from providers as Google users have to agree with

image

which I guess is their way to say "use them at your own responsibility".

Using QuickMapServices for a Google layer, without an API key is possible, but it's not guaranteed to work.

I would say that on recent LMWC it just does not work anymore.

gioman commented 1 week ago

Did you get the "Check" in the Lizmap plugin about missing an API key ? There is the "How to fix" :

@Gustry yes of course :) My question was more about why the change was needed, not how to correctly configure such layers now.

Gustry commented 1 week ago

I would say that on recent LMWC it just does not work anymore.

I know some instances where they use Google without a key and it works ;-) You should check the status of the tiles (the HTTP code and explanation from the Google server)

My question was more about why the change was needed

Because the Google Layer came back in OpenLayers in 2024 https://github.com/openlayers/openlayers/pull/15465 It was in OpenLayers 2 and then it was removed if I'm correct.