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

API Key Issue when switching styles #942

Open
harbinc opened this issue Sep 24, 2024 · 8 comments
Open

API Key Issue when switching styles #942

harbinc opened this issue Sep 24, 2024 · 8 comments

Comments

@harbinc
Copy link

harbinc commented Sep 24, 2024

I have recently installed Maputnik locally on Ubuntu.

I am able to load Maputnik with no issue but with blank maps.

Blank map until I add the API key to Datasource and then API key for Style Settings Glyphs.

Can I make my API key persistent so I am not having to enter the API key each time I select a different style. Note I installed using Homebrew.

Thanks :)

@HarelM
Copy link
Collaborator

HarelM commented Sep 25, 2024

I think you can store the API key in the style file itself, can't you?

@HarelM
Copy link
Collaborator

HarelM commented Sep 25, 2024

CC: @kevinschaul

@harbinc
Copy link
Author

harbinc commented Sep 25, 2024

@HarelM Is the style file downloaded to the local filesystem? I am using the public data sources.

@HarelM
Copy link
Collaborator

HarelM commented Sep 25, 2024

In the desktop version you should be working with a local file as far as I know, otherwise you can simply use the web version, which use the browser's local storage...

@harbinc
Copy link
Author

harbinc commented Sep 30, 2024

@HarelM I am accessing Maputnik via browser. The API key is not storing in local browser storage for some reason. There are no style files on my installation, all public styles are being accessed externally. I am running maputnik executable only.

@HarelM
Copy link
Collaborator

HarelM commented Sep 30, 2024

That's annoying... Feel free to open a PR so solve this...

@harbinc
Copy link
Author

harbinc commented Sep 30, 2024

Thanks @HarelM

Before I submit a PR. Can you confirm that my installation is correct. The installation instructions on Maputnik Github did not work in my case.

Brew Installation:
brew install kevinschaul/homebrew-core/maputnik

Executable:
/home/linuxbrew/.linuxbrew/bin/maputnik -- file style.json

Using empty style.json file with the following.

{
"version": 8,
"name": "Map with OpenMapTiles",
"metadata": {},
"sources": {
"openmaptiles": {
"type": "vector",
"url": "https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key=MY_API_KEY"
}
},
"sprite": "",
"glyphs": "https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf?key=MY_API_KEY",
"layers": []
}

@HarelM
Copy link
Collaborator

HarelM commented Sep 30, 2024

I'm using the online version, so this might be a limitation of the desktop version. Does this issue exists in the online version (maplibre.org/maputnik)?

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

No branches or pull requests

2 participants