This plugin implements a widget with a static google map which shows the GPS coordinates if those are available in the featured image.
Besides the widget it also adds two shortcodes:
- width: width of the mapimage in px. default 300px
- height: height of the mapimage in px. default 200px;
- zoom: googlemaps zoomlevel. Default 11
- Errors: Show error messages when no exif is available or when there’s no featured image. Default is false for the shortcode
[EXIF_locationmap width=750 height=300 zoom=11 errors=false apikey=###]
- part: ‘latitude’, ‘longitude’ or ‘both’
- form: ‘dec’ or ‘dms’ (decimal or Degree minute seconds. Decimal is default);
will return 52.22935055,6.8737411
[EXIF_location part=both form=dms] will return 52°21'13"N , 6°26'7"N
If you would like to add this geoinformation also to your rss feed, there’s my addGEORSS plugin which does exactly this. It uses the same data as stored by this plugin.
- Why did you write this widget?
As an first attempt to write a widget and because I couldn’t find one that did what thisone does (and nothing more!)
- Why the shortcodes
Guess you can use them for generating your own image from bing maps or alike. Putting a big map in the content has it’s charm too..
- I would like to edit the coordinates
Well, you probably can in your image processing software. Digikam can do it, so can darktable. But starting with the map on the editscreen I’m
slowely working towards this feature.
- Where to get an API Key
For now, this is a bit of a nerd stuff.. Go to https://console.developers.google.com, log in and create a project, search for the “static maps api”
under libraries and enable it.
Go to the “Credentials” screen and use the button “Create credentials”. Select API key. And save it. Google suggests to restrict the usage of the key by IP
or HTTP. If you want to use IP (test-environment of virtual server and the like) don’t forget to add ipV4 AND ipV6 if you use both.
Also, it takes a few minutes for the system to recognise the changes. Until that time you will get an 403 error with a message about an outdated api.
Just be patient..
No response on support forum and does not work with php 7.
To bad, I really like the plugin.
There was a problem with the notification, Jordan is looking at the plugin again and is fixing the problem. Great plugin and dev!
Registro de cambios
Fixed some user reported issues
centered the messages in the widgetarea
Added an google apikey field in the widgetsettings. This key is only needed when you want to show a map AND have substansional usage of your site.
Some changes to the basic_plugin_class which, regretfully, isn’t allowed to have it’s own plugin anymore.
Fixes for WP4.3
Cleaned up the code and fixed some minor bugs.
Added translation support and added an extra dutch translation. If you translate the pluing the resulting .po file would be appriciated.
I used the “CodeStyling Localization” for my translation and it worked like a dream.
Added the map to the media edit page.
Added form attribute
- learned the order in which plugins are loaded is important. So I’ve added checkes for the existance of functions
Nothing really just trying to clean up some stupid svn mixups..
found coordinates are stored in the database. For now this is done whenever the plugin is shown and only for the post on screen.
For those interested I use the meta_key “EXIF_location” containing an array with latitude,longitude and hasLocation. hasLocation is
a boolean which is true when the lat/long fields are filled, but empty. (No EXIF info available in the image!)
Added the shortcode EXIF_location and EXIF_locationmap
- First release