Class openStreetMap
The class for all OSM map related functionality
Author: Malte Müller (acrylian), Fred Sondaar (fretzl), gjr, Vincent Bourganel (vincent3569)
Located at zp-extensions/openstreetmap.php
public
|
#
__construct( array $geodata = NULL,
If no $geodata array is passed the function gets geodata from the current image or the images of the current album if in appropiate context. |
public static
|
|
public
|
#
getImageGeodata( $image )
$returns coordinate informations for an image Adapted from the offical Zenphoto GoogleMap plugin by Stephen Billard (sbillard) & Vincent Bourganel (vincent3569) |
public
|
#
getAlbumGeodata( $album )
Gathers the map data for an album Adapted from the offical Zenphoto GoogleMap plugin by Stephen Billard (sbillard) & Vincent Bourganel (vincent3569) |
public
array
|
#
getGeoData( )
Extracts the geodata from an image or the images of an album and creates the JS arrays for leaflet including title, description and thumb if set. |
public
string
|
#
getGeoDataJS( )
Processes the geodata returned by getGeoData() and formats it to a string presenting a multidimensional Javascript array for use with leafletjs |
public
array
|
#
getFitBounds( )
Returns the bounds the map should fit based on the geodata of an image or images of an album |
public
array
|
|
public
string
|
#
getTileLayerJS( )
Return the map tile js definition for leaflet and its leaflet-providers plugin. For certain map providers it include the access credentials. |
public
|
|
public static
array
|
|
public
string
|
#
setMapTiles( string $tileprovider = null )
It returns the provider chosen if it is valid or the default 'OpenStreetMap.Mapnik' tile |
public static
array
|
#
getTileProviders( )
Returns an array of all defined tile provider names from and for use with leaflet-providers.js and the plugin options |
public
array
|
$geodata
Contains the array of the image or images from albums geodata |
#
NULL
|
public
array
|
$geodatajs
Contains a string presenting a Javascript array of geodata for leafletjs |
#
NULL
|
public
array
|
$fitbounds
geodata array('min' => array(lat,lng), 'max => array(lat,lng)) Default created from an image or the images of an album. |
#
NULL
|
public
array
|
$center
geodata array(lat,lng) Default created from an image or the images of an album. |
#
NULL
|
public
string
|
$class
Optional class name to attach to the map html |
#
''
|
public
string
|
$mode
"single" (one marker) "cluster" (several markers always clustered) "single-cluster" (markers of the images of the current album) Default created by the $geodata property: "single "if array with one entry, "cluster" if more entries |
#
NULL
|
public
boolean
|
$showalbummarkers
|
#
false
|
public
array
|
$mapcenter
geodata array(lat,lng) Default created from the image marker or from the markers of the images of an album if in context |
#
NULL
|
public
integer
|
$mapnumber
Unique number if using more than one map on a page |
#
''
|
public
string
|
$width
Default 100% for responsive map. Values like "100%", "100px" or "100em" Default taken from plugin options |
#
NULL
|
public
string
|
$height
Values like "100px" or "100em" Default taken from plugin options |
#
NULL
|
public
integer
|
$zoom
Default zoom state Default taken from plugin options |
#
NULL
|
public
|
$minzoom
|
#
NULL
|
public
|
$maxzoom
|
#
NULL
|
public
array
|
$defaultlayer
The tile providers to use. Select from the $tileproviders property like $this->maptiles = $this->tileproviders[' |
#
NULL
|
public
|
$layerslist
|
#
NULL
|
public
|
$layer
|
#
NULL
|
public
integer
|
$clusterradius
Radius when clusters should be created on more than one marker Default taken from plugin options |
#
NULL
|
public
boolean
|
$markerpopup
If used on albums or several custom markers if you wish popups on the markers If using custom markers you need to provide the content for the popups withn the $geodata property Default taken from plugin options |
#
false
|
public
boolean
|
$markerpopup_title
Only if on an album page and if $imagepopups are enabled. If the imagepopus should contain thumbs of the images Default taken from plugin options |
#
false
|
public
boolean
|
$markerpopup_desc
|
#
false
|
public
boolean
|
$markerpopup_thumb
|
#
false
|
public
boolean
|
$showmarkers
|
#
true
|
public
string
|
$showminimap
Mini map parameters |
#
false
|
public
|
$minimap_width
|
#
NULL
|
public
|
$minimap_height
|
#
NULL
|
public
|
$minimap_zoom
|
#
NULL
|
public
string
|
$zoomcontrolpos
Position of the map controls: "topleft", "topright", "bottomleft", "bottomright" Default taken from plugin options |
#
NULL
|
public
|
$showscale
|
#
NULL
|
public
|
$showcursorpos
|
#
NULL
|
public
object
|
$obj
The current image or album object if not passing custom geodata |
#
NULL
|
public
array
|
$tileproviders
The predefined array of all free map tile providers for Open Street Map |
#
NULL
|