相关疑难解决方法(0)

Google商家信息获得了LatLng

我正在使用自动填充方法获取地方建议,当我点击我想要选择的地方时,我想要提取,Lat并将Lng其放在place.geometry.location下面.

Firebug截图

根据我的观察,关键ibjb随着每个会话不断变化.有什么方法可以提取LatLng可预测吗?

$(document).ready(function() {

    var mapOptions = {
        center : new google.maps.LatLng(-33.8688, 151.2195),
        zoom : 13,
        mapTypeId : google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById('map'), mapOptions);

    $('#searchTextField').bind('keydown keypress', function() {
        setTimeout(function() {
            var inputQuery = $('#searchTextField').val();

            if (inputQuery.length >= 2) {
                //console.log(inputQuery);

                /*
                var service = new google.maps.places.AutocompleteService();

                service.getPlacePredictions({
                    input : inputQuery
                }, callback);
                */

                var input = document.getElementById('searchTextField');
                var options = {
                    types : ['geocode'] …
Run Code Online (Sandbox Code Playgroud)

google-maps geocoding google-maps-api-3 google-places-api

11
推荐指数
1
解决办法
2万
查看次数