How to limit the area/location I want to view in GMap.Net WPF using c#?

送分小仙女□ 提交于 2020-01-04 05:31:07

问题


I have this code that shows specific location I needed on my project.

public partial class ViewLocation : Window
{
    public ViewLocation()
    {
        InitializeComponent();
    }

    private void gmap_Loaded(object sender, RoutedEventArgs e)
    {
        gmap.MapProvider = GMap.NET.MapProviders.GoogleMapProvider.Instance;
        gmap.Position = new GMap.NET.PointLatLng(13.4107591, 121.1764547);
        //gmap.SetPositionByKeywords("Calapan, Philippines");
        gmap.MinZoom = 13;
        gmap.MaxZoom = 18;
        gmap.Zoom = 9;
    }

}

But I have to limit the area that it shows. For example, I only want to see areas that are 2 miles away from my position. Is it possible to do? And how should I do it?

来源:https://stackoverflow.com/questions/46387972/how-to-limit-the-area-location-i-want-to-view-in-gmap-net-wpf-using-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!