MxWeiXinPF.WeiXinComm/LocationService.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**************************************
*
* author:李朴
* company:上海沐雪网络科技有限公司
* website:http://uweixin.cn
* createDate:2013-11-1
* update:2014-12-30
* remark:微信接口方法:微信地理位置的处理
*
***********************************/
using System.Collections.Generic;
using Senparc.Weixin.MP.Entities;
using Senparc.Weixin.MP.Entities.GoogleMap;
using Senparc.Weixin.MP.Helpers;
using MxWeiXinPF.Common;
namespace MxWeiXinPF.WeiXinComm
{
public class LocationService
{
public IResponseMessageBase GetResponseMessage(RequestMessageLocation requestMessage)
{
#region 注释掉的
//var responseMessage = ResponseMessageBase.CreateFromRequestMessage<ResponseMessageNews>(requestMessage);
//var markersList = new List<Markers>();
//markersList.Add(new Markers()
//{
// X = requestMessage.Location_X,
// Y = requestMessage.Location_Y,
// Color = "red",
// Label = "S",
// Size = MarkerSize.Default,
//});
//var mapSize = "480x600";
//var mapUrl = GoogleMapHelper.GetGoogleStaticMap(19 /*requestMessage.Scale*//*微信和GoogleMap的Scale不一致,这里建议使用固定值*/,
// markersList, mapSize);
//responseMessage.Articles.Add(new Article()
//{
// Description = string.Format("您刚才发送了地理位置信息。Location_X:{0},Location_Y:{1},Scale:{2},标签:{3}",
// requestMessage.Location_X, requestMessage.Location_Y,
// requestMessage.Scale, requestMessage.Label),
// PicUrl = mapUrl,
// Title = "定位地点周边地图",
// Url = mapUrl
//});
//responseMessage.Articles.Add(new Article()
//{
// Title = "微信公众平台SDK 官网链接",
// Description = "Senparc.Weixin.MK SDK地址",
// PicUrl = "http://weixin.senparc.com/images/logo1.jpg",
// Url = "http://m.uweixin.cn"
//});
//return responseMessage;
#endregion
WeiXCommFun wxcomm = new WeiXCommFun();
后面还有 75 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
