移动平台 - 地图功能应用

定位和地图为第三方服务功能,产品只提供与其对接,定位不准确及地图显示等问题请咨询第三方服务平台。
地图功能部分功能需要升级到 V7.6.0.202105或更高版本。
【客户端定位】
public override void AfterButtonClick(AfterButtonClickEventArgs e)
{
this.View.LocateMobileClient(LocationProvider.LBS_PROVIDER, true); //调用定位服务
}
//定位结果返回,参数e为位置信息
public override void AfterMobileClientLocated(MobileClientLocatedEventArgs e)
{
LatLng latlng = new LatLng();
latlng.latitude = e.Latitude;
latlng.longitude = e.Longitude;
string addr = "纬度:" + e.Latitude + " 经度:" + e.Longitude;
this.Model.SetValue("F_MOB_Text",addr);
}【搜索周边】
public override void AfterButtonClick(AfterButtonClickEventArgs e)
{
LatLng latlng = new LatLng();
latlng.latitude = 22.42095;
latlng.longitude = 114.171322;
string type = "餐饮"; //搜索关键词类型
this.View.PoiSearch(latlng, type); //调用手势周边服务
}
//搜索结果返回
public override void AfterPoiSearch(Kingdee.BOS.JSON.JSONArray e)
{
foreach (JSONObject jsonObj in e)
{
latlng.latitude = Convert.ToDouble(jsonObj["latitude"]);
latlng.longitude = Convert.ToDouble(jsonObj["longitude"]);
string title = jsonObj["title"].ToString();
}
}【地图控件】

【地图标记】
var mobileMap = this.View.GetControl<MobileMap>("F_MOB_MobileMap");
List<MarkerOptions> lstMarkerOptions = new List<MarkerOptions>();
lstMarkerOptions.Add(new MarkerOptions() { latitude = 22.548114, longitude = 114.066256, title = "深圳市民中心" });
lstMarkerOptions.Add(new MarkerOptions() { latitude = 22.538635, longitude = 114.124178, title = "深圳北站" });
lstM移动平台 - 地图功能应用
定位和地图为第三方服务功能,产品只提供与其对接,定位不准确及地图显示等问题请咨询第三方服务平台。地图功能部分功能需要升级到 V7.6.0...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



