Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+6 -3
View File
@@ -44,9 +44,11 @@ class _Google
* @param int $width Width
* @param int $height Height
* @param float|NULL $zoom The zoom amount (a value between 0 being totally zoomed out view of the world, and 1 being as fully zoomed in as possible) or NULL to zoom automatically based on how much data is available
* @param int $scale Google maps scale to use (https://developers.google.com/maps/documentation/static-maps/intro#scale_values)
* @param string $maptype Type of map to use. Valid values are roadmap (default), satellite, terrain, and hybrid (https://developers.google.com/maps/documentation/static-maps/intro#MapTypes)
* @return string
*/
public function render( $width, $height, $zoom=NULL )
public function render( $width, $height, $zoom=NULL, $scale=1, $maptype='roadmap' )
{
if ( $this->geolocation->lat and $this->geolocation->long )
{
@@ -84,11 +86,12 @@ class _Google
'center' => $location,
'zoom' => $zoom === NULL ? NULL : ceil( $zoom * 8 ),
'size' => "{$width}x{$height}",
'sensor' => 'false',
'markers' => $location,
'key' => \IPS\Settings::i()->google_maps_api_key,
'scale' => $scale,
'maptype' => $maptype
) );
return \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->googleMap( $linkUrl, $imageUrl, $this->geolocation->lat, $this->geolocation->long );
return \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->staticMap( $linkUrl, $imageUrl, $this->geolocation->lat, $this->geolocation->long );
}
}