Im aware that using

GET /api/0.6/map?bbox=left,bottom,right,top

Will return a XML or OSM format, but is it possible to reconfigure it to export a raw SVG output, similar to when using the export tab manually to download a SVG file?

asked 17 Mar, 20:57

Hyperant's gravatar image

Hyperant
1612
accept rate: 0%


When you click on the "Download" button, after selecting SVG, it will generate this kind of URL : https://render.openstreetmap.org/cgi-bin/export?bbox=2.354260683059693,48.8476459732009,2.3654508590698247,48.8507382415782&scale=2847&format=svg

But as implied in this previous question, there is a token verification against API use, so it work only in your current browser. Also be aware that this kind of exports put a huge load on servers, so be really careful on the area you're trying to export. Probably better to stick to manual selection.

For other solutions about exporting SVG from OSM, have a look at this question, this wiki page, and others. But I don't think you'll find anything about API.

If you need to programmatically render SVG, you're best bet will probably be Maperitive, it's more or less made for that. BBBike use it, so you can test there.

Regards

permanent link

answered 18 Mar, 13:30

H_mlet's gravatar image

H_mlet
1.6k730
accept rate: 14%

edited 18 Mar, 13:31

Thank you for your help.

(18 Mar, 18:40) Hyperant
-2

"No"

You need to build actual geometries (not present in "raw" OSM data) and then render them to SVG to achieve that, or use a service that provides that, for example https://extract.bbbike.org/

In general asking people to google solutions for you is not a good strategy and simple pisses them off.

permanent link

answered 18 Mar, 00:00

SimonPoole's gravatar image

SimonPoole ♦
40.2k13297636
accept rate: 19%

Googling was the first thing i did, but as i didn't find much in that regard i decided to make an account here but you did a good job making assumptions.

Passive aggressiveness aside, thanks for the help.

(18 Mar, 01:19) Hyperant
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×590
×287
×252
×247
×43

question asked: 17 Mar, 20:57

question was seen: 266 times

last updated: 18 Mar, 18:40

powered by OSQA