SDK? LBS ?????? ??? ???? ?? ?? Baidu ? Google?? ????? ???? ?? ??? ?? ?????? ??????.
????? ???? ??:
? ??? ??? ?? ??? ???? ? ?????: Senparc.Weixin.MP.Helpers.Distance(double n1, double e1, double n2, double e2 )
??? ?? ??? ???: Senparc.Weixin.MP.Helpers.GetLatitudeDifference(double km)
??? ?? ??? ???: Senparc.Weixin.MP.Helpers. GetLongitudeDifference(double km)
Baidu API ???: Senparc.Weixin.MP.Helpers.BaiduMapHelper
Baidu ?? ?? ?? URL: BaiduMapHelper.GetBaiduStaticMap(double lng, double lat, int scale, int Zoom, IList ?? ??? ??? ??? ????. http://maps.googleapis.com/maps/ api/staticmap?center=&zoom =13&size=640x640&maptype=roadmap&format=jpg&sensor=false&??=zh&&markers=color:red%7Clabel:O%7C31.285774,120.59761&markers=color:blue%7Clabel:T%7C31.289774,120.59791 ??? URL? ? GoogleMap API? ???? SDK?? ??? ?? ??? ?????. GoogleMap API ???: Senparc.Weixin.MP.Helpers.GoogleMapHelper Baidu ?? ?? URL ??: GoogleMapHelper.GetGoogleStaticMap(int scale, IList ??? ??? ??? ????. http://maps.googleapis.com/maps/api/staticmap?center=&zoom=&size=640x640&maptype=roadmap&format=jpg&sensor=false&??= zh&&markers= ?? SDk? ???? ???? ?? ???? ?? ? ?? ?????? ???? ?? ??? ??? ? ????. ?? ?? MessageHandler? OnLocationRequest ???? ???? ?????. ?? ?? ??????? ???? ?? ?? ??? ???? ?? ??? ???? ?? ??? ??? ???? ??? ???? ??? ??? ?? ????.
? ?? ????? ResponseMessageNews? Article.PicUrl? ?? ??? ? ????.
/// <summary>
/// 處理位置請(qǐng)求
/// </summary>
/// <param name="requestMessage"></param>
/// <returns></returns>
public override IResponseMessageBase OnLocationRequest(RequestMessageLocation requestMessage)
{
var responseMessage = ResponseMessageBase.CreateFromRequestMessage<ResponseMessageNews>(requestMessage);
var markersList = new List<GoogleMapMarkers>();
markersList.Add(new GoogleMapMarkers()
{
X = requestMessage.Location_X,
Y = requestMessage.Location_Y,
Color = "red",
Label = "S",
Size = GoogleMapMarkerSize.Default,
});
var mapSize = "480x600";
var mapUrl = GoogleMapHelper.GetGoogleStaticMap(19 /*requestMessage.Scale*//*微信和GoogleMap的Scale不一致,這里建議使用固定值*/,
markersList, mapSize);
responseMessage.Articles.Add(new Article()
{
Description = string.Format("您剛才發(fā)送了地理位置信息。Location_X:{0},Location_Y:{1},Scale:{2},標(biāo)簽:{3}",
requestMessage.Location_X, requestMessage.Location_Y,
requestMessage.Scale, requestMessage.Label),
PicUrl = mapUrl,
Title = "定位地點(diǎn)周邊地圖",
Url = mapUrl
});
responseMessage.Articles.Add(new Article()
{
Title = "微信公眾平臺(tái)SDK 官網(wǎng)鏈接",
Description = "Senparc.Weixin.MK SDK地址",
PicUrl = "http://weixin.senparc.com/images/logo.jpg",
Url = "http://weixin.senparc.com"
});
return responseMessage;<br> }

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)