GMap for WM 6

May 12, 2010 at 5:33 AM


I downloaded the source code, tried to run its windowsMobile project I got error message.

"Unable to start the program '%CSID_Program_Files\GMap.Net\GMap.Net.exe%'"

The system can not find the file specified.

Then I took the following code from the discussion forum and tried it. it gives me one view always, even if I change the lat and longi, and the map shows very slowly. I put all Dlls required in bin

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 Microsoft.WindowsMobile.Samples.Location;
using GMap.NET;
using GMap.NET.WindowsForms;

namespace MobileMap
    public partial class frmMap : Form
        private GMapControl map;
        public frmMap()

            map = new GMapControl();
            map.BackColor = System.Drawing.Color.White;
            map.CanDragMap = true;
            map.Dock = System.Windows.Forms.DockStyle.Fill;
            map.Location = new System.Drawing.Point(0, 0);
            map.MapType = GMap.NET.MapType.GoogleMap;
            map.MarkersEnabled = true;
            map.Name = "MainMap";
            map.RoutesEnabled = true;
            map.ShowTileGridLines = false;
            map.Size = new System.Drawing.Size(480, 696);
            map.TabIndex = 0;
            map.Zoom = 0;

        private void frmMap_Load_1(object sender, EventArgs e)

            GMapOverlay routes = new GMapOverlay(map, "routes");

            GMapOverlay objects = new GMapOverlay(map, "objects");

            GMapOverlay top = new GMapOverlay(map, "top");

            map.Manager.Mode = AccessMode.ServerAndCache;
            map.MapType = GMap.NET.MapType.YahooMap;
            map.MinZoom = 1;
            map.MaxZoom = 11;
            map.Zoom = map.MinZoom + 1;

            map.CurrentPosition = new PointLatLng(20, 67);//lat and long

        private void menuItem1_Click(object sender, EventArgs e)
            //map.CurrentPosition = new PointLatLng(54.6961334816182, 25.2985095977783));//lat and long Changed here
map.CurrentPosition = new PointLatLng(20, 67); map.ReloadMap(); } } }

I've seen the demo. I want to understan it thoroughly for WM.

May 12, 2010 at 8:17 AM

no need to map.ReloadMap(); at all and set everything in constructor, no need to use frmMap_Load_1