iPhoto

From OpenStreetMap Wiki
Jump to navigation Jump to search

iPhoto was a photo management application for Mac OS X and iOS, part of Apple’s iLife suite, now replaced by the Photos application.

In March 2012, Apple made a foray into OpenStreetMap usage when it introduced a version of iPhoto that displayed photos atop an OpenStreetMap-based map when you organized a library by “Places”.

From iPhoto ’09 to ’11, it was also possible to modify iPhoto to replace Google Maps with OpenStreetMap tiles directly from openstreetmap.org:

IPhoto '09.png Osm on iphoto.png

Changing code of IPhoto - Map: showing OSM Map instead of googlemaps:

File to change: '/Applications/iPhoto.app/Contents/Resources/googleMap.html'

add code: redefining of variable G_PHYSICAL_MAP in function useTerrainMap():

function useTerrainMap()
	    {	
		if (gMap.getCurrentMapType() != G_PHYSICAL_MAP)
		{var G_PHYSICAL_MAP
		   copyOSM = new GCopyrightCollection("<a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a>");
		   copyOSM.addCopyright(new GCopyright(1, new GLatLngBounds(new GLatLng(-90,-180), new GLatLng(90,180)), 0, " "));
		   tilesMapnik = new GTileLayer(copyOSM, 1, 17, {tileUrlTemplate: 'https://tile.openstreetmap.org/{Z}/{X}/{Y}.png'});
		   G_PHYSICAL_MAP = new GMapType([tilesMapnik], G_NORMAL_MAP.getProjection(), "OpenStreetMap");
		   gMap.setMapType(G_PHYSICAL_MAP);
                 }
              return false;
             }

Currently (August 2010), photos tagged in iPhoto or resaved from Preview have their coordinates rounded to 0.01'. This can introduce location error greater than the uncertainty from a GPS unit.