出现这个问题是因为没有找到AMap对象 解决办法: // 只需要在new 实例化对象AMap前面添加window就好。后面的xxx为你自己想要的操作。例如添加marker // new window.AMap.Marker({}) new window.AMap.xxx({ // ... })