mirror of
https://github.com/Luzifer/staticmap.git
synced 2024-12-20 21:01:18 +00:00
Add example for marker size
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9b4448fd05
commit
3bb2ce36fe
5 changed files with 12 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -4,4 +4,4 @@ update_example_post:
|
||||||
curl -X POST --data-binary @example/postmap.json -o example/postmap.png localhost:5000/map.png
|
curl -X POST --data-binary @example/postmap.json -o example/postmap.png localhost:5000/map.png
|
||||||
|
|
||||||
update_example_get:
|
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'
|
||||||
|
|
|
@ -27,9 +27,10 @@ All map operations are made against the `/map.png` endpoint of the server and ar
|
||||||
&size=800x500
|
&size=800x500
|
||||||
&markers=color:blue|53.54129165,9.98420576699353
|
&markers=color:blue|53.54129165,9.98420576699353
|
||||||
&markers=color:yellow|53.54565525,9.9680555636958
|
&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)
|
![](example/map.png)
|
||||||
|
|
||||||
|
|
BIN
example/map.png
BIN
example/map.png
Binary file not shown.
Before Width: | Height: | Size: 433 KiB After Width: | Height: | Size: 433 KiB |
|
@ -18,6 +18,14 @@
|
||||||
"lat": 53.54565525,
|
"lat": 53.54565525,
|
||||||
"lon": 9.9680555636958
|
"lon": 9.9680555636958
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"size": "tiny",
|
||||||
|
"coord": {
|
||||||
|
"lat": 53.54846472989871,
|
||||||
|
"lon": 9.978977621091543
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"overlays": [
|
"overlays": [
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 417 KiB After Width: | Height: | Size: 417 KiB |
Loading…
Reference in a new issue