Export to KML for WordPress with Geotag and Exiftool

There are several ways to display your geotagged photos in a map. One way is to export the EXIF information of your JPG photos automatically with Geotag and Exiftool. You find a short tutorial how to export KML file in Geotag for WP OSM Plugin integration

Recomented steps:

  1. Copy photos into one folder on your local machine
  2. Upload the photos to your WordPress blog
  3. Generate the KML file with Geotag tool
  4. Edit the post / page and add the OSM Plugin shortcode

1.) Copy photos into one folder on your local machine

There is nothing to explain 😉

2.) Upload the photos to your WordPress blog

After uploadeing the photos copy the folder where your photos are located in the blog, eg:

http://MyDomain.com/wp-content/uploads/sites/2/2014/03/

3.) Generate the KML file with Geotag and modify

After opening Geotag you have to add the folder with your photos and add some configurations for the KML which are valid for all your photos in the KML file:

  • size of the photo in the popup
    (Datei => Einstellungen => Allgemeine Einstellungen => Miniaturbildgröße)
  • location of the photos
    (Datei => Einstellungen => Export => Google Earthe => KML Pfad für Bilder)
  • location of the icon
    (Datei => Einstellungen => Export => Google Earthe => KML icon URL)
OSM_Geotag_EXIF_KML_03

OSM_Geotag_EXIF_KML_03

Next the marker to

<href>http://MyDomain/wp-content/plugins/osm/icons/mic_photo_icon.png</href>

Then you can add some photo-specific informations in the “Beschreibung” field, which is added to the photo in your KML file:

OSM_Geotag_EXIF_KML_02

OSM_Geotag_EXIF_KML_02

Now it’s time to save your “Beschreibung” (despription) to the photo – this can be done at:

Datei => Neue Orte Speichern

Your KML file is configured and the

The abbreviation KML ist not shown in the tool, but you get it if you choose Google Earth => Ausgewählte Bilder exportieren.

EXIF to KML with Geotag

Geotag tool can export EXIF to KML files for the OSM Plugin

Make the description of your KML file readable with any texteditor and replace these strings:

<description>

to

<description><![CDATA[

and

</description>

to

]]> </description>

and

&quot;

to

"

and

&lt;

to

<

and

&gt;

to

>
  • changed the icon from Google-icon to an icon of Map Icons Collection (for legal reasons)
  • changed the placemark for the popup as the size was not correct

4.) Edit the post / page and add the OSM Plugin shortcode

The KML file can be displayed with the WP OSM Plugin like this:

[*osm_map_v3 map_center=”27.354,88.206″ zoom=”12″ width=”100%” height=”350″ file_list=”../../../../wp-content/uploads/osm_map/Test_It_04.kml” map_border=”thin solid grey”]

Click on the camera / on the pic in the popup.

Post your comment in the Forum (DE / EN)