Because the official Google Photos ™ API doesn’t provide the location of your photos, we need to use another solution to display your photos on the map.
We have the possibility to use your Google Location History (Timeline). The Google Location History is a database where all your location data of the past years are saved (depending on when you enabled it). The advantag is that even DSLR photos and other non taggable items can be mapped!
The database must be downloaded as “KML” file from Google Takout. My App is able to load that zip archive and the KML file inside in order to display your photos on the map.
Please follow these instructions to get your Location History file:
The KML file is parsed one time and than cached in an optimized way. It can be used for other devices as well, if you’re logged in with the same account.
The app is logging your location in a regular basis (every x minutes). That means that you don’t need to download your location history every time to map your new photos.
If you’re using multiple devices, you can enable a feature in the settings, that writes the GPS position into the photo description before it will be uploaded to Google Photos. That allows us to load the position on another device using the official API, so you don’t need to refresh you location history anymore. (disabled by default)