您的位置:首页 > 移动开发

.Net语言 APP开发平台——Smobiler学习日志:如何快速实现地图定位时的地点微调功能

2016-12-20 11:23 1246 查看

Smobiler是一个在VS环境中使用.Net语言来开发APP的开发平台,也许比Xamarin更方便

 

样式一

一、目标样式

我们要实现上图中的效果,需要如下的操作:

二、地点微调代码

VB:
Dim Longitude As Decimal = 0
Dim Latitude As Decimal = 0
Dim addressInfo As String = ""

Private Sub btnAddress_Click(sender  As Object, e As EventArgs) Handles btnAddress.Click
If Longitude <> 0 & Latitude <> 0 & addressInfo.Trim().Length > 0 Then
Me.Gps1.GetEditGps(New GPSData(Longitude, Latitude, addressInfo))
Else
Toast("定位失败")
End If
End Sub
C#:
private decimal Longitude = 0;
private decimal Latitude = 0;
private string addressInfo = "";

private void btnAddress_Click(object sender, EventArgs e)
{
if (Longitude != 0 & Latitude != 0 & addressInfo.Trim().Length > 0)
{
this.Gps1.GetEditGps(new GPSData(Longitude, Latitude, addressInfo));
}
else
{
Toast("定位失败");
}
}

注:该界面除地点微调以外的其他事件代码见MapView控件

三.Smobiler窗体设计界面显示效果

四、手机效果显示

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐