The Map module of Lightroom 6 (also sold as Lightroom CC 2015) stopped working: first in 2018, when Adobe's Google Maps contract ended, and completely in 2023, when Google's maps stopped working inside Lightroom.
This project brings the Map module back. It replaces Google Maps with free maps from OpenStreetMap, Esri and OpenTopoMap.
- No Google account, no API key, no costs.
- Everything works like before: placing photos on the map, saved locations, GPS tracklogs, search, and addresses of photos.
- You patch Lightroom once. Fixes and improvements are installed automatically when Lightroom starts.
- Before you start
- What you need
- Step-by-step instructions
- Map styles
- Updates
- Troubleshooting
- Known limitations
- For advanced users
- How it works
- Credits
- Make a backup. You will change files of Lightroom. With the backup from step 2, you can always go back.
- Take your time. Most steps are simple, but the file names must be exactly right.
- No warranty. We are not responsible if something goes wrong with your Lightroom installation. If you are unsure, ask someone who is comfortable with computers to help you. We are not your IT support.
Did you use the old Google Maps fix from this project? You can apply this fix on top of it, or start again from your original backup. You no longer need your Google Maps API key, and you can delete it in your Google Cloud account.
Did you use any of the "hacks" from older versions of this project? Then start again from an original, unmodified Map module (your backup from before you applied them, or a reinstallation of Lightroom). The hacks were made for Google Maps and may break the new fix.
- Lightroom 6.14 on Windows or Mac. Lightroom 5 and Lightroom Classic 7 or newer are not supported.
- An internet connection. The map never worked offline.
- Python 3, a free program that runs the patch script. Download it from python.org.
- On Windows, select Add python.exe to PATH on the first page of the installer, before you click Install Now.
- On Mac, install Python 3 from the same page if
python3isn't installed yet.
- On Windows: Resource Hacker, a free program to open Lightroom's module file. Download it from angusj.com.
- At the top of this page, click the green Code button, then Download ZIP.
- Extract (unzip) the downloaded file, for example to your Desktop. You get a folder called
lightroom-map-fix-master.
In the following steps, this folder is called the project folder. It contains patchluastr.py, the folder patches and some other files. You will do all the work in this folder.
- Close Lightroom.
- Find the Map module:
- Windows: the file
Location.lrmodulein Lightroom's program folder. That's usuallyC:\Program Files\Adobe\Adobe LightroomorC:\Program Files\Adobe\Lightroom. If you can't find it, start Lightroom and select Help > System Info: the line Application folder shows the program folder. - Mac: go to
/Applications/Adobe Lightroom/, right-clickAdobe Lightroom.app, and select Show Package Contents. Open the folderContents, thenPlugIns. The Map module isLocation.agmodule.
- Windows: the file
- Copy the Map module to a safe place, for example a folder called "Lightroom backup" in your Documents.
Important: Don't keep the backup in the same folder as the original. If you do, Lightroom may load the backup instead of the fixed module. If you must keep it there, rename it, for example to
Location.lrmodule_bak.
You need three files from inside the Map module. Put them directly into the project folder from step 1, next to patchluastr.py.
Windows:
- Start Resource Hacker and open
Location.lrmodulefrom Lightroom's program folder (File > Open). - On the left, open the section LUA.
- Right-click LOCATIONMAPVIEW.LUA and select Save *.bin resource. Go to the project folder, and click Save. Resource Hacker already suggests the right name,
LOCATIONMAPVIEW.LUA. - Do the same for REVERSEGEOCODESERVICEFALLBACK.LUA.
- Do the same for LOCATIONVIEWCONTROLLER.LUA.
- Leave Resource Hacker open. You need it again in step 5.
Don't rename these files. The patch script looks for exactly these names.
Mac:
-
Open
Location.agmodulefrom step 2: right-click it and select Show Package Contents, then openContentsandResources. -
Copy these three files into the project folder:
LocationMapView.luaReverseGeocodeServiceFallback.luaLocationViewController.lua
-
In the project folder, rename the three copies by adding
.bakat the end:LocationMapView.lua.bakReverseGeocodeServiceFallback.lua.bakLocationViewController.lua.bak
If macOS asks whether you want to keep
.luaor use.bak, choose Use .bak.
The patch script changes three web addresses in these files. Instead of Google Maps, Lightroom then loads the map fix.
Windows:
-
Open the project folder in File Explorer.
-
Click into the address bar at the top of the window, where the folder path is shown. Type
cmdand press Enter. A black command window opens in the project folder. -
Type this command and press Enter:
python patchluastr.py -p patches\mapfix-shim-win.patchIf Windows says that
pythonwas not found, try the same command withpyinstead ofpython.
The script creates three new files in the project folder: LOCATIONMAPVIEW.bin, REVERSEGEOCODESERVICEFALLBACK.bin and LOCATIONVIEWCONTROLLER.bin.
Mac:
-
Open the Terminal app. It's in Applications > Utilities.
-
Type
cdfollowed by a space. Don't press Enter yet. -
Drag the project folder from Finder into the Terminal window. Its path appears after
cd. Now press Enter. -
Type this command and press Enter:
python3 patchluastr.py -p patches/mapfix-shim-mac.patch
The script creates three new files in the project folder: LocationMapView.lua, ReverseGeocodeServiceFallback.lua and LocationViewController.lua.
Check the result. The script prints a report for each of the three files. On Windows it looks like this (on Mac, the file names are different):
Processing section [map view]
Reading LOCATIONMAPVIEW.LUA
Lua 5.1 detected
Lua settings: endian 1, int 4, size_t 8, instruction 4, number 8
119494 bytes read from file
Found 'http://maps.google.com/maps/api/js?sensor=false' at 10735
Updated 1 strings
Found 'https://maps-api-ssl.google.com/maps/api/js?' at 10552
Updated 1 strings
'&sensor=false&v=' not found, nothing to patch
119567 bytes written to LOCATIONMAPVIEW.bin
Processing section [reverse geocoding page]
Reading REVERSEGEOCODESERVICEFALLBACK.LUA
Lua 5.1 detected
Lua settings: endian 1, int 4, size_t 8, instruction 4, number 8
11273 bytes read from file
Found 'http://maps.google.com/maps/api/js?sensor=false' at 885
Updated 1 strings
11314 bytes written to REVERSEGEOCODESERVICEFALLBACK.bin
Processing section [online check]
Reading LOCATIONVIEWCONTROLLER.LUA
Lua 5.1 detected
Lua settings: endian 1, int 4, size_t 8, instruction 4, number 8
59618 bytes read from file
Found 'https://maps.google.com/maps/api/js?sensor=false' at 5829
Updated 1 strings
59645 bytes written to LOCATIONVIEWCONTROLLER.bin
The numbers can be different on your computer. What matters:
- All three sections must have a line
... bytes written to ...at the end. - "map view": the first
Found ...must be followed byUpdated 1 strings. For the other two,Updated ...andnot found, nothing to patchare both fine. - "reverse geocoding page" and "online check" must each say
Updated 1 strings. - If you see an error like "No such file or directory", one of the three files is missing in the project folder or has a different name. Go back to step 3.
Windows:
-
In Resource Hacker, right-click LOCATIONMAPVIEW.LUA, and select Replace Resource...
-
Click Select File..., choose
LOCATIONMAPVIEW.binfrom the project folder, and click Replace. -
Do the same for REVERSEGEOCODESERVICEFALLBACK.LUA with
REVERSEGEOCODESERVICEFALLBACK.bin. -
Do the same for LOCATIONVIEWCONTROLLER.LUA with
LOCATIONVIEWCONTROLLER.bin. -
Save with File > Save.
If Windows doesn't allow saving into the program folder, use File > Save As to save
Location.lrmodulein your Documents. Then copy it into Lightroom's program folder, replacing the old file.
The new Location.lrmodule may be much smaller than the original. That's normal.
Mac:
Copy the three new files LocationMapView.lua, ReverseGeocodeServiceFallback.lua and LocationViewController.lua from the project folder back into Location.agmodule. That's the folder Contents/Resources from step 3. Replace the files that are there. macOS may ask for your password.
This step makes the addresses of your photos work: city, state and country. Without it, the map works, but no addresses are filled in.
-
Start Lightroom.
-
Select Help > System Info. A window with a lot of technical information opens. Look for the line that starts with Settings Folder, for example:
Settings Folder: C:\Users\yourname\AppData\Roaming\Adobe\LightroomNote that folder. On Mac, it is usually
~/Library/Application Support/Adobe/Lightroom. -
Close Lightroom.
-
Copy the file
config.luafrom thepatchesfolder of the project into that settings folder.If there is already a file called
config.luain the settings folder, don't replace it. Open both files in a text editor, and copy thelocationModulepart into the existing file.
The map should appear as before, now with maps from OpenStreetMap and Esri.
To have Lightroom fill in the addresses of your photos automatically, select Edit > Catalog Settings (on Mac: Lightroom > Catalog Settings), go to Metadata, and enable Look up city, state, and country of GPS coordinates.
Enjoy your map! You can delete the project folder now, or keep it for later.
You can choose the map style with Lightroom's map style menu, as before:
| Map style | Map |
|---|---|
| Hybrid | Satellite photos with roads and place names, from Esri |
| Road Map | OpenStreetMap |
| Satellite | Satellite photos from Esri |
| Terrain | OpenTopoMap, a map with contour lines. You can't zoom in as far as with the other styles. |
| Light | OpenStreetMap, in light gray |
| Dark | OpenStreetMap, in dark colors |
Searching for places and looking up the addresses of photos use OpenStreetMap's Nominatim service.
These are free services. Normal use of Lightroom is fine, but please don't look up the addresses of thousands of photos at once.
You don't need to do anything. When Lightroom starts, it loads the newest version of the map fix (version 1.x). It can take a day or two until a new version reaches you.
Only a major new version (2.0) would require patching again. That would be announced here.
The map shows "Map is offline"
- Check your internet connection.
- Maybe Lightroom loaded the backup instead of the fixed module. Check that there is no copy of the Map module with the original name in Lightroom's folder (see step 2).
- If you patched a module that was modified before, for example with the old hacks from this project, start again from an original Map module.
The map shows "Map tiles could not be loaded from ..." or "The map tile server ... is not responding"
- The map works, but the server that provides the map images can't be reached from your computer.
- Try another map style. They use different servers.
- Check that your computer's date and time are correct. A wrong clock prevents secure connections.
- Check that you can open the server shown in the message in a web browser on the same computer.
Addresses of photos are not filled in
- Check step 6 (
config.lua) and the catalog setting in step 7. - Looking up addresses takes about one second per photo. With many photos, give it time.
Something else doesn't work
- Please open an issue. Tell us your Lightroom version (Help > System Info) and your operating system, and what you see.
- Log files help us a lot. notes.md explains how to turn them on. We need the files
LocationMapView.logandLocationViewController.log.
Going back to the original Map module
- Close Lightroom, and copy your backup from step 2 back to its original place.
- On Mac, Lightroom's built-in browser is too old for today's secure connections. The fix therefore loads the maps through Lightroom's own internet connection. This works the same way, but the map can load a bit more slowly than on Windows.
- Street View and 45° aerial views are not available.
- The Light and Dark map styles look different than with Google Maps.
Choosing a version of the map fix. Add api_version to the locationModule part of config.lua, for example to stay on a specific version:
locationModule = { enablePremiereLicense = false, api_version = "v1.0.4" }Hosting the map fix yourself. You can load the map fix (the file shim/mapfix-shim.js) from your own web server instead of jsDelivr, by setting api_version to a URL:
locationModule = { enablePremiereLicense = false, api_version = "https://example.org/lightroom/mapfix-shim.js" }- The page that looks up addresses of photos ignores this setting. It always loads the newest 1.x version of the map fix from jsDelivr. To host everything yourself, edit the patch file before patching, and replace the jsDelivr URL in all lines that start with
>. - The file must be served as JavaScript. GitHub's "raw" links don't work.
- The URL must not contain
?or&.
Map servers, the geocoding service and other settings are at the top of shim/mapfix-shim.js.
Other file names. If your Lua files have other names, you can patch them one at a time with patches/mapfix-shim.patch:
python patchluastr.py <original file> -p patches/mapfix-shim.patch -o <patched file>
Lightroom 6's Map module was written for Google's Maps JavaScript API. Google's current API no longer runs in the old web browser that is built into Lightroom. On Windows that browser is Chromium 51; on Mac it is Chromium 29.
This project provides mapfix-shim.js, a replacement for the parts of Google's API that Lightroom uses. It is built on Leaflet and free map services. The patch changes three web addresses in Lightroom, so that Lightroom loads the replacement instead of Google Maps, from the jsDelivr CDN. Lightroom's own map code stays unchanged.
More details:
- shim/README.md: the replacement, its configuration, and its diagnostics in Lightroom's log files.
- harness/README.md: a test environment that runs Lightroom's map page in a normal web browser, for development.
- notes.md: reverse engineering notes about Lightroom's Map module, including debug logs.
- Maps and data: © OpenStreetMap contributors, Esri and its data providers, OpenTopoMap (CC-BY-SA).
- Map library: Leaflet by Volodymyr Agafonkin and contributors (BSD-2-Clause).
- Geocoding: Nominatim by OpenStreetMap.
- Original map fix by Adrian Studer, new shim-based fix mostly by Claude.
- Thank you to everyone who tested and contributed in the issues of this project, especially #41 and #44!
