private void amap_MarkerClickListener(AMapMarker sender, AMapEventArgs args)
 {
     sender.ShowInfoWindow(new AInfoWindow()
     {
         Title = sender.Title,
         //ContentText = sender.Snippet,
     });
 }
Exemple #2
0
        void amap_MarkerClickListener(object sender, AMapEventArgs e)
        {
            //显示化弹出信息
            AInfoWindow info = new AInfoWindow();

            info.Title       = "这是自定义信息窗口";
            info.ContentText = "高德软件有限公司";
            marker.ShowInfoWindow(info, new Point(0, 0));
        }
Exemple #3
0
 private void amap_CameraChangeListener(object sender, AMapEventArgs e)
 {
     this.Dispatcher.BeginInvoke(() =>
     {
         //显示信息
         cameraloutput1.Text = "target:" + e.CameraPosition.target.ToString();
         cameraloutput2.Text = "tilt:" + e.CameraPosition.tilt.ToString();
         cameraloutput3.Text = "bearing:" + e.CameraPosition.bearing.ToString();
         cameraloutput4.Text = "zoom:" + e.CameraPosition.zoom.ToString();
     });
 }
 /// <summary>
 ///     显示/隐藏弹出信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void ShowMarkerInfo(AMapMarker sender, AMapEventArgs args)
 {
     if (sender.IsInfoWindowShown())
     {
         //隐藏弹出信息
         sender.HideInfoWindow();
     }
     else
     {
         //显示弹出信息
         MarkerInfo info = new MarkerInfo();
         sender.ShowInfoWindow(info, new Point(0, 0));
     }
 }
 /// <summary>
 ///     地图视窗参数捕捉函数(指南针)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void amap_CameraChangeListener(object sender, AMapEventArgs e)
 {
     Dispatcher.BeginInvoke(() =>
     {
         ((RotateTransform)Compass.RenderTransform).Angle = -(e.CameraPosition.bearing); //获取旋转坐标,实现指南针功能
         //获取重建缩放功能相关变量
         if (_zoomIsNew)
         {
             _mapZoom = 17;
             _zoomIsNew = false;
         }
         else
         {
             _mapZoom = e.CameraPosition.zoom; //缩放级别   
         }
         //当前视野中心的相关参数
         _cameraLatlng = e.CameraPosition.target; //经纬度
         _tile = e.CameraPosition.tilt; //地图倾角
         _bearing = e.CameraPosition.bearing; //旋转角度  
     });
 }