站外跳转到谷歌地图

https://developers.google.com/maps/documentation/urls/guide


Launch Google Maps and perform a specific action

To launch Google Maps and optionally perform one of the supported functions, use a URL scheme of one of the following forms, depending on the action requested:

  • Search — launch a Google Map that displays a pin for a specific place, or perform a general search and launch a map to display the results:
    https://www.google.com/maps/search/?api=1&parameters
  • Directions — request directions and launch Google Maps with the results:
    https://www.google.com/maps/dir/?api=1&parameters
  • Display a map — launch Google Maps with no markers or directions:
    https://www.google.com/maps/@?api=1&map_action=map&parameters
  • Display a Street View panorama — launch an interactive panorama image:
    https://www.google.com/maps/@?api=1&map_action=pano&parameters


            $.getJSON('https://geoip-db.com/json/', function(response) {
                var city = response.city;
                var state = response.state;
                var country = response.country_name;
                console.log('https://geoip-db.com/json/city='+city);
//                ShowMarkersByAddr(response.city, '');
                if (NeverFound == 1) {
                    dialog_alert("提示", "您当前位置未发现洗车设备,请重新搜索");
                    //执行一次默认搜索
//                    OnAddrSelected();
                } else {
                    var name = response.city;
//                    if (name.indexOf("市") > 0)
//                        response.city = name.substr(0, name.indexOf("市"));
                    if(response.city != null ){
                        $("#city").append("<option value='" + response.city + "'>" + response.city + "</option>");
                        $("#city").find("option[value='" + response.city + "']").attr("selected", "selected");
                    }
                }
            });


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值