refactoring googlemaps.js and fieldtrips.js