我有这个问题未捕获的ReferenceError:未定义handleLocationError谷歌地图API
getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS.
因此,我抛出这个错误
Uncaught ReferenceError: handleLocationError is not defined
因此,我调用API
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=ADVJFGFNFV4B2wTtyywqsMs--NTpg2w0&libraries=drawing,places"></script>
生产给了我错误
本地作品完美
一种解决方案是使用https。 但还有另一种方法吗?