|
@@ -13,13 +13,12 @@ function getLocation() {
|
|
//return;
|
|
//return;
|
|
wx.getLocation({
|
|
wx.getLocation({
|
|
type: 'wgs84',
|
|
type: 'wgs84',
|
|
- isHighAccuracy: true,
|
|
|
|
success: function (res) {
|
|
success: function (res) {
|
|
// alert(JSON.stringify(res));
|
|
// alert(JSON.stringify(res));
|
|
|
|
|
|
var geocoder = new qq.maps.Geocoder({
|
|
var geocoder = new qq.maps.Geocoder({
|
|
complete: function (result) {
|
|
complete: function (result) {
|
|
- alert(JSON.stringify(result));
|
|
|
|
|
|
+ alert(JSON.stringify(result.detail.addressComponents));
|
|
if ('武汉市' === result.detail.addressComponents.city) {
|
|
if ('武汉市' === result.detail.addressComponents.city) {
|
|
autoLocal = '武汉市';
|
|
autoLocal = '武汉市';
|
|
//今晚驻地
|
|
//今晚驻地
|
|
@@ -63,6 +62,8 @@ function getLocation() {
|
|
var coord = new qq.maps.LatLng(res.latitude, res.longitude)
|
|
var coord = new qq.maps.LatLng(res.latitude, res.longitude)
|
|
longitude = res.longitude;
|
|
longitude = res.longitude;
|
|
latitude = res.latitude;
|
|
latitude = res.latitude;
|
|
|
|
+ alert(longitude)
|
|
|
|
+ alert(latitude)
|
|
$("#commit").removeAttr("disabled",true).css("pointer-events","");
|
|
$("#commit").removeAttr("disabled",true).css("pointer-events","");
|
|
$("#commit").css("background-color","#1AAD19").css("color","#FFFFFF");
|
|
$("#commit").css("background-color","#1AAD19").css("color","#FFFFFF");
|
|
$("#dingwei").hide();
|
|
$("#dingwei").hide();
|