Jump to content

Mapbox editing

Featured Replies

Posted

Hello,

is there any chance of editing mapbox widget except those options provided in ACP? I want to change its upfront zoom - for now we have whole world while we want to change its zoom to Poland for example. 

https://www.audiostereo.pl/clubs/

There's nothing built in to do this, but you can pass a zoom level to the mapping classes if you write a plugin/edit your templates.

  • Author

Any particular files that I could edit? Cannot find them at all in ACP

Create a plugin on \IPS\GeoLocation\Maps\Mapbox

	/**
	 * Render
	 *
	 * @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
	 * @return	string
	 */
	public function render( $width, $height, $zoom=NULL )

You could change the default $zoom value from NULL to something else

  • 5 weeks later...
  • Author

Do you have any idea how to create it? I found this file 

image.thumb.png.8f1ac21654c2a48397f05c226005b6bb.png

Archived

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

Recently Browsing 0

  • No registered users viewing this page.