Merged in bugfix/HOR-4903 (pull request #6653)
HOR-4903 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -64,7 +64,9 @@ class System
|
|||||||
'logs_max_files' => 60,
|
'logs_max_files' => 60,
|
||||||
'logs_location' => '',
|
'logs_location' => '',
|
||||||
'logging_level' => 'INFO',
|
'logging_level' => 'INFO',
|
||||||
'smtp_timeout' => 20
|
'smtp_timeout' => 20,
|
||||||
|
'google_map_api_key' => '',
|
||||||
|
'google_map_signature' => ''
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace ProcessMaker\Services\Api;
|
namespace ProcessMaker\Services\Api;
|
||||||
|
|
||||||
|
use Bootstrap;
|
||||||
use G;
|
use G;
|
||||||
use ProcessMaker\Project\Adapter;
|
use ProcessMaker\Project\Adapter;
|
||||||
use ProcessMaker\Services\Api;
|
use ProcessMaker\Services\Api;
|
||||||
@@ -1273,6 +1274,17 @@ class Light extends Api
|
|||||||
$oMobile = new BusinessModelLight();
|
$oMobile = new BusinessModelLight();
|
||||||
|
|
||||||
$url = "http://maps.googleapis.com/maps/api/staticmap?center=" . $latitude . ',' . $longitude . "&format=jpg&size=600x600&zoom=15&markers=color:blue%7Clabel:S%7C" . $latitude . ',' . $longitude;
|
$url = "http://maps.googleapis.com/maps/api/staticmap?center=" . $latitude . ',' . $longitude . "&format=jpg&size=600x600&zoom=15&markers=color:blue%7Clabel:S%7C" . $latitude . ',' . $longitude;
|
||||||
|
|
||||||
|
$config = Bootstrap::getSystemConfiguration();
|
||||||
|
$googleMapApiKey = $config['google_map_api_key'];
|
||||||
|
$googleMapSignature = $config['google_map_signature'];
|
||||||
|
if(!empty($googleMapApiKey)){
|
||||||
|
$url .= "&key=" . $googleMapApiKey;
|
||||||
|
}
|
||||||
|
if(!empty($googleMapSignature)){
|
||||||
|
$url .= "&signature=" . $googleMapSignature;
|
||||||
|
}
|
||||||
|
|
||||||
$imageLocation = imagecreatefromjpeg($url);
|
$imageLocation = imagecreatefromjpeg($url);
|
||||||
$tmpfname = tempnam(sys_get_temp_dir(), "pmm");
|
$tmpfname = tempnam(sys_get_temp_dir(), "pmm");
|
||||||
imagejpeg($imageLocation, $tmpfname);
|
imagejpeg($imageLocation, $tmpfname);
|
||||||
|
|||||||
Reference in New Issue
Block a user