summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2022-06-04 13:26:45 -0700
committerAaron Parecki <aaron@parecki.com>2022-06-04 13:26:45 -0700
commit86fb4a5ce73aeafe718dd7d2ad77eaa6ae7da99d (patch)
tree7dd3be1e15a43cd195e4c604215342017a30380f
parentb3b3dc41bce85850bf60347bdaec954390b674df (diff)
fix map
-rw-r--r--controllers/controllers.php1
-rw-r--r--lib/helpers.php4
2 files changed, 2 insertions, 3 deletions
diff --git a/controllers/controllers.php b/controllers/controllers.php
index 82dfaca..c306aac 100644
--- a/controllers/controllers.php
+++ b/controllers/controllers.php
@@ -911,6 +911,7 @@ $app->get('/map-img', function() use($app) {
'width' => $params['w'],
'height' => $params['h'],
'zoom' => $params['z'],
+ 'attribution' => 'mapbox',
'tileurl' => Config::$mapTileURL,
'token' => Config::$atlasToken,
];
diff --git a/lib/helpers.php b/lib/helpers.php
index 5408906..2102ee1 100644
--- a/lib/helpers.php
+++ b/lib/helpers.php
@@ -371,13 +371,11 @@ function get_micropub_source(&$user, $url, $properties) {
function static_map($latitude, $longitude, $height=180, $width=700, $zoom=14) {
$params = [
- 'lat' => $latitude,
- 'lng' => $longitude,
'h' => $height,
'w' => $width,
'z' => $zoom,
];
- return '/map-img?'.http_build_query($params);
+ return '/map-img?lat='.$latitude.'&lng='.$longitude.'&'.http_build_query($params);
}
function relative_time($date) {