Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+12 -8
View File
@@ -2,9 +2,9 @@
/**
* @brief Google Maps
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 19 Apr 2013
* @version SVN_VERSION_NUMBER
*/
@@ -56,7 +56,7 @@ class _Google
else
{
$location = array();
foreach ( array( 'country', 'region', 'city', 'addressLines' ) as $k )
foreach ( array( 'postalCode', 'country', 'region', 'city', 'addressLines' ) as $k )
{
if ( $this->geolocation->$k )
{
@@ -64,7 +64,10 @@ class _Google
{
foreach ( array_reverse( $this->geolocation->$k ) as $v )
{
$location[] = $v;
if( $v )
{
$location[] = $v;
}
}
}
else
@@ -75,15 +78,16 @@ class _Google
}
$location = implode( ', ', array_reverse( $location ) );
}
$linkUrl = \IPS\Http\Url::external( '//maps.google.com/' )->setQueryString( 'q', $location );
$linkUrl = \IPS\Http\Url::external( 'https://maps.google.com/' )->setQueryString( 'q', $location );
$imageUrl = \IPS\Http\Url::external( '//maps.googleapis.com/maps/api/staticmap' )->setQueryString( array(
$imageUrl = \IPS\Http\Url::external( 'https://maps.googleapis.com/maps/api/staticmap' )->setQueryString( array(
'center' => $location,
'zoom' => $zoom === NULL ? NULL : ceil( $zoom * 8 ),
'size' => "{$width}x{$height}",
'sensor' => 'false',
'markers' => $location
'markers' => $location,
'key' => \IPS\Settings::i()->google_maps_api_key,
) );
return \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->googleMap( $linkUrl, $imageUrl, $this->geolocation->lat, $this->geolocation->long );