GMap.NET does not display a map

I am trying to use the GMap.NET.WindowsForms element in my windows forms application, but I cannot get it to show me any map.

Here is what I did:

I added the control to the Visual Studio 2010 toolbar by clicking "Select Items ..." in the context menu of the toolbar and viewing the GMap.NET.WindowsForms.dll file included in the downloaded ZIP archive. I also added links to GMap.NET.Core.dll and System.Data.SQLite.dll in my solution.

Then I placed the GMapControl, which appeared in the toolbar in the main form of my application and set the map type to GoogleMap. However, when I launch my application, the control shows a blue screen with text saying: “We are sorry, but we don’t have images at this zoom level for this region” or a bright screen with completely missing data (when I change the zoom level )

Here is my code:

  GMapMain.MapType = MapType.GoogleMap;
  GMapMain.MaxZoom = 100;
  GMapMain.MinZoom = 0;
  GMapMain.Zoom = 50;
  GMapMain.CurrentPosition = new PointLatLng(54.6961334816182, 25.2985095977783);

  GMapMain.ReloadMap();      

Please, help. I have no idea what to do, and I cannot find any information on the Internet that could help me solve the problem.

Thank you in advance.

+3
source share
5 answers

GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly

+3

gmap Control.

GMapProvider.WebProxy = WebRequest.GetSystemWebProxy();
GMapProvider.WebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;
+3

.
1 17.

+1

1.7.0 GMap.NET , :

https://www.nuget.org/packages/GMap.NET.Presentation/

so you can use satellite view.

If you see a satellite in your environment, because you have a map in the cache, but you will not see some places. With the new version, you download the map from the server and you will see it well.

0
source

Source: https://habr.com/ru/post/1727157/


All Articles