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

Map skin? #7

Open
hjgabrielsen opened this issue Apr 6, 2018 · 5 comments
Open

Map skin? #7

hjgabrielsen opened this issue Apr 6, 2018 · 5 comments
Labels

Comments

@hjgabrielsen
Copy link

Would it be possible to skin the map (add image tiles?)

@StephanGeorg
Copy link
Owner

Sure. You can use any Tiles URL you want (i.e. Mapbox, ...).

const StaticMaps = require('staticmaps');
const options = {
  width: 600,
  height: 400,
  tileUrl: 'http://tiles.yourservice.map/{z}/{x}/{y}.png',
};
const map = new StaticMaps(options);

@StephanGeorg
Copy link
Owner

StephanGeorg commented Apr 6, 2018

Example for Mapbox would be

const StaticMaps = require('staticmaps');
const options = {
  width: 600,
  height: 400,
  tileUrl: 'https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/{z}/{x}/{y}?access_token=<your access token here>',
};
const map = new StaticMaps(options);

@pkarfs
Copy link

pkarfs commented Sep 30, 2020

Would it be possible to use a hosted vector tileurl with .pbf , then reference a stylesheet?

@StephanGeorg
Copy link
Owner

No, vector tiles are not supported yet. Staticmaps works only with raster tiles.

@samuel-litzler
Copy link

Do you think it will be one day ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants