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

Exporting to PNG or other raster format. #310

Closed
Kwoalaka opened this issue May 31, 2018 · 4 comments
Closed

Exporting to PNG or other raster format. #310

Kwoalaka opened this issue May 31, 2018 · 4 comments

Comments

@Kwoalaka
Copy link

Hi,

Is there anyway to export this to a PNG or any other raster format?

I know i can create a printscreen, but i wanted to have a bigger resolution for a print.

Thanks in advance.

@orangemug
Copy link
Collaborator

Hi @Kwoalaka and welcome to the Maputnik community. This has already been raised over in issue #180. Take a look at that issue and let us know if the suggested solution meets your requirements.

Also if you have time, please tell us what you use Maputnik for over in #164. Hearing stories helps to keep us motivated 😄

@Kwoalaka
Copy link
Author

Hi Roangemug,

I noticed, i was looking for a easy exporting method like mapbox offers.

Is there anyway i can use the json file with mapertive or something?

Sorry, i'm a complete noob with this

@orangemug
Copy link
Collaborator

Hey @Kwoalaka so we are working on a raster export option, and we're getting closer to a working solution. We are however we're still some way off a working version, probably a few weeks.

For some clarification. Maputnik is an editor for the mapbox-gl-js style spec,
you can export the JSON from the 'export modal' in the editor and use it anywhere you like. In issue #180 @pathmapper suggested some existing tools to export as a raster. pkd2512 print maps seems like the easiest way at the moment. If you're comfortable with node.js/npm here are the steps

  1. Create a new directory and place your exported style in that directory
  2. cd to that directory
  3. Install http-server npm i http-server in that directory
  4. run ./node_modules/.bin/http-server --cors
  5. Go to http://prasantakrdutta.com/print-maps add a custom style with the url http://127.0.0.1:8081/PATH/TO/YOUR/STYLE.json, using either a mapbox access token or a random string if you're not using mapbox data sources
  6. Your style will now appear in the select box on that page ready to export

@orangemug
Copy link
Collaborator

Closing issue as duplicate of #180

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