Howto configure Gmaps for cache only

Topics: Help
Aug 8, 2012 at 12:39 AM

Hi, i'm trying to configure a gmaps.windows.forms with cache only but it doesn't work...

 

private void mapImage_Load(object sender, EventArgs e)       

{           

mapImage.SetCurrentPositionByKeywords("medellin,colombia"); 

mapImage.MinZoom = 7;            mapImage.MaxZoom = 17;           

mapImage.Zoom = 13;

mapImage.Manager.Mode = AccessMode.CacheOnly;           

mapImage.CacheLocation = Directory.GetCurrentDirectory();           

string path = Directory.GetCurrentDirectory() + "\\DataExp.gmdb";           

bool resp = mapImage.Manager.ImportFromGMDB(path);                       mapImage.MapProvider = GMapProviders..GoogleMap;           

  }

What am i doing wrong?

Thanks a lot...

Aug 8, 2012 at 9:02 AM

yes it work, mapImage.Manager.Mode = AccessMode.CacheOnly;  , thats all you need to set, and don't use the load event to set parameters.. and don't do import everytime..

Aug 11, 2012 at 7:29 PM

Thanks Radioman for your help... it works for a windows form, but i didn't get it works for a WindowsMobile form, that's what i did:

public Form1()       

{           

InitializeComponent();
mapImage.Manager.Mode = AccessMode.CacheOnly;

mapImage.Position = new PointLatLng(6.260707, -75.56461);

mapImage.MinZoom = 7;

mapImage.MaxZoom = 17;

mapImage.Zoom = 13;

string path = Directory.GetCurrentDirectory() + "\\Medellin.gmdb";

bool resp = mapImage.Manager.ImportFromGMDB(path);

}

 

The problem is Gmaps.Windows.Mobile doesn't have the "ImportFromGMDB()" class.

How can i configure it?

 

Thanks...

Aug 17, 2012 at 11:52 AM

don't use import, prepare database on external desktop app