Statamic Code segment for conditionally displaying content based on segment url.
In this case load the maps plugin javascript when the url is domainname.com/location.

This is placed at the end of the layout file.

The concept can also be used to conditionally load any content.