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

New Post: drawing a route of 2000 points or more

$
0
0
radioman wrote:

'Add Route' button

 

i have done this way:

        internal readonly GMapOverlay objects = new GMapOverlay("objects");
        internal readonly GMapOverlay routes = new GMapOverlay("routes");

        public Form1()
        {
            InitializeComponent();

            gMapControl1.MapProvider = GMapProviders.GoogleMap;
            gMapControl1.Position = new PointLatLng(32.6961334816182, 52.2985095977783);
            gMapControl1.MinZoom = 0;
            gMapControl1.MaxZoom = 24;
            gMapControl1.Zoom = 9;
            gMapControl1.Overlays.Add(routes);
            gMapControl1.Overlays.Add(objects);

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            List<PointLatLng> list = new List<PointLatLng>();

            // fill the list

            GMapRoute r = new GMapRoute(list, "my route");
            r.IsHitTestVisible = true;
            routes.Routes.Add(r);
            gMapControl1.ZoomAndCenterRoute(r);
        }

markers shows on map but there is no connection line between them!

i want to make my (offline) passed route visible on map!

and another thing, i have used my own rotated bitmap for my markers to show the direction, but the resulted markers have offset from the original position on map

why?

thanks


Viewing all articles
Browse latest Browse all 3384

Trending Articles



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