Search code examples
google-maps-api-3webstorm

"unresolved variable or type google"


Using Google Maps API, WebStorm is telling me that google is unresolved. I have added the library in the Languages & Frameworks setting but it persists.

enter image description here


Solution

  • google-maps is not the right library, please use googlemaps instead. You can download it via File | Settings | Languages & Frameworks | JavaScript | Libraries, or install in your project via npm (npm install @types/googlemaps --save-dev)

    enter image description here