refactor gmaps.js