From 677f76fd6409720b212c4067ade8e759a957c451 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sun, 7 Jan 2018 04:52:51 +0000 Subject: [PATCH] /opt/nb/lib/php/maps.php --- lib/php/maps.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/php/maps.php b/lib/php/maps.php index 1d1871e5..764a6f4a 100644 --- a/lib/php/maps.php +++ b/lib/php/maps.php @@ -4,10 +4,11 @@ class Maps { public static function img($longitude,$latitude,$o=[]) { if (empty($o['width'])) $o['width'] = 72; if (empty($o['height'])) $o['height'] = 36; + if (empty($o['zoom'])) $o['zoom'] = 10; $o['sensor'] = empty($o['sensor']) ? 'false' : 'true'; return 'http://maps.google.com/maps/api/staticmap?center='.$longitude.','.$latitude - .'&zoom=10' + .( empty($o['zoom']) ? '' : '&zoom='.$o['zoom']) .'&size='.$o['width'].'x'.$o['height'] .'&sensor='.$o['sensor'] ; -- 2.47.3