Raruto / leaflet-ui

Leaflet presets for common user interface customizations
GNU General Public License v3.0
29 stars 4 forks source link

How to provide tile api keys? #5

Closed jlsogorb closed 3 years ago

jlsogorb commented 3 years ago

Hi, your code is great and very useful. I have a question. If you need to use an apikey in a mapType (for instance:

atlas: {
  name: 'Atlas',
  url: 'https://{s}.tile.thunderforest.com/mobile-atlas/{z}/{x}/{y}.png',
  options: {
    maxZoom: 24,
    ....
    // apikey: '<your apikey>',
}

How do you tell it into the code? Thank you.

Raruto commented 3 years ago

Hi jlsogorb,

take a look at this other thread: https://github.com/Raruto/leaflet-ui/issues/1#issuecomment-538546557

PS otherwise, you can also use the following: https://github.com/Raruto/leaflet-ui/blob/bfc6e6e2ffbb97559c6faad0f18a4d1dc017c18b/src/leaflet-ui.js#L250

Have a nice day, Raruto

jlsogorb commented 3 years ago

That's it!! Thank you, very much, ang great job!

jlsogorb commented 3 years ago

Another question. I'm using also the Leaflet Elevation code. How could I customize the summary (for instance translate the texts: "Total Length" ---> "Distancia Total" ...

Raruto commented 3 years ago

Another question. I'm using also the Leaflet Elevation code. How could I customize the summary (for instance translate the texts: "Total Length" ---> "Distancia Total" ...

See leaflet-elevation_i18n-strings.html and please try to ask questions in relevant places

jlsogorb commented 3 years ago

Ok, thank you, and sorry.