From b3b3dc41bce85850bf60347bdaec954390b674df Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 4 Jun 2022 13:23:28 -0700 Subject: switch to local rendering of static map --- lib/helpers.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/helpers.php') diff --git a/lib/helpers.php b/lib/helpers.php index ec23afa..5408906 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -370,7 +370,14 @@ function get_micropub_source(&$user, $url, $properties) { } function static_map($latitude, $longitude, $height=180, $width=700, $zoom=14) { - return 'https://atlas.p3k.io/map/img?marker[]=lat:' . $latitude . ';lng:' . $longitude . ';icon:small-blue-cutout&basemap=gray&width=' . $width . '&height=' . $height . '&zoom=' . $zoom; + $params = [ + 'lat' => $latitude, + 'lng' => $longitude, + 'h' => $height, + 'w' => $width, + 'z' => $zoom, + ]; + return '/map-img?'.http_build_query($params); } function relative_time($date) { -- cgit v1.2.3