1
0
Fork 0
mirror of https://github.com/Luzifer/staticmap.git synced 2024-12-20 04:41:18 +00:00

Add example for marker size

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-11-30 12:36:00 +01:00
parent 7c1093f5bd
commit 5b51090fe9
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E
5 changed files with 12 additions and 3 deletions

View file

@ -4,4 +4,4 @@ update_example_post:
curl -X POST --data-binary @example/postmap.json -o example/postmap.png localhost:5000/map.png
update_example_get:
curl -o example/map.png 'localhost:5000/map.png?center=53.5438,9.9768&zoom=15&size=800x500&markers=color:blue|53.54129165,9.98420576699353&markers=color:yellow|53.54565525,9.9680555636958'
curl -o example/map.png 'localhost:5000/map.png?center=53.5438,9.9768&zoom=15&size=800x500&markers=color:blue|53.54129165,9.98420576699353&markers=color:yellow|53.54565525,9.9680555636958&markers=size:tiny|color:red|53.54846472989871,9.978977621091543'

View file

@ -27,9 +27,10 @@ All map operations are made against the `/map.png` endpoint of the server and ar
&size=800x500
&markers=color:blue|53.54129165,9.98420576699353
&markers=color:yellow|53.54565525,9.9680555636958
&markers=size:tiny|color:red|53.54846472989871,9.978977621091543
```
The map center is set to a coordinate within Hamburg, Germany with a zoom level of 15. Additionally there are two markers set: One `blue` marker to the Elbphilharmonie, one `yellow` marker to the Hard Rock Cafe Hamburg. The example above (of course without the line breaks) produced this image:
The map center is set to a coordinate within Hamburg, Germany with a zoom level of 15. Additionally there are two markers set: One `blue` marker to the Elbphilharmonie, one `yellow` marker to the Hard Rock Cafe Hamburg and a `tiny` `red` marker on the St. Michaels church. The example above (of course without the line breaks) produced this image:
![](example/map.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 KiB

After

Width:  |  Height:  |  Size: 433 KiB

View file

@ -18,6 +18,14 @@
"lat": 53.54565525,
"lon": 9.9680555636958
}
},
{
"color": "red",
"size": "tiny",
"coord": {
"lat": 53.54846472989871,
"lon": 9.978977621091543
}
}
],
"overlays": [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

After

Width:  |  Height:  |  Size: 417 KiB