Object # <HTMLDivElement> does not have a 'setCapture' method

After making changes to any Google Maps code, I started getting the following error when I try to drag a map on a map:

Uncaught TypeError: object # has no setCapture method

Google did not get any results for this error, so I am, however, creating this question.

+5
source share
1 answer

Can you show your code?

Recently, I’m mistaken, probably yours. I do this in my javascript code:

var components = $(".comp-div");

for ( var i = 0; i <= components .size(); i++) {
    components[i].css("width"));
}

When you use [] to access an element in a jQuery array, you get a DOM element not a jQuery object, maybe you are doing this or something like this, so it does not have jQuery methods or any google-mapsmethods.

. eq(), . :

var components = $(".comp-div");

for ( var i = 0; i <= components .size(); i++) {
    components.eq(i).css("width"));
}
0

All Articles