gmap3: Uncaught TypeError: undefined is not a function

I am developing a WordPress website, and need to display an Google map in the contact page. But i get this error Uncaught TypeError: undefined is not a function in the JavaScript console. Here is the code, can anyone tell mere whats wrong?

$(window).load(function(){
    $(".google-maps").gmap3({
    marker:{ 
        address:"511, amaliesgade, københavn",options:{icon: "img/marker.png"}
    },
    map:{
      options:{
        zoom: 14,
        scrollwheel: false,
        mapTypeControl: false,
        streetViewControl: false,
        scalControl: false,
        draggable: false,
        disableDefaultUI: true}
    }
    }); 
});

Thanks for your time, and thanks in advance

Read More

Troels

Related posts

Leave a Reply

1 comment

  1. In wordpress jQuery will run in no-conflict-mode, where you can’t access jQuery directly via $.

    Try this:

    jQuery(window).load(function($){
        $(".google-maps").gmap3({
        marker:{ 
            address:"511, amaliesgade, københavn",options:{icon: "img/marker.png"}
        },
        map:{
          options:{
            zoom: 14,
            scrollwheel: false,
            mapTypeControl: false,
            streetViewControl: false,
            scalControl: false,
            draggable: false,
            disableDefaultUI: true}
        }
        }); 
    });