-2

我正在为 ANDROID 和 IOS 开发移动应用程序。我想从应用程序传递到 API的地址中获取 latitude , longitude 。哪个 Google API 用于从地址获取纬度和经度,另外让我知道在 php 和 android 和 ios 中每天调用 API 是否有任何每日限制

4

1 回答 1

-1
    <script
        src="https://code.jquery.com/jquery-3.3.1.min.js"
        integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
        crossorigin="anonymous">

            // get you address field
            var city = document.getElementById("home_city_select").value;

            var jsonLtdLng="https://maps.googleapis.com/maps/api/geocode/json?address="+city+"&key=API_KEY";

            $.getJSON(jsonLtdLng, function (data) {
              console.log(data.results[0].geometry.location.lat);
            console.log(data.results[0].geometry.location.lng);
            });
</script>
于 2018-11-25T01:03:49.523 回答