Geolocation: map.js override

Is it possible to override any files in a plugin or only the display views?

I'd like to lightly edit a javascript file in Geolocation/views/shared/javascripts/maps.js.

Thanks -- Erin

You can override pretty much any plugin file that resides in its "views" directory.

Some plugins may directly know the paths to the files they'll load (like Exhibit Builder and the layouts), but those are the exception to the rule.

You should be able to override that javascript file by placing a different copy in the right place in your theme: your-theme/geolocation/javascripts/maps.js.

I placed my edited version at /themes/myTheme/geolocation/javascripts/map.js and it doesn't seem to be making a difference.

Hmm, I assume you're trying to change something about how the map works on item show pages? There might be an issue with getting your "replacement" version loaded in that case.

However, I'd expect any changes you made to have taken effect on the map browse.

The easiest way to tell if your new file is being used is to just check the HTML source to see what the "map.js" path being used in the script tag is.

Yep, looks like it's still loading from the plugin directory for some reason. This applies in all locations where the map appears.