GMap.NET shows no map

Posted by Mariusz on Stack Overflow See other posts from Stack Overflow or by Mariusz
Published on 2010-01-03T19:58:08Z Indexed on 2010/05/23 23:21 UTC
Read the original article Hit count: 565

Filed under:
|

I'm trying to use the GMap.NET.WindowsForms control in my Windows forms application but I cannot make it show me any map.

Here is what I did:

I added the control to my Visual Studio's 2010 toolbox by clicking 'Choose Items...' from the toolbox's context menu and browsing for the GMap.NET.WindowsForms.dll included in the downloaded zip archive. I also added references to GMap.NET.Core.dll and System.Data.SQLite.dll in my solution.

Then I put the GMapControl that appeared in the toolbox on the main form of my application and set the map type to GoogleMap. When I run my application, however, the control shows either a blue screen with a piece of text saying "We are sorry, but we don't have imagery at this zoom level for this region" or a bright screen with completely no data (when I change 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 in the Internet that could help me solve the problem.

Thank you very much in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about google-maps