Tyler Polzin


410 Experience
4 Lessons Completed
0 Questions Solved


Posted in How to use Google Maps and Markers Discussion

Super late reply, but I figured out how to properly import this while using Webpack and Rails.

In your application.js file, instead of simply having import 'gmaps';, do the following:

import 'gmaps';
import GMaps from 'gmaps';
window.GMaps = GMaps;

This also applies for those of you (like me) who keep getting "function is not defined" errors.