Help,where is Data.gmdb

Topics: Windows Mobile
Sep 22, 2011 at 9:46 AM

GetImageFrom: System.IO.FileNotFoundException: can't find file“\Application Data\GMap.NET\TileDBv5\en\Data.gmdb”

I'm trying to integrate GMap.net into my C# mobile app.I never get any maps to show,but blue screen.
it says System.IO.FileNotFoundException: can't find file“\Application Data\GMap.NET\TileDBv5\en\Data.gmdb”.
The code:

using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GMap.NET.WindowsForms;
using GMap.NET;
using GMap.NET.MapProviders;

namespace DeviceRunn
{
    public partial class Form1 : Form
    {
        public GMapControl MainMap;

        public Form1()
        {
            InitializeComponent();
            MainMapInitialization();
        }

        #region System
        private void MainMapInitialization()
        {
            this.MainMap = new GMapControl();

            this.Controls.Add(this.MainMap);

            this.MainMap.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.MainMap.CanDragMap = true;
            this.MainMap.Dock = System.Windows.Forms.DockStyle.Fill;
            this.MainMap.LevelsKeepInMemmory = 5;
            this.MainMap.Location = new System.Drawing.Point(0, 0);
            this.MainMap.MarkersEnabled = true;
            this.MainMap.MapProvider = GMapProviders.GoogleChinaMap;
            this.MainMap.MaxZoom = 15;
            this.MainMap.MinZoom = 0;
            this.MainMap.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
            this.MainMap.Name = "MainMap";
            this.MainMap.PolygonsEnabled = true;
            this.MainMap.RetryLoadTile = 0;
            this.MainMap.RoutesEnabled = true;
            this.MainMap.ShowTileGridLines = false;
            this.MainMap.Size = new System.Drawing.Size(240, 268);
            this.MainMap.TabIndex = 8;
            this.MainMap.Zoom = 3;
        }
        #endregion
    }
}

Sep 22, 2011 at 10:01 AM

did you deploy SQLite.Interop.074.dll as content?

p.s. on mobile LevelsKeepInMemmory = 5; will overload your memory, remove that line so default will be 1

and use:

this.SuspendLayout();
MainMapInitialization();
this.ResumeLayout(false);

Sep 22, 2011 at 10:26 AM

No,I ididnt.Because when i was deploying SQLite.Interop.074.dll as content,it happended to"Fails to add SQLite.Interop.074.dll references"

what can i do..

Sep 22, 2011 at 10:34 AM

did you deploy SQLite.Interop.074.dll as content?

it's not a reference

Sep 22, 2011 at 10:43 AM

could u tell me how to deploy.- -.this is first time i learn GMap.Net.

help me.Thx...

Sep 22, 2011 at 10:46 AM

it makes crazy.i have solved it.Light-headedness