I hope this is the right area to post this topic - if not please feel free to move it.
I am trying to use the Google Maps API to integrate a custom map into my wordpress site.
When I load the page I get the following js error:
TypeError: $ is not a function
$(document).ready(function () {
I have read that with the Google Maps API this error usually indicates that it can’t find the canvas element. If you look at the page, I specified a red border for the canvas div and when the page renders you can just see the top border of it.
any suggestions on how to get this working would be appreciated.
I Tried moving the initialize function from the document ready function to the body unload and now I am getting this error:
TypeError: a is null which am also finding to indicate that the google maps API can’t find the canvas element.
you are correct - I discovered that shortly after posting and was able to work through that… so instead of using the document.ready to call the initialize function i tried calling it from the body unload attribute and now I am getting the following error:
TypeError: a is null
which according to a google search typically indicates that I am trying to initialize the maps API on an element that is not loaded yet… I am not sure why that is happening…