Skip to content
xbgmsharp edited this page Dec 7, 2015 · 40 revisions

piwigo-openstreetmap

This place is mean to store the documentation of the plugin piwigo-openstreetmap.

Feel free to edit it and contribute.

This plugin displays location information on your web gallery Piwigo with the only open source worldwide map OpenStreetMap, created by people like you.

Piwigo plugins directory need to be writable to install the plugin.

Piwigo root directory need to writable to create 'osmmap.php' file.

Configuration panel

Right panel configuration

Add location before

Make sure that the position you choose for the map is set in 'Display' options to be visible and does exist. Configuration -> Options -> Display

For example the 'Who can see this photo' option is only available to Admin, so choosing this will make the map invisible to everyone but Admin, and choosing something like 'Date Taken' will hide the map for any photos where there is no 'Date taken' in the Metadata (eg photos stripped of Metadata by software) and one is not set in Batch Manager.

Then adapt to your need the layout of the map.

Sample Location

Left menu configuration

This allow to show a WorldMap link for your gallery and/or by album and/or by category.

The latest WorldMap (version2) require a modern browser to display correctly.

The beta WorldMap (version3) is leaflet plugin to be fully responsive.

You can select the default WorldMap layout from the configuration menu The old version is still available, to change it, make the link point the desired version.

from :

$ cat  /var/www/piwigo/osmmap.php
<?php
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap2.php');
?>

to (version 1):

$ cat  /var/www/piwigo/osmmap.php
<?php
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap.php');
?>

to (version 3):

$ cat  /var/www/piwigo/osmmap.php
<?php
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap3.php');
?>

Multiple options are available. You can select what you wish to display in the Popup or change the map tiles, etc...

It also works with representative file like for video.

Version1

Sample world map v1

Version2

Sample world map v2

Category's description

You can display a world map on category's description, will display all the images in the gallery.

Main menu

You can display a world map on main menu, will display all the images in the gallery.

Map configuration

OpenStreetMap is all about data and not render, everybody can use those data and render them how they want it, Planet OSM is a good starting point.

This explain why there is multiple Map style available, not all of them are free and OpenSource, they are call OpenStreetMap tiles. You can also use your own server or private title plan, to do so use the 'Custom map style' parameter.

Attribution

OpenStreetMap copyright is mandatory.

However I offer you the choice to show other attribution (eg: Library note, Tile note, Author note) if you want to.

Keywords panel

You can create tags from the address base on the GPS (latitude, longitude) metadata information. This feature require Tag Groups plugin. OSM only allow to create the tags/keywords. In order to manage (delete/edit) the tags/keywords, you need to use the keywords feature: Photos -> keywords

Tag group By default, it is "location". It will create tags like: "location:Germany" or "location:Paris". Tag are create from the address part like city, country, postcode, etc... It is base on the API return by the reverse geo-code from MapQuest.

Features

Photo Edit

You can 'Point and click' a new location for a photo in the photo properties menu by selecting the OpenStreetMap.

Sample OpenStreetMap photo edit

Batch Manager

You can 'Point and click' a new location for multiple photo using the batch manager. it does support batch manager in global and single mode.

Sample OpenStreetMap batch manager global

Sample OpenStreetMap batch manager single

GPX

This plugin extend PWG support for GPX tracks file. The plugin now support GPX tracks. Each tracks is display as an image item, this mean all GPX tracks file have all PWG features like permission, album, etc... You should upload GPX tracks are per normal photos to PWG. All need is to upload your GPX tracks file the PWG way.

By default PWG only lets you upload photo-types, so you need to go to Local Files Editor plugin and cut and paste in this line: Plugins -> LocalFiles Editor:

          $conf['upload_form_all_types'] = true;

GPX track file display a map with an elevation panel.

Sample OpenStreetMap GPX

Translation

You can help by translating the plugin in your language. Thanks to the contributors. It is available via the translate tool from piwigo.

Support

To get support, please create new issue

Help me improve the plugin, rate my plugin, and if possible please send a greeting message to me ;)

  • Configuration panel

    • Right panel configuration
      • Add location before
    • Left menu configuration
    • Category's description
    • Main menu
    • Map configuration
  • Keywords panel

  • Features

    • Photo Edit
    • Batch Manager
    • GPX
    • Translation
Clone this wiki locally