ZenphotoCMS 1.6.3

openstreetmap.php

A Zenphoto plugin for showing OpenStreetMap maps using LeafletJS (http://leafletjs.com) for images or images from * albums with embeded geodata or maps with custom geodata.

Also includes

  • marker cluster plugin https://github.com/Leaflet/Leaflet.markercluster by Dave Leaver
  • MousePosition plugin https://github.com/ardhi/Leaflet.MousePosition by Ardhi Lukianto
  • Leaflet-MiniMap plugin: https://github.com/Norkart/Leaflet-MiniMap
  • leaflet-providers plugin: https://github.com/leaflet-extras/leaflet-providers
Tags
author

Malte Müller (acrylian), Fred Sondaar (fretzl), gjr, Vincent Bourganel (vincent3569)

licence

GPL v3 or later

Table of Contents

Classes

openStreetMapOptions
openStreetMap
The class for all OSM map related functionality

Functions

printOpenStreetMap()  : mixed
Template function wrapper for the openStreetMap class to show a map with geodata markers for the current image or collected the images of an album.

Functions

printOpenStreetMap()

Template function wrapper for the openStreetMap class to show a map with geodata markers for the current image or collected the images of an album.

printOpenStreetMap([array<string|int, mixed> $geodata = NULL ][, string $width = NULL ][, string $height = NULL ][, array<string|int, mixed> $mapcenter = NULL ][, int $zoom = NULL ][, array<string|int, mixed> $fitbounds = NULL ][, string $class = '' ][, int $mapnumber = NULL ][, obj $obj = NULL ][, bool $minimap = false ]) : mixed

For more flexibility use the class directly.

The map is not shown if there is no geodata available.

Parameters
$geodata : array<string|int, mixed> = NULL

Array of the geodata to create and display markers. See the constructor of the openStreetMap Class for the require structure

$width : string = NULL

Width with unit, e.g. 100%, 100px, 100em

$height : string = NULL

Height with unit, e.g. 100px, 100em

$mapcenter : array<string|int, mixed> = NULL

geodata array(lat,lng);

$zoom : int = NULL

Number of the zoom 0 -

$fitbounds : array<string|int, mixed> = NULL

geodata array('min' => array(lat,lng), 'max => array(lat,lng))

$class : string = ''

Class name to attach to the map element

$mapnumber : int = NULL

If calling more than one map per page an unique number is required

$obj : obj = NULL

Image or album object to skip current image or album and also $geodata

$minimap : bool = false

True to show the minimap in the lower right corner

Tags
deprecated
2.0

– Use openStreetMap::printOpenStreetMap() instead

global

obj $_zp_current_album

global

obj $_zp_current_image

global

string $_zp_gallery_page


        
On this page

Search results