Quantcast
Channel: GMap.NET - Great Maps for Windows Forms & Presentation
Viewing all articles
Browse latest Browse all 3384

New Post: Cache gets mixed up

$
0
0
Hello,

I'm busy with an identical problem but the proposed solution seems not working for me.
CustomProvider : GMapProvider
{
    CustomProvider(string server, string myMapName)
    {
       this.myMapName = myMapName;
    }

    public override Guid Id
    {
      get
      {
          return new Guid(string.Format("D7287DA0-A7FF-405F-8166-{0}", Hash(myMapName));
      }
}

var p1 = new CustomProvider("localhost", "MapOne");
The problem is that the constructor of GmapProvider class (in which dbid is generated) is called before the constructor of CustomProvider class. Therefore myMapName is not yet assigned to the right value when the dbid is generated. Is it right ? If yes, any workaround ?

Viewing all articles
Browse latest Browse all 3384


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>