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¶meters
- Directions — request directions and launch Google Maps with the results:
https://www.google.com/maps/dir/?api=1¶meters
- Display a map — launch Google Maps with no markers or directions:
https://www.google.com/maps/@?api=1&map_action=map¶meters
- Display a Street View panorama — launch an interactive panorama image:
https://www.google.com/maps/@?api=1&map_action=pano¶meters
$.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");
}
}
});