Skip to content Skip to sidebar Skip to footer

Google Maps Won't Work When Using Classes To Select Multiple Canvases

I'm currently building a cms which should be able to dynamically render several Google Maps instances. My current approach is to find all divs with the class 'gMapsCanvas' and init

Solution 1:

.get() returns an array.

Change:

_parent.maps.push(new GoogleMap($(this).get(), $(this).attr("data-address")));  

To:

_parent.maps.push(new GoogleMap($(this).get(0), $(this).attr("data-address")));  

working example


Post a Comment for "Google Maps Won't Work When Using Classes To Select Multiple Canvases"