NGG Geo2 Maps Add-on is a flexible extension plugin for NextGEN Gallery, displaying maps with your photos, galleries or albums located using EXIF GPS …
!!! Please notice that “Ratings” do not represent the current plugin version quality – which was updated and corrected. Please check by yourself and leave feedback.
NGG Geo2 Maps Add-on is a flexible extension plugin for free or Pro NextGEN Gallery, displaying maps with your photos, galleries or albums located using EXIF GPS data or geocoding.
The goal of this plugin is to add to WordPress similar geolocation functionality as other web-based self-hosted photo manager apps have like Gallery 3, Piwigo, PhotoPrism or LibrePhotos.
The plugin is using Microsoft Bing Maps and requires a free Bing Maps API Key to function.
Pushpins with hover effect. Aerial map style.
The Infobox showing detailed information about a picture.
Rectangular Thumbnails with border in portrait or landscape orientation. Birds Eye View map style.
World Map with square Thumbnails. No map Dashboard.
Worldmap with different pins for albums and galleries. No map Dashboard.
Closed map in Ajax Mode shows enable bar.
Opened map in Ajax Mode with round Thumbnails. Road map style.
Photo preview with Fancybox 3 Lightbox.
Route Mode displaying .kmz path. Road map style.
There are three ways of using Geo2 Maps Add-on:
1. Generate maps automatically
The plugin searches for galleries in your posts and includes a map if there is geodata available. Easy to use, you don’t need to change anything on your theme.
2. Include maps using the shortcode [geo2]
Simply use the shortcode [geo2] anywhere in your posts. You can define plenty of options.
3. Use the php-function (for theme development)
If you want to embed the plugin in your theme, you can use the following php-functions:
– specify which galleries using $options[‘id’]
– specify which pictures using $options[‘pid’]
– specify galleries or/and albums using $options[‘include’] = “galleries”, “albums” or “all”
If you don’t define any gallery ids, the plugin will search for the gallery ID in the post.
If you don’t define any picture ids or tag names, the plugin will show an empty map.
For Worldmap if you don’t define any gallery or album ids, the plugin will show all galleries and albums.
$options must be defined as an array, containing the same data as the shortcodes.
The parameters are optional. By delivering the IDs of the objects or tag names, this function can be used outside of The Loop.
Example:
$options = array( $options[‘map_width’] = ‘auto’, $options[‘map_height’] = ‘500px’ );
There is only one Shortcode: [geo2] followed by options.
All available Shortcode options are described in the Geo2 Maps options panel. ( NextGEN Gallery -> Geo2 Maps )
Example:
[geo2 id=18 map=road map_height=100px map_width=200px exif=1 minimap=1]
[geo2 worldmap=1 include=all map=road map_height=500px map_width=auto]
[geo2 pid=2,4,15 xmlurl=http://path_to_your_file_with_route.gpx]
Yes, to some extent. The plugin will try to place a gallery or an album on a map using geocoding even if no photos have GPS data. You can use different providers for geocoding, sometimes they generate differing results. Try to define a clear and unique Title corresponding to a location name.
Unfortunately, the plugin will not show photos on a map if they have no GPS coordinates! But don’t worry. You can add them by using free “Geosetter” for example.
If you don’t want maps to get loaded every time, you can use the Ajax mode. If activated, the plugin will display a button. Clicking on it will load this map using an Ajax request.
The Worldmap mode gives you the possibility to show an overview of all or specific galleries and albums of your blog. If the preview picture has GPS coordinates gallery will be placed using it. Otherwise, the position will be geolocated using the title. You can include the Worldmap in your post by using the shortcode [geo2 worldmap=1].
You can use the Route mode, to display your travel route. Therefore, photos taken during this trip can be connected by it. The Route mode can be activated for all galleries using the options panel. Alternatively, you can activate the route mode for single maps using the shortcode.
If you have recorded your route to a file, you can upload it to the gallery folder. Place a path to it in a map Shortcode.
Example: [geo2 xmlurl=http://path_to_your_file_with_route.gpx]
Accepted are common geospatial XML file formats such as KML (Keyhole Markup Language), KMZ (compressed KML), GeoRSS, GML (Geography Markup Language, exposed via GeoRSS), and GPX (GPS Exchange Format).
You can show any information contained in these files on a map.
For security reasons, WordPress is allowing to upload files only of a specific type. You can unlock uploading a specific file type by telling WordPress which MIME Type it should consider as safe. Some additional plugins can do this easily. I’m using Enhanced Media Library.
These are the MIME Types you may want to register:
gpx => ‘application/gpx+xml’
xml => ‘application/xml’
kml => ‘application/vnd.google-earth.kml+xml’
kmz => ‘application/vnd.google-earth.kmz’
Some options like map-width and map-height can be changed in the options panel. The maps are using the div-class .geo2_maps_map, so you can use CSS, too.
You. There is an option to do so at the bottom of the “General” tab. You will still need to deactivate and reactivate it after selecting this option.
Update: Options text corrected.
Bugfix: Thumbnails full filename acquired from pictures meta_data in database prevents incompatibility with older file naming
NEW: Pictures in galleries are now sorted in the same way as in the NextGEN Gallery
Update: Recommended error handling added for Exif read data
Bugfix: Excluding images in galleries works again
Update: Code fully aligned with WordPress coding standards
Bugfix: All PHP warnings resolved
Update: Added compatibility with PHP 8.0
Bugfix: Map created with a Shortcode with route path only searching unnecessarily for any galleries in a page content corrected
Update: New map options have been added to hide parts of map interface
Bugfix: Shortcode parameters containing capital letters not working
Update: Slimbox 2 code slightly improved, version updated to 2.06
Bugfix: Plugin slug amended to match WordPress old plugin slug
Bugfix: Slimbox image counter now shows numbers correctly
Security fix : unserialize() function removed creating PHP object injection vulnerability
NEW: Upload media button added for the route file
Changed: Bing Maps API key field moved to the “General” tab, description amended
Update: Wp-color-picker-alpha Javascript updated to version 3.0.0
Bugfix: Remains of the old code removed causing plugin to crash for some users
Bugfix: Deactivation warning enabled
Security fix : all user entered data is now validated
NEW: Full screen button for maps
Changed: Redesigned admin options panel
NEW: Lightbox AJAX request for other photos (Worldmap mode)
Changed: Admin panel sub-menu now located in NextGen Gallery menu
Changed: Use stored EXIF data, if available
Bugfix: Example map don’t work