Display Map for a specific Photos.app album in macOS?

In iOS Photos.app I can view and album and select "Show Map". Then I see the map view for an album. I think I could do that in iPhoto too. In Ventura Photos.app I don't think there's a way to do this. Maybe it was added in Sonoma but I can't find any good Google hits.


Is this indeed missing in macOS Photos.app?

Posted on Mar 9, 2024 8:45 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 12, 2024 12:20 PM

When I want to see just the photos from one album on a map, there are two ways:

  • Select the photos in the album and export them two a different Photos Library. Then you can open the new library with the selected photos and use the Places map to browse the photos on a more detailed map.
  • Or run an Apple Script to show the selected photos in the maps app. Then we do not need to create a separate library. Just select all photos in the album and run this script:
use framework "MapKit"
use framework "CoreLocation"
use framework "Foundation"
use scripting additions

set shouldShowTraffic to false
set mapTypeIndicator to 1

tell application "Photos"
	activate
	try
		set theseMediaItems to get the selection
		if theseMediaItems is {} then error "No photos are selected."
		set mediaItemsMetadata to {}
		repeat with i from 1 to the count of theseMediaItems
			set thisMediaItem to item i of theseMediaItems
			set thisLocation to the location of thisMediaItem
			if thisLocation is not {missing value, missing value} then
				set thisTitle to the name of thisMediaItem
				if thisTitle is missing value then
					set thisTitle to filename of thisMediaItem
				end if
				set thisID to the id of thisMediaItem
				set thisURL to ("photos://" & thisID)
				set the end of mediaItemsMetadata to {thisTitle, thisLocation, thisURL}
			end if
		end repeat
		if mediaItemsMetadata is {} then error "None of the selected images contain location data."
	on error errorMessage number errorNumber
		if errorNumber is not -128 then
			display alert "ERROR" message errorMessage buttons {"Cancel"} default button 1
		end if
		error number -128
	end try
end tell

tell application "Maps"
	try
		set theseMapItems to {}
		repeat with i from 1 to the count of mediaItemsMetadata
			set thisMetadata to item i of mediaItemsMetadata
			copy thisMetadata to {thisMediaItemTitle, thisLatitudeLongitudePair, thisMediaItemURL}
			copy thisLatitudeLongitudePair to {thisLatitude, thisLongitude}
			-- create a coordinate
			set aCoordinate to {latitude:thisLatitude, longitude:thisLongitude}
			-- create an address book dictionary 
			set aAddressBookDictionary to (current application's NSDictionary's dictionaryWithObjects:{"Otto", "Automator"} forKeys:{"kABPersonFirstNameProperty", "kABPersonLastNameProperty"})
			-- create a placemark using the coordinate and address dictionary
			set aPlacemark to (current application's MKPlacemark's alloc()'s initWithCoordinate:aCoordinate addressDictionary:aAddressBookDictionary)
			-- create a map item using the placemark
			set aMapItem to (current application's MKMapItem's alloc()'s initWithPlacemark:aPlacemark)
			set aMapItem's |name| to thisMediaItemTitle
			set aURL to (current application's NSURL's URLWithString:thisMediaItemURL)
			set aMapItem's URL to aURL
			-- set aMapItem's |phoneNumber| to "555-555-5555"
			-- add the new map item to the list of map items
			set the end of theseMapItems to aMapItem
		end repeat
		-- create a dictionary of the map settings
		set mapOptionsDict to current application's NSDictionary's dictionaryWithObjects:{shouldShowTraffic, mapTypeIndicator} forKeys:{"MKLaunchOptionsShowsTraffic", "MKLaunchOptionsMapType"}
		-- display the location in the Maps application
		current application's MKMapItem's openMapsWithItems:theseMapItems launchOptions:mapOptionsDict
	on error errorMessage number errorNumber
		if errorNumber is not -128 then
			display alert "ERROR" message errorMessage buttons {"Cancel"} default button 1
		end if
		error number -128
	end try
end tell


After running this script, you will be seeing the titles of the photos as places markers in Maps, and can zoom the view as you like, from a pole to pole view of the globe to a detailed city map, or even a satellite view of a hiking trip.

For example:

4 replies
Question marked as Top-ranking reply

Mar 12, 2024 12:20 PM in response to jfaughnan

When I want to see just the photos from one album on a map, there are two ways:

  • Select the photos in the album and export them two a different Photos Library. Then you can open the new library with the selected photos and use the Places map to browse the photos on a more detailed map.
  • Or run an Apple Script to show the selected photos in the maps app. Then we do not need to create a separate library. Just select all photos in the album and run this script:
use framework "MapKit"
use framework "CoreLocation"
use framework "Foundation"
use scripting additions

set shouldShowTraffic to false
set mapTypeIndicator to 1

tell application "Photos"
	activate
	try
		set theseMediaItems to get the selection
		if theseMediaItems is {} then error "No photos are selected."
		set mediaItemsMetadata to {}
		repeat with i from 1 to the count of theseMediaItems
			set thisMediaItem to item i of theseMediaItems
			set thisLocation to the location of thisMediaItem
			if thisLocation is not {missing value, missing value} then
				set thisTitle to the name of thisMediaItem
				if thisTitle is missing value then
					set thisTitle to filename of thisMediaItem
				end if
				set thisID to the id of thisMediaItem
				set thisURL to ("photos://" & thisID)
				set the end of mediaItemsMetadata to {thisTitle, thisLocation, thisURL}
			end if
		end repeat
		if mediaItemsMetadata is {} then error "None of the selected images contain location data."
	on error errorMessage number errorNumber
		if errorNumber is not -128 then
			display alert "ERROR" message errorMessage buttons {"Cancel"} default button 1
		end if
		error number -128
	end try
end tell

tell application "Maps"
	try
		set theseMapItems to {}
		repeat with i from 1 to the count of mediaItemsMetadata
			set thisMetadata to item i of mediaItemsMetadata
			copy thisMetadata to {thisMediaItemTitle, thisLatitudeLongitudePair, thisMediaItemURL}
			copy thisLatitudeLongitudePair to {thisLatitude, thisLongitude}
			-- create a coordinate
			set aCoordinate to {latitude:thisLatitude, longitude:thisLongitude}
			-- create an address book dictionary 
			set aAddressBookDictionary to (current application's NSDictionary's dictionaryWithObjects:{"Otto", "Automator"} forKeys:{"kABPersonFirstNameProperty", "kABPersonLastNameProperty"})
			-- create a placemark using the coordinate and address dictionary
			set aPlacemark to (current application's MKPlacemark's alloc()'s initWithCoordinate:aCoordinate addressDictionary:aAddressBookDictionary)
			-- create a map item using the placemark
			set aMapItem to (current application's MKMapItem's alloc()'s initWithPlacemark:aPlacemark)
			set aMapItem's |name| to thisMediaItemTitle
			set aURL to (current application's NSURL's URLWithString:thisMediaItemURL)
			set aMapItem's URL to aURL
			-- set aMapItem's |phoneNumber| to "555-555-5555"
			-- add the new map item to the list of map items
			set the end of theseMapItems to aMapItem
		end repeat
		-- create a dictionary of the map settings
		set mapOptionsDict to current application's NSDictionary's dictionaryWithObjects:{shouldShowTraffic, mapTypeIndicator} forKeys:{"MKLaunchOptionsShowsTraffic", "MKLaunchOptionsMapType"}
		-- display the location in the Maps application
		current application's MKMapItem's openMapsWithItems:theseMapItems launchOptions:mapOptionsDict
	on error errorMessage number errorNumber
		if errorNumber is not -128 then
			display alert "ERROR" message errorMessage buttons {"Cancel"} default button 1
		end if
		error number -128
	end try
end tell


After running this script, you will be seeing the titles of the photos as places markers in Maps, and can zoom the view as you like, from a pole to pole view of the globe to a detailed city map, or even a satellite view of a hiking trip.

For example:

Mar 10, 2024 10:04 AM in response to jfaughnan

jfaughnan wrote: I can view and album and select "Show Map".

In Photos on the Mac, choose the Folder that encloses the album you are interested in. This may be the folder My Albums. Choosing a folder will show all the albums inside the folder. If you select an album from the thumbnails and choose Info (⌘-i),

then you will see a map with the locations marked for all the pictures inside that album.


If you have a folder with folders inside, you can click on the enclosing folder, and the info window will show map locations for the folders inside-- at this scale it seems to be pretty coarse...

Mar 12, 2024 8:14 AM in response to jfaughnan

I'm not sure what you mean by "static." Here is a map from an album of pictures I took around the town square in Mckinney, Texas:

There's one location shown at the courthouse.


But there's a little plus sign at the bottom that allows me to zoom in:

and you can see pictures I made around the Square.


It is true that it's small. In the Places view, you get full screen with picture counts,


But this shows sites in more than one album.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Display Map for a specific Photos.app album in macOS?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.