Browse Source

fix map

dependabot/composer/firebase/php-jwt-6.0.0
Aaron Parecki 2 years ago
parent
commit
86fb4a5ce7
Failed to extract signature
2 changed files with 2 additions and 3 deletions
  1. +1
    -0
      controllers/controllers.php
  2. +1
    -3
      lib/helpers.php

+ 1
- 0
controllers/controllers.php View File

@ -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,
];

+ 1
- 3
lib/helpers.php View File

@ -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) {

Loading…
Cancel
Save