首页 > 解决方案 > Google Maps Uncaught TypeError: b.has is not a function

问题描述

We are including the Google Maps API V3 in our internal systems with the below code:

script src="https://maps.googleapis.com/maps/api/js?key=&libraries=places,geometry"

This was working until a few hours ago (9am AEST) now in the console all that's returned is:

Uncaught TypeError: b.has is not a function from https://maps.googleapis.com/maps-api-v3/api/js/35/3/map.js

Is anyone else facing the same problem?

How can I fix it when the code is included from Google's servers?

标签: javascriptgoogle-maps-api-3

解决方案


Had the same problem, using an older version fixed it for now:

https://maps.googleapis.com/maps/api/js?v=quarterly&key=API_KEY

Long time fix - You probably overwrote the native window.Map, see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Map


推荐阅读