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

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

 

样式一

一、目标样式

smobiler

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

二、地点微调代码

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窗体设计界面显示效果

smobiler

四、手机效果显示

smobiler smobiler

posted @ 2016-12-20 11:23  阿曼达  阅读(768)  评论(0编辑  收藏  举报