我在一个运行JScript前端的旧内容管理系统中运行了一个google地图,调用PHP来满足请求。虽然在V3之后,Google Maps API现在可以生成TypeError window.Image is not a function,但一切都运行得很好。
以下跟踪来自Google Chrome浏览器
Uncaught TypeError: window.Image is not a function
k3 @ stats.js:2
Uncaught TypeError: window.Image is not a function
vB @ util.js:9
这是用于加载地
我目前正在尝试将google地图API与react js和babel结合使用。我不想使用现有的react组件(不完整)。
我遇到的问题是我不能加载google地图对象。Babel总是向我显示这样的编译错误:
error 'google' is not defined
如果我在索引中加载google地图脚本,则会发生:
<script src="https://maps.googleapis.com/maps/api/js?key=MY_KEY&libraries=places&callback=initAutocomplete" &g