Google Maps API implemented with prototype method