I am trying to control the opacity of a custom overlay that I have created using the Google Maps API. Nothing new here so I searched Stack Overflow and came across this tutorial from this question.
I'm not a JavaScript expert so I'm having some troubles. I looked through the code, and tried to adapt it with what I already have, but no luck so far. If I check for error messages in Firebug, I get the following message: Uncaught TypeError: Cannot read property 'length' of undefined
If you look through my JSFiddle here, you can see that the error is on Line 8 relating to var tileCount
. I am not sure how to tweak this part of the code to make it work with what I have, which is a single image and not tiles as in the tutorial.
The slider... slides, but doesn't change the opacity. The knob/handle is missing initially as well.
Thanks for your help and guidance.
P. S. Yes, I know the custom overlay isn't perfectly aligned with the map background, but this is just an experiment/learning process.
P. P. S. I reposted this question since I realized I had inserted the wrong link.