image of to-from map

This commit is contained in:
Bel LaPointe
2022-01-14 00:08:23 -05:00
parent cc379c52ad
commit 48da446e83
5 changed files with 58 additions and 9 deletions

3
testdata/routed_map.sh vendored Normal file
View File

@@ -0,0 +1,3 @@
#! /bin/bash
poly="${poly:-"$(curl 'https://maps.googleapis.com/maps/api/directions/json?origin=advance,nc&destination=winston-salem,nc&mode=driving&key=AIzaSyBkACm-LQkoSfsTO5_XAzBVZE9-JQzcNkg' | jq -c .routes[0].legs[0].steps[] | jq -c .start_location | jq -r '(.lat|tostring) + "," + (.lng|tostring)' | tr '\n' '|' | sed 's/.$//')"}"; curl "https://maps.googleapis.com/maps/api/staticmap?size=250x250&path=$(urlencode "$poly")&format=jpeg&maptype=roadmap&key=AIzaSyBkACm-LQkoSfsTO5_XAzBVZE9-JQzcNkg&size=600x400&sensor=false" > /tmp/f.jpg ; open /tmp/f.jpg