NextGEN Gallery geo is a flexibe plugin, displaying beautiful maps with your photos by using EXIF Data or geocoding.
!!! 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 (tested up to version 4.0.4), 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 Azure Maps and requires free Azure Maps API Key to function.
How can I acquire the API Key?
Go to: https://azure.microsoft.com and click “Get started with Azure” and then “Try Azure for free”. You will need a Microsoft account. Log in to it. Follow the instructions to create a new Azure Maps account and Get the subscription key for your account in here: https://learn.microsoft.com/en-us/azure/azure-maps/quick-demo-map-app. Copy and past the key to the corresponding field on the General tab.
Important: Add your website domain to the CORS Allowed Origins field i.e. https://www.yourdomainname.com.
This service is free up to a certain limit.Azure Maps offers a number of free transactions each month as shown in Azure Maps pricing (https://azure.microsoft.com/en-us/pricing/details/azure-maps). For example, you get 5,000 free Base Map Tile transactions per month. Each transaction can include up to 15 tiles for a total of 75,000 tiles rendered for free each month.
How can I use Geo2 Maps?
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’ );
Shortcode? Which Shortcodes?
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]
Can I use this plugin, even if there is no GPS data stored in the EXIF of my photos?
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.
What is the Ajax Mode?
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.
What is the Worldmap Mode?
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].
What is the Route Mode?
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, GeoJSON, GML (Geography Markup Language, exposed via GeoRSS), GPX (GPS Exchange Format) and Spatial CSV.
You can show any information contained in these files on a map.
Why I can’t upload my route file to WordPress Media Library?
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’
How can I define the map style?
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.
Can I reset all parameters to default values without uninstalling the plugin?
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.
I made changes to my galleries but I do not see changes on maps.
This is likely due to the caching of EXIF and GPS data which is used to speed up map loading. To see your changes immediately, go to the plugin settings (General tab) and check “Disable EXIF Caching”. This will clear the cache. You can re-enable it afterwards to restore performance benefits.