简体   繁体   中英

Google maps Javascript API doesn`t work on IOS device

I add Google maps JS API on my website.

<script>function initMap() { var map = new google.maps.Map(document.getElementById('map'), {
zoom: 17,
center: {lat: -33.8666, lng: 151.1958}});} </script>

script(async defer src="https://maps.googleapis.com/maps/api/js?**********&v=3&callback=initMap")

On desktop map work good, only problem with IoS devices. On Iphone I have this: Google maps JS API on Iphone

Do you know what a problem with this?

Than you!

Since you're using iOS, you can use the Google Maps API for iOS directly. If you're going to use Google Maps API for iOS I think you should check the Getting Started Maps guide for iOS so you won't encounter those kind of errors. Before you can begin working with Google Maps on iOS, you need to download the Google Maps SDK for iOS and ensure that you have an API key.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM