我有這個問題未捕獲的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。 但還有另一種方法嗎?