Uncaught TypeError: Cannot set property ‘position’ of undefined

I looked up google.maps.Map() and the Google reference says that the first parameter should be a mapDiv:Node which is the container for the map and is typically a div element.

You are passing $(this) which is likely a jQuery object which is not what Google maps is expecting. I don’t know the rest of your code, but perhaps you should just be passing this instead of $(this).

Leave a Comment