gmap.net can't see the map

3k Views Asked by At

i'm using Gmap.net in Windows Form. I've added references to .dll files than dragged GmapControl to the form and added this code

private void Form1_Load(object sender, EventArgs e)
{                        
     gmap.MapProvider = GMap.NET.MapProviders.GoogleMapProvider.Instance;
     GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.CacheOnly;
     gmap.SetCurrentPositionByKeywords("Maputo, Mozambique");
}

and when I runn it it just shows me the bright control with the red cross in the middle, and the blue text in the bottom "Google-map...."

anny suggestions how could i fix it?

3

There are 3 best solutions below

0
On

try to change the AccessMode to 'ServerOnly'. I hope to be helpful! Regards.

0
On

To solve this issue , you should set Min Zoom Property of GMap control to Zero

0
On

Set your zoom level and set access mode to cacheAndServer

private void Form1_load(object sender, EventArgs e)
{
    gMapControl1.MapProvider = GMap.NET.MapProviders.GoogleMapProvider.Instance;
    gMapControl1.DragButton = MouseButtons.Left;
    GMaps.Instance.Mode = GMap.NET.AccessMode.ServerAndCache;
    gMapControl1.Position = new PointLatLng(LATITUDE,LONGITUDE);
    gMapControl1.Zoom = 9;
}