Jump to content

Default Map Zoom

Featured Replies

Posted

The default zoom level for Google maps for calendar events and gallery photos is set far to high (IMHO). The default map method can already handle a zoom variable but this isn't set in event.php and image.php.  For example could:

	public function map( $width, $height )
	{
		if( $this->location )
		{
			try
			{
				return \IPS\GeoLocation::buildFromJson( $this->location )->map()->render( $width, $height );
			}
			catch( \BadMethodCallException $e ){}
		}

		return '';
	}

... be changed to:

	public function map( $width, $height, $zoom=1 )
	{
		if( $this->location )
		{
			try
			{
				return \IPS\GeoLocation::buildFromJson( $this->location )->map()->render( $width, $height, $zoom );
			}
			catch( \BadMethodCallException $e ){}
		}

		return '';
	}

... so that a custom zoom level can be passed in along with the map width and height please. 

Edited by Edward Shephard

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.