The following is a tutorial for using the excellent GMap.NET control. This text will explain how to place a map control on a form, how to initialize it to show the coordinates you want, how to add markers to it, and how to add polygons. IMPORTANT: You are currently reading our old tutorial. We a […]

This article was posted by Independent Software, a website and database application development company based in Maputo, Mozambique. Our website offers regular write-ups on technical and design issues, ranging from details at code level to 3D Studio Max rendering. Read more about Independent Software's philosophy, or get in touch with Independent Software.

The following is a tutorial for using the excellent GMap.NET control. This text will explain how to place a map control on a form, how to initialize it to show the coordinates you want, how to add markers to it, and how to add polygons.

IMPORTANT: You are currently reading our old tutorial. We a fresh GMap.NET tutorial about maps, markers, polygons and routes that’s updated for Visual Studio 2015 and GMap.NET 1.7!

View the updated tutorial

(Note that we have more tutorials up on how to add routes to GMap.NET, calculating the area of a polygon in GMap.NET, and removing the red cross from a map in GMap.NET).

Download the GMap.NET library here (the so-called “hot build” from 2013 – the latest stable release is from 2011 and had some problems for me).

Setting up

First, create a new C# Windows Forms project in Visual Studio 2010. In your GMap.NET download, you will find DLLs named GMap.NET.Core.dll and GMap.NET.WindowsForms.dll. Place them in a subfolder of your project, and add a reference to both.

gmap adding references
This will allow your code to access GMap.NET’s classes. Since GMap.NET is a user control, you can add it to your Toolbox. (Of course, you could simply instantiate the GMapControl from your code without ever adding it to your Toolbox, but then you would miss out on setting the control’s properties conveniently through the Properties panel). To add the control to your Toolbox, right-click the Toolbox and select “Choose Items.”

gmap choose toolbox items

You’ll find the required assemblies by clicking Browse… and selecting the GMap.NET.WindowsForms DLL. This should contain the GMapControl. Verify that there’s a check next to this control, and when you click OK, the control should be in your Toolbox and can be dragged to a form.

Adding a GMap to a Windows Form

Now add a new form (your fresh C# Windows Application should already have one) and drag the GMapControl to it. Resize it to your liking and call it “gmap” instead of the cumbersome GMapControl1. The control will display as an empty rectangle:

gmap empty control

With the control selected, open the Properties panel. Apart from the usual Control properties, you’ll find some GMap-specific properties there. Now things will get interesting:

gmap properties

I’ll explain some of the properties right away:

  • CanDragMap – If true, the user can drag the map using the right mouse button. You’ll probably want to keep this set to true.
  • MarkersEnabled – If true, any markers that you defined will be shown. If not, they won’t appear. Set this to true for now. If you forget, you may pull your hair out figuring out why your markers don’t appear (I did).
  • PolygonsEnabled – Same story here.
  • ShowTileGridLines – If true, GMap.NET will show tile coordinates on the tiles. Not something for a production environment, but it may help with debugging.
  • Zoom, MinZoom, MaxZoom – The Zoom level for Google Maps is somewhere between 0 (zoomed out to global level) to 18 (zoomed in to street level). Zoom is the current zoom level (5 would be good for country level), while MinZoom and MaxZoom should be set to 0 and 18 respectively if you want users to be able to zoom in and out fully. Zooming is done with the mouse wheel.

All these are interesting switches that allow us to define how the map will be shown and interacted with, but they don’t allow us to set where the map data is coming from. As we will see, this must be done in code. Running the program now will result in a persistently blank rectangle where the map is supposed to go.

Initializing the map

Add an onLoad event to your form, and add the following code to it:

Now run the program. A map should appear, centered on the city of Maputo, Mozambique. I’ve set the position using key words recognized by the map data provider, but you can also use latitude/longitude if you want:

While running the program, you will notice that the map can be dragged with the right mouse button, and zooming is done with the mouse wheel. If these operations do not work, then check that you’ve set the GMapControl’s properties correctly in the Properties panel – you may have inadvertently turned off dragging, or fixed the zooming level.

Map Providers

The magic of the GMap.NET library is that is doesn’t merely work with Google Maps. There are other map data providers out there, and GMap.NET supports a slew of them while the gory API details are all neatly hidden away from you. In the example above, I’ve used the BingMapProvider, but other useful ones include:

  • CloudMadeMapProvider
  • GoogleMapProvider – map provider for Google Maps; there are street, satellite and hybrid variants
  • OpenCycleMapProvider
  • OpenStreetMapProvider
  • WikiMapiaMapProvider
  • YahooMapProvider

Interestingly, the Google Map provider is (for me, at least), the slowest one. The applications takes a good number of seconds to start, presumably because a connection with Google is being (slowly) made. The Bing Map provider was much faster. But, of course, the data shown will be different so it all depends on your preferences. At the very least, your map code could have fallback providers.

GMap Yahho provider

Yahoo provider

Open Streetmap provider

Open Streetmap provider

Google provider

Google provider

Bing provider

Bing provider

The magic of GMap.NET goes further still. When we get to showing markers and polygons on a map, we’ll see that GMap.NET hides provider-specific implementation details away behind a common interface. That means that any marker and polygon code you write for GMap.NET will work with any of the providers. Awesome!

Adding markers

Markers are added in layers that are placed on top of your map, called overlays. You can place any number of markers in an overlay, then add that overlay to the map. The overlay can then be hidden en shown as necessary.

Here is a bit of code that adds an overlay called “markers” to the map, with a single marker in it:

A Google-type marker on a Bing Map provider

A Google-type marker on a Bing Map provider

First, the overlay is created. You can give it a name (optionally), which you can use elsewhere to refer to it (or you could just keep a reference to the overlay instance). Next, an instance of GMarkerGoogle is created. It takes two arguments: a location (a PointLatLng instance) and a marker type.

The marker types are a variety of marker images normally available in the Google Maps API (big balloons in many colors, small balloons in many colors, etc.). Or, you can supply an instance of Bitmap with your own image:

The marker is added to the overlay, and finally the overlay is added to the map. These markers (and the GMarkerGoogleType instances) work with any map provider!

Of course, you can create additional markers and add them to your overlay. There’s no limit, except in performance. More markers mean that performance goes down.

Adding polygons

Markers may not always cut it. Sometimes you need to delimit an area of your map. For instance, you may need to indicate where new construction will take place, or who owns which land. Polygons allow you to show just that.

The following code shows how to create another overlay, and add a four-point polygon to it.

First, we create a new overlay. Next, we define a list with all the points in the polygon (this is a four-point polygon, but you can just as easily create many more points). Using these points, we create an instance of GMapPolygon. For good measure, we tell the polygon how to draw itself using a SolidBrush (semitransparent) for the fill, and a thin red Pen for the stroke. Finally, we add the polygon to the overlay, and the overlay to the map.

Tip: don’t forget to add overlays to the map, or they won’t show up.

A polygon showing the area covered by Maputo's Central Hospital

A polygon showing the area covered by Maputo’s Central Hospital


This tutorial should allow you to get started with GMap.NET. Here are some parting tips:

You can use different map providers. Some are faster than others. Also, some show more data than others. Depending on your location, this can make all the difference (Maputo, Mozambique is such as location – Yahoo Maps has almost no data).

When adding markers or polygons to an overlay, don’t forget to add the overlay to the map.

If your markers don’t show up, verify that you have MarkersEnabled set to True in the Properties panel for your GMapControl instance.

GMap.NET requires an internet connection to function properly. However, if no connection is available, you can still use cached information (if available) to show your maps. To do this,  do:

Note: there’s more – see GMap.NET Tutorial – Routes to see how to show routes on your maps.





  1. GMap.NET Tutorial – Routes | Websofia
  2. GMap.NET – Great Maps for Windows Forms & Presentation | Bhavin Patel
  3. Embedding Maps Within LabVIEW |
  4. Maps in Winforms with C# | How I do?
  5. Mapas com Winforms e C# | How I do?
  6. New York City – Traffic Collision Mapping Challenge | newyorkcollisionsmap
  7. GMap.NET Tutorial – Routes | Independent Software
  8. GMap.NET Beginners Tutorial: Maps, markers, polygons & routes [updated for Visual Studio 2015 and GMap.NET 1.7] | Independent Software
  9. GMap.NET Beginners Tutorial: Maps, markers, polygons & routes [updated for Visual Studio 2015 and GMap.NET 1.7] (part 2) | Independent Software
  10. GMap.NET Beginners Tutorial: Maps, markers, polygons & routes [updated for Visual Studio 2015 and GMap.NET 1.7] (part 3) | Independent Software


206 206 Responses to “GMap.NET Tutorial – Maps, markers and polygons”
  1. cellurl says:

    Very nicely written. I need to figure out how to use Bearing….

  2. GT says:

    I’m going to try it now

  3. anil says:

    GMapOverlay error???
    couldn’t be found.are u missing a using directive or an assembly reference

    • alex says:

      Try referencing the following namespaces:

      using GMap.NET;
      using GMap.NET.WindowsForms;
      using GMap.NET.WindowsForms.Markers;
      using GMap.NET.WindowsForms.ToolTips;

  4. anil says:

    no any changes

    the load portion in gmapProvider didnt worked and i tried gmapcontrol1.mapProvider then it worked

  5. Seb says:

    For example, if I have a route that consists of the following addresses:

    2 Dummy st., Some City , some state
    45 Dummy Av.,Some City , some state
    US1 Dummy st.Some City , some state
    US1 125 Dummy st.Some City , some state

    it should be able to sort it by distance and make the route so I don’t have to return to the same place twice, is there such a feature?if so, can you please post some code ?
    thank you

  6. Tristan says:

    Hi Alex! Really appreciated the tutorial you provided, it really helped me!
    Could you make a tutorial on Tooltips for map locations? For example, when you mouse over an icon, it will display a little bubble to display more information.


    • alex says:

      Try this:

    • JCarter says:

      Can you elaborate on your tooltips snippet? How do you associate the tooltip to the markers?

      • JCarter says:

        I answered my own question (I think). I changed this:

        overlayOne.Markers.Add(New GMapMarkerGoogleRed(New PointLatLng(lat, lon)))

        to this:

        Dim pos As System.Nullable(Of PointLatLng) = New PointLatLng(lst, lon)
        Dim m As New GMapMarkerGoogleRed(pos.Value)
        Dim overlayOne As New GMapOverlay(GMapControl1, “OverlayOne”)
        m.ToolTip = New GMapRoundedToolTip(m)
        m.ToolTipText = “Hello World”

        Is this the best way to handle this?

  7. Fm says:

    A great tutorial but i got a problem with Markers, actually i cannot show on the map..
    I am using the namespaces that you said but i got error when i type
    GMapOverlay markersOverlay = new GMapOverlay(“markers”);
    i get error in “markers”

  8. Fm says:

    I am sorry, i meant it doesntt contain any constructor that takes “1” as argument

  9. Fm says:

    Hi Alex and thank you for the very fast reply, maybe is it a my mistake.
    i will try with last v. and i let you know.
    Thank you again for reply and great tutorial!

  10. Fm says:

    Totally my mistake (i didnt realize that i downloaded an old version) now it’s work well! Thank you for tutorial.
    I also try routing tutorial and it is good!
    It will be nice some tutorials about reverse geocoding, in my opion is a very importart chapter but actually i don’t know if can reverse geocode

  11. klob says:

    HI sir, great tutorial. It really help me. Just want to ask. Is there anyway or any method in which it returns the long/lat of a given point from mouse click? Say I click anywhere in the map and then we can get the long/lat of the clicked area? Thank you very much sir.

    • Tomas says:

      I have a map called myMap. Add Click event and put this code.

      private void myMap_Click(object sender, EventArgs e)
      MessageBox.Show(“position: ” + myMap.FromLocalToLatLng(MousePosition.X, MousePosition.Y).ToString());

  12. Jonas says:

    Does this control be used for visualizing spatial data and integrate it to Desk Top application with ful mapping elements like legends,Title.Thank you.

  13. Jon says:

    Hi, I am working with Gmap and I like it very much. But i wonder, is it possible to get search suggestions? And also, how can you set correct bounds so that it fits your search?

  14. cxt_hut says:

    Hi everybody!

    I have a problem: I have a custom provider but I dont know using it. Please help me!

  15. radioman says:

    thanks ;} i’ll add the link to this tutorial, next time share it on the forum

  16. Tomas says:

    Hi sir,
    I am woking with Gmap and I want to simulate a car running between two points .can u give me some suggestions ? Please help me !

  17. Sid says:

    Hi Radioman –

    This looks very interesting. In my application I will not always have access to the internet. I would like to download and cache all of the maps from some provider, Google, or someone else, but I don’t how. Can you explain how to do this? I don’t really care which one(s) I use at this point. Thanks,

    GMap.NET requires an internet connection to function properly. However, if no connection is available, you can still use cached information (if available) to show your maps. To do this, do:

    GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.CacheOnly;

  18. Wayne Fu says:

    Very Helpful!Thank you!

  19. wael says:

    where to add markers part ???

  20. trung says:

    Hi, I am working with Gmap and I like it very much. but I don’t know how to display one icon in my position I want to. Can you help me.Thaks.

  21. Inez Bargar says:

    Google has decided that its users of their well-liked Google Maps service will begin becoming charged a fee for utilizing their service. Websites that are going embedding a Google Map of their location will be charged a fee for usage.This new Google Maps fee is going to hit mostly the bigger companies, particularly the Travel industry. I suspect that certain websites that are the heaviest users would be websites like TripAdvisor and Expedia..^

    Newest article content on our online site

  22. jjesz14 says:

    Hi.. very helpfull.. thx.
    By the way, i’m such as newbie in using

    I try the program above. When initializing the map, why I can’t add “SetCurrentPositionbyKeywords” ?
    there’s only “SetPositionbyKeywords”, is that different?
    Thankyou for your help.

  23. Martin Dodd says:

    I have programmed the above examples up to the point of creating pointers. I managed to use GMapMarkerGoogleGreen or GMapMarkerGoogleRed to create a marker however

    GMarkerGoogle marker = new GMarkerGoogle(new PointLatLng(-25.966688, 32.580528),
    new Bitmap(“c:\images\mymarker.png”);

    Yields the type or namespace name ‘GMarkerGoogle’ could not be found. I made reference to:
    using GMap.NET;
    using GMap.NET.WindowsForms;
    using GMap.NET.WindowsForms.Markers;
    using GMap.NET.WindowsForms.ToolTips;
    I look forward to hear any response.

    • Chris Nieass says:


      I believe that is a version issue. Download the latest hot build … GMarkerGoogle is supported.

  24. Kallol Pal says:

    Hi all,
    Thanks for the posts.It really helped me a lot.
    Can any one help me out how to add an image to my polygon in spite of using fill color..

    Thanks in advance

  25. Chris Nieass says:

    Thank you! This is a great tutorial for a very cool control.

    I would like to be able to add text to the actual marker, 2-3 characters only. Is this possible? Apart from color, what other attributes of the marker can be set?

    Thanks in advance.

  26. mario says:

    Como puedo cargar un mapa OpenStreetMap?

    • alex says:

      You should set a provider when you first initialize your map. Try something like this:

      gmap.MapProvider = GMap.NET.MapProviders.OpenStreetMapProvider.Instance;

  27. spiralcb says:


    I use the last build (06/06/12) but SetCurrentPositionbyKeywords cannot be find ?

    Could you help me ?

  28. JCarter says:

    Given I’m a new gMap user this is by far the best documentation that I have found. Well done and thank you for taking the time to put this together. I love the control but I have found the documentation to be lacking.

  29. GgusS says:

    Hi, Please help me!!! my english is very bad, I’m from Paraguay, and I have a Solutions with, at my work we have proxy server, and my application have errors, I dont know.. I need authentication with the proxy server and sockets.


  30. Wayller says:


    How I can capture points? No idea?


  31. Sumit says:

    I am using GMap, its a great app to use,
    i have one doubt about it, is there any solution to find near places on map, and show marker on it
    (for example, say if i want to search hospital in pune, then is it possible to show markers on each hospital located in pune)

  32. Raymond says:

    Hey nice post … everything is working fine … but the marker position doesnt change even wen i change d lat long position … plz cud sum1 help me out with dis ??

  33. Andrey says:

    After this portion of code (in the Mainform.Load event handler):

    GMapOverlay markersOverlay = new GMapOverlay(“markers”);
    GMarkerGoogle marker0 = new GMarkerGoogle(this.gmapMain.Position, GMarkerGoogleType.arrow);
    GMarkerGoogle marker1 = new GMarkerGoogle(new PointLatLng(55.851847D, 37.362D), GMarkerGoogleType.arrow);
    GMarkerGoogle marker2 = new GMarkerGoogle(new PointLatLng(55.851847D, 37.360D), GMarkerGoogleType.arrow);

    all three markers appear at the same place! They look like only one marker near the center og the map. But when I change zoom level of map with mouse wheel, they immediately take their real position! Is it a bug? Or I did something wrong?

    • Ruwantha007 says:

      hay its not rocket science, when the map is small (the zoom is set to low value) it happens.

      the marker is already placed correctly issue is you can see it only when you enlarge it 🙂

      • Matthew says:

        Actually I’m having the same issue when plotting satellite locations with very different latitude and longitudes. I basically copied and pasted the above code and substituted the appropriate Lat/Long but it appears to just place the marker object in the center of the map. When I zoom in and out the objects will start to separate into their appropriate positions. I tried forcing a refresh by using a gmap.Refresh() but can’t seem to force a redraw with the Gmarker objects.

  34. Andrey says:

    Additional info:

    In my program:
    GMap.Dock = Fill;

    1) If I change the size of the program’s window (and hence the GMapControl) – all markers take the right positions.

    2) if I place the line

    GMarkerGoogle marker0 = new GMarkerGoogle((new PointLatLng(55.851847D, 37.360D), GMarkerGoogleType.arrow));

    3) GMap.Invalidate() and GMap.Refresh – does not solve the problem…

    after the abovementioned fragment, the markers appear in right positions.

  35. Andrey says:

    2) if I place the line

    GMarkerGoogle marker0 = new GMarkerGoogle((new PointLatLng(55.851847D, 37.360D), GMarkerGoogleType.arrow));

    just after markers definition, all markers appear at right places

    Sorry for mistake in second post and bad English…

  36. Jim says:

    Hey guys,

    I wanna integrate GMap maps into my existing C# app, which statically displays the map image and bunch of stuff on top of that. What would be the fastest way of swapping my old displaying of a single tile map image with a new GMap overlay? Can GMap control render to a bitmap/image, so I don’t change other things I already render on top of the map? Or is it better/possible to use this control and somehow apply my other drawing calls (Graphics.DrawImage, Graphics.DrawLine, etc.) to be drawn on top of a Gmap control? How do I do that? Any examples? Thanks!

    • alex says:

      You can’t integrate your GDI code with GMap.NET, since GMap.NET wouldn’t know where to draw your elements. If the map scrolls, or zooms, then everything will be off. I think your best bet is to recode your drawing in GMap.NET terms, i.e. polygons and markers.

      Of course, you could use a static map that can’t scroll or zoom, and you could project a transparent bitmap over that. But then, what use is GMap.NET if you turn off this functionality? You might as well take a screenshot of Google Maps and use that.

  37. Cool says:

    it’s good. and i try it.
    it’s no error but i can’t see the map. (no picture at all)

  38. Yeraldin Guzman says:

    Me parece interesante el tutorial yo estoy usando GMAP.NET en un sistemas que se llama TEAN DEVELOPER 6.2 estoy ensamblando el archivo GMap.NET.WindowsPresentation.dll es una aplicacion WPF me busca por direcciones pero yo quiero agregarles marcas y no me es posible noce si pudieras hacer un tutorial de como agregarlos pero para GMap.NET.WindowsPresentation o ayudarme porque realmente hay muy poca informacion sobre esto.
    Perdon por mi Ingles tan feo soy MEXICANA..

  39. Yeraldin Guzman says:

    I find it interesting the tutorial I’m using a systems GMAP.NET called DEVELOPER 6.2 TEAN’m joining GMap.NET.WindowsPresentation.dll file is a WPF application I looking for directions but I want agregarles brands and I can not noce if you could do a tutorial on how to add them but for GMap.NET.WindowsPresentation or help me because there really is very little information about this.
    Sorry for my English so ugly I’m MEXICAN ..

  40. Raymond says:

    Hey i solved the marker issue which i had asked ..but now there is another problem … the markers always appear to be at the centre when the map loads .. then wen i scroll in or out it takes its actual place … am i doing something wrong or is it like that only ?

  41. YG says:

    hello I’m using GMAP.NET and achieve do what the tutorial, I want to do is create a new user form1 where search by address and display it on the map. if you could help me and I would also like to add another form2 to search by latitude and longitude where the user of the coordenas, just another form3 for the user to make a polygon with the data they indicate

  42. renee says:

    Hi guys.

    People talk about adding Markers. We know that we can add markers to an overlay, and keep adding marker


    bla bla…

    But how about deleting markers? I only managed to delete one marker on an overlay – using overlay.clear(), or overlay.markers.clear() but only the last added marker was deleted. How to actually delete all markers, either at once or one by one.

  43. Hugo says:

    thank you for making this available on the public domain. Is it possible to use UTM coordinates in stead of Geodetic? Thanks.

  44. mahsa says:

    A great tutorial! 🙂
    But I have a problem in adding the GmapControl component to my form. And I added all using statements that you wrote. It gives this error: ” ‘System.MissingMethodException:Method not found: ‘System.String System.Data.SQLite.SQLiteConnection.get_DefineConstants()’.
    at GMap.Net.CacheProviders.SQLitePureImageCache.Ping()
    at GMap.Net.GMaps.SQLitePing()
    at GMap.Net.WindowsForms.GMapControl.cctor()’

    Would you please help me?
    Thanks in advance!

  45. mahsa says:

    heh! I closed visual studio and opened it again and the problem is solved! 🙂

  46. jakfar says:

    sory i’m new in c# and got this error
    “error CS0103: The name ‘gmap’ does not exist in the current context”

  47. ravan says:

    I tried to remove all the markers and then add another markers based on search criteria.

    I tried

    But my markers are still present in the map. can you tell me why?

  48. Malo says:


    Thank you, great tutorial!

    But I have a problem. I have an error with this code:
    GMarkerGoogle marker = new GMarkerGoogle(new PointLatLng(-25.966688, 32.580528), new Bitmap(“c:\images\mymarker.png”);

    GMarkerGoogle error

    couldn’t be found Are you missing a using directive or an assembly reference

    And I have the latest version of GMap! Thank you in advance

    the GMarkerGoogle is not

  49. CommSter says:


    congratulations for the great work.
    We can add polygons but I wonder if it’s possible to add tracks to an overlay. I mean, is it possible to add a simple polyline which is not closed automatically to the first point.
    I tried to use the polygon with a fill brush with 0 alpha which overrides the filling but the lines gets closed from end to start which i would like to prevent.

    Any workarounds here? THX in advance

    • CommSter says:

      Arrrgh, sorry my fault. I thought the route object does not accept a list of points but only a start and an end point. GMapRoute is the solution.

  50. prat says:

    I have downloaded the hot build but still I am getting “debug build” message in the windows form. Plz help.

  51. Hi,

    I’m trying do add markers after the maps is set up. I’m dealing with two problems:
    1- Whenever the zoom is changed, all markers are lost.
    2- The markers are placed in the same spot, always.

    The code is the following:

    PointLatLng pos = new PointLatLng(long, lat);
    Marker.GMapMarkerRect marker = new Marker.GMapMarkerRect(pos, t, h);
    markersOverlay = new GMapOverlay(“markersTest”+mark);

    The GMapMarkerRect’s constructor has been change to accept two new parameters.

    appreciate your help!

  52. ankita says:

    Hi all,
    I have followed as below: 1. created windowsForms application. Added these 2 dlls for GMap.Core.dll and GMap.Presentation.dll. 2. Added user control in tool box. 3. Written below code:
    gMapControl1.MapProvider = GMap.NET.MapProviders.YahooMapProvider.Instance;
    GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly;
    gMapControl1.Position = new PointLatLng(32.641218, 51.67576);

    But while running it gives “we are sorry but we don’t have imagery at this zoom level for this region”.

    This same error occurs when I run “Demo.WindowsPresentation.exe” and “Demo.WindowsForms.exe” and it also interrupts saying “no internet connection available, going to cache mode only.” while I have internet connection.
    May be I am missing something.


    • Len says:

      I have been getting the same error. Did you find out what the problem was? Could you get it fixed?
      Any guidance will be helpful.


    • mrittunjay sharma says:

      when i am running code showing error “we are sorry but we don’t have imagery at this zoom level for this region”.
      even demo code is also showing same error..please help me

  53. Raymond says:

    Hey is there any way how do i make the marker move according to the co ordinates of the gps … so i need a marker which would be constantly updated with d new position … plz help me out

  54. Mediel says:

    Hello, i have question, how can I ZoomAndCenter all my markers? I try use ZoomAndCenterMarkers(“markers”); But this is not work… Here is code:

    private void DrawSelectedDataForm_Load(object sender, EventArgs e)
    StartDrawSelectedData start = new StartDrawSelectedData();
    string Ids = “”;
    if (H.SelectedRecordIDs() == null)
    Ids = H.CurrentRecordID().ToString();
    Ids = H.SelectedRecordIDs();

    List subjectsToDraw = start.Start(Ids);

    // inicialize map
    gmap.MapProvider = GMap.NET.MapProviders.OpenStreetMapProvider.Instance;
    GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly;

    GMapOverlay markersOverlay = new GMapOverlay(gmap, “markers”); // skupina značek zvaná “markers”

    foreach (EntitySubject es in subjectsToDraw)
    GMapMarkerGoogleGreen marker = new GMapMarkerGoogleGreen(new PointLatLng(double.Parse(es.Latitude), double.Parse(es.Longitude)));
    marker.ToolTipText = es.Nazev;


    //if (H.SelectedRecordIDs() != null)
    // gmap.Zoom = 7;

    • Israr says:

      Instead of using
      Use like below
      gmap.ZoomAndCenterMarkers(myMarkersOverlay.Id);//where myMarkersOverlay is my overlay containing the markers…

      I hope it helps…

  55. Ruwantha007 says:

    hi i download “GMap.NET Build 35bb833b03a1” the latest Version

    but i do not have GMarkerGoogle type what i have is GMapMarker. any problem with what i use ?
    i need to show some details on every marker i add, haw to do it ?
    Thanks for support in advance 🙂

  56. ruwan says:

    how to add number to GMapMarker ? (on marker to be visible)

  57. Tim says:

    All the functionality appears to be working, but no map is displayed. Instead there are just blue panels with the text “Exception: The operation has timed out. We are sorry, but we don’t have imagery at this zoom level for this region.” I’ve tried different versions, different zoom levels and different regions. Is this just down to poor connection?

    • Tim says:

      This is also the case in the Demos that come with the GMap.Net download.

    • Fredy Wenger says:

      I have developed an application with included The application has worked without problem in our environment. In the customer environment, I had the error-message exception “the operation has timed out”.
      To add this code (overtake proxy settings in customer environment) has resolved the problem.

      GMapProvider.WebProxy = WebRequest.GetSystemWebProxy();
      GMapProvider.WebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;

      Don’t forget to add a reference to System.Net

  58. jean says:

    hi, I have a problem on putting the markers. simply put, if I copy the code, it gives me error, something that is not declared. I don’t know what am I missing, pls help, or email me. thanks dev

  59. David says:

    Hello I seem to be stuck with every tutorial i follow for GMap .NET.

    I am able to run the program but i dont see the map. I can drag the map but i see nothing.


    This also happend when i tried this tutorial:

    Any help would be great. I tried different mapproviders.

  60. tarek says:

    hello ,

    i am working with not c# and i downloaded the latest release of 22 october but in i managed to create a map but starting from adding markers it is not working at all for instance GMapOverlay method doesnt exist at all in 2012 ,can you please advise how to do it in ?

  61. tarek says:

    ok i managed to solve the problem it is just i have to import u GMap.NET.WindowsForms.Markers;
    and GMap.NET.WindowsForms.ToolTips; just one more question how to draw lines between 2 points ?

    • dave says:

      hi tarek
      i see that you managed adding markers but i do like you qnd it s not working
      a second quest do you succed drawing between 2 points
      i am also working with
      thanks a lot

  62. tarek says:

    your gmap is no longer working after de-activation of google api 2 ,can you prepare an equivalent one for google api 3 ?
    man try to get it to live again

  63. tarek says:

    sorry remote server error 403 ,came for a while now it is ok

  64. jerome zhu says:

    It’s a great job, but it seems that the OnClickPolygon and OnClickRoute do not trig as well as the OnClickMarker work well. Anyboy can solve this problem?

  65. dave says:

    somn tell me why in we can use this GMarkerGoogle marker = new GMarkerGoogle
    it is not recognize
    i whant to do a marker as a vehicle/a building
    please help me !!!!!!!

  66. Panos says:

    very good article.

    Could you create for the public a working sample project with all stuff of articles (for GMap.Net) ?

  67. afei200815 says:

    Thanks for the article.
    I’m trying to use in my vc++ project.I can draw a GMapControl in my dialog by adding references to GMap.NET.WindowsForms.dll and GMap.NET.Core.dll, and it’s working .But the thing is, problems appreared when I tried to add polygons into the mapcontrol.I don’t know how to set the value of members of
    GMapPolygon,ie, Fill and Stroke.Someone tell how? Or show me any clue about using GMap.Net in VC++.thanks a lot

  68. Dragan says:

    how can I binding through the server? I’d like to find places using like method!
    And how can I obtain a long and lat from the keyword?
    Thanx in advance!

  69. Dragan says:

    Is it possible to do the job offline? thnx…

  70. Dragan says:

    If somebody want to find location with the timers in, here is the code:

    Private Sub FindLocation(ByVal location As String)
    GMapControl1.MapProvider = GMap.NET.MapProviders.BingMapProvider.Instance
    GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly
    End Sub
    Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
    GMapControl1.Zoom -= 1
    If GMapControl1.Zoom = 5 Then
    With Timer1
    .Enabled = False
    End With
    If TextBox1.Text > Nothing Then
    End If
    With Timer2
    .Enabled = True
    .Interval = 250
    End With
    End If
    End Sub
    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
    With Timer1
    .Enabled = True
    .Interval = 250
    End With
    End Sub
    Private Sub Timer2_Tick(sender As System.Object, e As System.EventArgs) Handles Timer2.Tick
    GMapControl1.Zoom += 1
    If GMapControl1.Zoom = 14 Then
    With Timer2
    .Enabled = False
    End With
    End If
    End Sub

  71. orçun says:

    do not work amına sokiim. not work examples on c#
    amını yurdunu siktiklerimin!

  72. GoGoGoGo---Bomb! says:

    Hi there,
    Thanks for your tutorial, very useful!
    Im having problem when put markers on the map. Markers do not appear at the exact position where I clicked on the map, the difference is quite significant. My code is as following:

    private void gmap_MouseClick(object sender, MouseEventArgs e)
    markersOverlay.Markers.Add(new GMarkerGoogle(gmap.FromLocalToLatLng(MousePosition.X, MousePosition.Y), GMarkerGoogleType.blue_pushpin));
    textBox1.AppendText(gmap.FromLocalToLatLng(MousePosition.X, MousePosition.Y).ToString() + “rn”);

    Thank you!

  73. ME says:

    Ok, how can i add a ANIMATED GIF to a marker????
    Image transparent background of weather condition….

    GMapOverlay markersOverlay = new GMapOverlay(“markers”);
    GMarkerGoogle marker = new GMarkerGoogle(new PointLatLng(-25.966688, 32.580528), new Bitmap(“c:\sunny.gif”));

    If not how can i use a picturebox to do this????

  74. Simon says:

    Great tool. I have a database of postcodes and associated polygons in an SQL geometry field. I would like to plot a post code area. Is this possible ?

  75. Ravan says:

    Great tool.

    But I want to know how to remove a polygon??

  76. Amnanmirza says:

    sir how to cout number of tag images in map at top level .when zoom out images is exple show number of images on city level.

  77. dennis reyes says:

    how can i retrieve latitude and longitude from sql database form the locations on markers? and how can i put multiple markers?.

  78. saman says:

    Hi i have 10 point and i have to drow route between that,i use the

    MapRoute route = rp.GetRoute(start , end , false, true , (int) gMapControl.Zoom);

    but that is very slow

  79. andri says:

    Error 3 The best overloaded method match for ‘GMap.NET.WindowsForms.GMapPolygon.GMapPolygon(System.Collections.Generic.List, string)’ has some invalid arguments D:ITBTAgreatmaps_3660acb94e16Demo.WindowsFormsFormsForm1.cs 42 35 Demo.WindowsForms

  80. andri says:

    Error 3 The best overloaded method match for ‘GMap.NET.WindowsForms.GMapPolygon.GMapPolygon(System.Collections.Generic.List, string)’ has some invalid arguments

  81. Mohammad says:

    I want to use GMap.Net in offline mode. Your description about this are :
    GMap.NET requires an internet connection to function properly. However, if no connection is available, you can still use cached information (if available) to show your maps. To do this, do:
    GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.CacheOnly;

    Can you help me and give me a simple example or description steps that I have do them?

  82. kivan says:

    I have managed to integrate the gmap files into C#, the program runs, however from that point onwards, it says, “Exception: Unable to connect to remote server, we are sorry we don’t have imagery at this zoom level for this region”
    any advice

  83. Max says:


    I have the following code with 1 overlay and 3 markers;

    Dim markersOverlay As GMapOverlay = New GMapOverlay(“markers”)
    Dim marker0 As GMarkerGoogle = New GMarkerGoogle(Me.gmap.Position, GMarkerGoogleType.arrow)
    Dim marker1 As GMarkerGoogle = New GMarkerGoogle(New PointLatLng(55.851847D, 37.362D), GMarkerGoogleType.arrow)
    Dim marker2 As GMarkerGoogle = New GMarkerGoogle(New PointLatLng(57.851847D, 57.36D), GMarkerGoogleType.arrow)

    Private Sub gmap_OnMarkerClick(item As GMapMarker, e As MouseEventArgs) Handles gmap.OnMarkerClick
    ‘Here I need to show a message box with a position of each marker or some text
    End Sub

    How do I show a message box with a position of each marker?

    Thank you in advance.

    • Israr says:

      For example…if you have added tooltiptext to your marker than you can display it like below…
      private void gMapControl1_OnMarkerClick(GMapMarker item, MouseEventArgs e)
      MessageBox.Show(item.ToolTipText );

  84. Abdunnoer Kaldine says:

    edited proxy as such :
    System.Net.WebProxy myProxy=new System.Net.WebProxy(“”,3128);
    GMap.NET.MapProviders.GMapProvider.WebProxy = myProxy;

    • BubblyDevil says:

      In version 1.7 for winforms it is as follows:
      // Set the system proxy
      System.Net.WebProxy myProxy = new System.Net.WebProxy(“ip or url”, port);

      // Set the proxy for the map provider
      GMap.NET.MapProviders.BingMapProvider.WebProxy = myProxy;

  85. yz! says:

    Hi alex,
    Great tutorial. Is it possible to create a marker with address, not latitude and longitude?

    Sorry for my english!

  86. Prakash says:

    can anybody suggest to do the same with wpf??

  87. Albos says:


    when I initialize the map, with your same code, the maps id shown, but it is wrong centered. I mean, it has to shown centered at Maputo, Mozambique, but it is over the 0,0 point, in the Gulf of Guinea. Any ideas? I don’t know why it happes.

    When I enter a position in coordinates, the code works fine; but with keywords don’t.

    Thank you in advance.

  88. Itban says:

    I’m trying to add the multiple markers, the problem I am facing is that it adds the marker on the same spot where first markers was added, Moreover every time it adds the marker on one particular point regardless of the latitude and longitude I entered. When I add latitude and longitude in a little zoom mode it added on different locations but it changes the location when I add same lat and long again and again. I searched on this topic very much but could not find the solution. I’m giving the code below, someone please help me with this.
    Best Regards,

    GMapOverlay markersOverlay = new GMapOverlay(“markers”);

    GMarkerGoogle marker = new GMarkerGoogle(new PointLatLng(latitude, longitude),;
    GMarkerGoogle marker2 = new GMarkerGoogle(new PointLatLng(sysLatitude, sysLongitude),;
    MarkerTooltipMode mode = MarkerTooltipMode.Always;
    marker.ToolTip = new GMapBaloonToolTip(marker);
    marker.ToolTip.Marker.ToolTipMode = mode;
    marker.ToolTip.Format.Alignment = StringAlignment.Near;
    marker.ToolTip.Marker.ToolTipText = “Destination Point”;

    MarkerTooltipMode mode2 = MarkerTooltipMode.Always;
    marker2.ToolTip = new GMapBaloonToolTip(marker2);
    marker2.ToolTip.Marker.ToolTipMode = mode2;
    marker2.ToolTip.Format.Alignment = StringAlignment.Near;
    marker2.ToolTip.Marker.ToolTipText = “Source Point”;


  89. Anas says:

    thank you for the good tutorial, however i have some remarks :

    1 – The SetCurrentPositionByKeywords(string,string) does not exist (hot built)
    2 – I can not handle on map clicks , returning geographical position rather that pixel position.
    3 – is there any way to serialize or save overlays.

    thank you

  90. Khushbu says:

    Sir, I am fresher.I develop the project in c# windows form. In that I am searching the location by using the IP address . I want to get the latitude and longitude of that IP address. Please help me.Thanks in advance

  91. Doan says:

    I’m student. Now, I’m doing a project which are using GMap.NET on windows form. I have some problems. I have 2 points: A and B. I only know A’s location (lat, long), distance and direction between A and B. I added A’s marker. I can’t add B’s marker. Can you help me. Thank you so much
    Sorry because my english is not good.

  92. Aissam says:

    Can you show us ho to get elevation(altitude) of point or place
    Thank you!

  93. Roger says:

    I am trying to have a click event on overlay polygons, I need to figure out which polygon is clicked.

  94. Len says:

    Can one use this control to create heat maps for postal code regions of the UK? I need to do a population density heat map. I can easily create a map with markers based on Long and Lat points, but cannot find an example of a heat map which requires more than polygons and points/markers.

  95. Shital says:

    Tutorial is really great.
    But I have some query
    1 Is there any slider or “+/-” to control map zoom level?
    2 Pan control to Panning the Map?

  96. adabusra says:

    How can I move marker to CursorPosition? And How can I find height that CursorPosition is in place ?
    How can I find Coordinate? And How can I find to how long between two places ?

  97. Arno says:

    Great work guys

    I’m quite new to programming and got most of my aplication working but
    I’m trying to add multiple markers to my c# project in vs2010 can add markers manualy but not from a .xml file. googled my ass of but can’t find the soulution to my problem can anyone help me?

    File looks like this:



  98. ramsis says:

    Helpfull, can you bring me an example how to open OSM file map using Openstreetmap provider. Thank you so much

  99. setare says:

    Hi Alex.
    thank you very much.
    I have some questions about in c# win forms
    how i can have markers in multi color ?
    i have an application that marks mobile log file on a map and i need multio color markers.
    is this possible in

  100. ahmad says:

    My friend, I am blessing you , Your text was very useful for me.

  101. Joao says:

    I am using GMap.NET in MSVC 2010 in a C++ WinForms app, and I can correctly load a map, set the position, and place a marker, but the market is always associated to the position I set initially, e.g.
    gMapControl1->Position = PointLatLng(39.15, -76.30);

    For markers, I am using:
    WindowsForms::GMapOverlay ^MyOverlay = gcnew WindowsForms::GMapOverlay(“markers”);
    WindowsForms::Markers::GMarkerCross ^MyMarker;
    MyMarker = gcnew WindowsForms::Markers::GMarkerCross( PointLatLng( 20.0, -76.0) );

    I have tried with GMarkerGoogle and can also see the marker (so all ok on the design side), but no matter what I put in for PointLatLng it is glued (in the cross case superimposed) to the Position in the first line. I also made two markers with different locations, and they both superimpose on the value I use for position.

    Any help much appreciated.


    • JuanLZL says:

      I have the same issue, did you figured out how to fix that?

      I am trying g to set several market but they always are set on the origen or center of the screen, only when I zoom in or zoom out those appears in the correct location.

      How I can fix this, I need to refresh the location of the market time to time!

      Thanks a lot

  102. Gabe says:

    This helped a ton and it is all working! I was just wondering where I could get more info on using cached map data only for offline uses?

  103. john says:

    how can i take a pic from map?

  104. Nelson says:

    Please anybody know why GMap.NET.MapProviders.GoogleMapProvider.Instance.GetRoute(start, end, false, false, 15) always returns null for me? I really can’t figure it out.

  105. james says:

    Is there a sample to read Serial Data in to Gmap.

  106. behnam says:

    Hi buddy
    How to add tooltip to Gmap.Net polygon?
    I’m adding polygons on form load event. But I can not set tooltip text for polygons.
    any idea?

  107. albert says:

    hi thank you for your help

    i used a button to draw the polygon, but when i press it no think happend (no polygon)
    this is the code

    private void button2_Click(object sender, EventArgs e)
    GMapOverlay polyOverlay = new GMapOverlay(“polygons”);
    List points = new List();
    points.Add(new PointLatLng(-25.969562, 32.585789));
    points.Add(new PointLatLng(-25.966205, 32.588171));
    points.Add(new PointLatLng(-25.968134, 32.591647));
    points.Add(new PointLatLng(-25.971684, 32.589759));
    GMapPolygon polygon = new GMapPolygon(points, “mypolygon”);
    polygon.Fill = new SolidBrush(Color.FromArgb(50, Color.Red));
    polygon.Stroke = new Pen(Color.Red, 1);

    • Felix says:

      It may be because there is no Instance of GMaps in that function

      • AHtesham Ur Rahim says:

        there is a error in my code , I don’t know what it is.. please help to find its solution.
        here is the code..
        private void button1_Click(object sender, EventArgs e)
        button1.Enabled = false;

        gMapControl1.MapProvider = GMap.NET.MapProviders.GoogleMapProvider.Instance;

        GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerAndCache;
        gMapControl1.Position = new PointLatLng(33.578989, 73.064408);
        GMapOverlay markerOverlay = new GMapOverlay(“Markers”);
        GMarkerGoogle marker = new GMarkerGoogle(new PointLatLng(-25.966688, 32.580528),;
        GMapOverlay polyoverlay = new GMapOverlay(“Polygons”);
        IList points = new List();
        points.Add(new PointLatLng(33.578989, 73.064408 ));
        points.Add(new PointLatLng(33.57905, 73.064372));
        points.Add(new PointLatLng(33.578855, 73.064433));
        points.Add(new PointLatLng(33.578877, 73.064572));
        points.Add(new PointLatLng(33.578413, 73.06473));
        points.Add(new PointLatLng(33.578291, 73.064663));
        GMapPolygon polygon = new GMapPolygon(points,”mypolygone”);

        there is error in the last line of the code. “GMapPolygon polygon = new GMapPolygon(points,”mypolygone”);”
        it says that there is an argument error . please let me know the solution of it. Thanks

  108. albert says:

    sorry i had to zoom to see it

    thank you

  109. amine says:

    hi, thank you very much for this forum.
    please can you tell me how to draw manualy by the mouse a polygon.
    i can draw it by a button like in this tutorial but i want to do it mouse.
    than u again

  110. Monica says:

    hello, congrats for the tutorial!
    Im doing the polygon part but i get an error in “list points = new list();
    it says requires one argument “System.Collections.Generic.list;
    any suggestion?

  111. Vinicius Oliverio says:

    Hi, I’ve tryed it in a Win CE device (.Net CF 3.5) and it worked fine except for the fact that It fills the polygon with solid colors (this is a limitation of the framework), can I set it only to show the lines and not fill the polygon?

  112. cnt says:

    great site man

  113. Zaki Choudhury says:

    Great tutorial! I was able to do the following things in less than 30 mins:
    1. Create a winforms application and show a map
    2. Draw a custom route
    3. Save the map view as an image

    Thanks a lot for this article.

  114. mania says:

    Can you show us ho to get elevation(altitude) of point or place
    Thank you!

  115. Mohamed Omar says:

    Hello, very nice tool
    i need to make my Owen provider. i have some custom tiles and i need to show those tiles on GMap.Net
    how can i do that in details?

  116. aniq ur rahman says:

    thanks for great tutorial
    i am using this code but polygons didn’t apears.

    GMapOverlay polyOverlay = new GMapOverlay(“mypolygon”);
    List points = new List();
    points.Add(new GMap.NET.PointLatLng(-25.969562, 32.585789));
    points.Add(new GMap.NET.PointLatLng(-25.966205, 32.588171));
    points.Add(new GMap.NET.PointLatLng(-25.968134, 32.591647));
    points.Add(new GMap.NET.PointLatLng(-25.971684, 32.589759));
    GMapPolygon polygon = new GMapPolygon(points, “my polygon”);
    polygon.Fill = new SolidBrush(Color.FromArgb(50, Color.Red));
    polygon.Stroke = new Pen(Color.Red, 1);

    • cristian says:

      “gMapControl1.Overlays.Add(polyOverlay) ” dejalo antes que el polyOverlay.Polygons.Add(polygon);

      ej :

  117. Ralph says:

    I’m stuck in the Load event. I’m always getting this blue tile saying “Exception: Unable to Connect to Remote Server”. I’ve tried all of the maps provider. I’m using the .Net 2.0 on .Net 3.5 WinForms App.

  118. Abbas says:

    Thanks, a good brief introduction!

  119. Abbas says:

    I encountered two problems :
    1- when adding gmap toolbox on your form, the parameters zoom, MinZoom, MaxZoom must be set properly, otherwise the running form show an error message.
    2- my library has the function “SetPositionByKeywords” instead of “SetCurrentPositionByKeywords” used in this introduction

    anyway, thanks a lot

  120. mesut piskin says:


    I have a problem.How to change background image a gmap control.

  121. LacDu says:

    Very useful tutorial : works perfectly.
    Can you add how to draw a polygon with 1 or 2 holes inside ?
    I google a lot and was unable to find a clear / simple example like yours

  122. dabi says:

    I wanted to know how to create and add a marker marker on Google Maps or a point on the map and how to change the marker image in C # please and thank you

  123. sangeetha says:

    Can you please explain how we can cache the tiles in GMAP locally..

  124. Arik Mahmood says:

    hey i also tried this works but i need some help.
    this code you have provided is you have to operate manually.
    but i want a code that my gps device will take the input and the map will show the results where the gps giving updating everytime the cordinates

    this my can anyone solve like i desire to:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using GMap.NET.WindowsForms;
    using GMap.NET;
    using GMap.NET.MapProviders;
    using GMap.NET.WindowsForms.Markers;

    namespace mapmap
    public partial class Form1 : Form
    public Form1()

    private void mapexplr_Load(object sender, EventArgs e)
    mapexplr.MapProvider = GMap.NET.MapProviders.BingMapProvider.Instance;
    GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly;
    mapexplr.SetPositionByKeywords(“Dhaka, Bangladesh”);
    mapexplr.Position = new PointLatLng(23.810332, 90.412518);
    GMapOverlay markersOverlay = new GMapOverlay(“markers”);
    GMarkerGoogle marker0 = new GMarkerGoogle(this.mapexplr.Position, GMarkerGoogleType.arrow);
    GMarkerGoogle marker1 = new GMarkerGoogle(new PointLatLng(23.810772, 90.412928), GMarkerGoogleType.arrow);
    GMarkerGoogle marker2 = new GMarkerGoogle(new PointLatLng(23.810932, 90.412868), GMarkerGoogleType.arrow);

  125. jjlin says:

    I’m having a problem with the marker.
    I’m working on Google Maps. When the map is loaded at the beginning and a marker is added based on the coordinates from a file, an incorrect marker will also appear on the map, but once I scroll the mouse it will disappear and leave only the correct one and no events are created so far for the map. Any hints that may explain why it happens ?

  126. jacob says:

    Hi there,
    So i’m following your tutorial about Gmap and at the polygon section, i have always a error saying
    that the first argument of my variable polygon cannot be convert: System.collections.generix.Ilist into System.Runtine.Serialization.SerializationinInfo:

    the source of the error: GMapOverlay polygon = new GMapPolygon(points, “Mypolygon”);

    Erreur 1 La méthode surchargée correspondant le mieux à ‘GMap.NET.WindowsForms.GMapPolygon.GMapPolygon(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)’ possède des arguments non valides

  127. PengSheng says:

    i want to use it in offline mode but have much problem the code is shown below canyou give me advises to use it in offline mode.
    this.gmap.Manager.Mode = AccessMode.CacheOnly;
    this is app.config file

    • IceBear.7th says:

      i think first u need to save ur cache. holding alt then drag the selection area. and then u go to cache tab and select prefetch selected area.

  128. PengSheng says:

    app.config file

    i don’t understant what the ‘MapData’ means is it stand for the directionery off the map cache i am so confused

  129. MiniCircuit says:

    is it possible to load an ECW or geotiff files using GMap ? I don’t want to use the cashed tiles or any online map server since I have my own ecw files. please advice if there is anyway of doing it through gmap

  130. Shiro says:

    Great Tutorial ! Already develop with Bing Maps. But cannot found my area, with it. Now I can use google maps without many code! Thank for your tuto

  131. IceBear.7th says:

    Hello. How do I put a car picture into the map and it will move based on the lat long displayed from textbox?

  132. Syed Faiz Ali says:

    Will you please tell me. if i want to know the current location dynamically. means i want my current location without giving latitude and longitude or any sort of an address ?

  133. Mr.X says:

    you said : ‘don’t forget to add overlays to the map, or they won’t show up’.
    How to add overlays to the map?

  134. FreeZ says:

    I’m looking for some function which can create a circle on map. Exist some function which can create a circle, for examle with 5 meters radius ?

  135. Jack says:

    hello ,alex.
    i want to ask you some qusetion,the following is my code.

    GMapMarker gMapMarker = new GMarkerGoogle(new PointLatLng(LATLOG[0], LATLOG[1]), GMarkerGoogleType.arrow);

    GMapOverlay gMapOverlay = new GMapOverlay(“mark”);

    i want to show the latest “mark point”,however ,all of these markers will stay on the map .is there a funtion like (refresh)?

  136. Markus H. says:

    Thank you for this Tutorial!!
    I have one question left:

    In my Program i always have only one Overlay which always contains only one polygon.

    Is there a function which Sets the Position and zoom automatically to be the polygon in the center of the map?

  137. James says:

    Thank you for this awesome tutorial!

    Do you have any solution for multiple markers with the same locations on the map. Especially when tooltips are always enabled. In this case only the last tooltip will be visible.
    It would be great to see all the tooltips combined.


  138. arif ibrahim says:

    Hello, thank you for this tutorial.
    i have one question.

    How to determine whether a point is inside or outside of the radius circle? Do you have any solution?


Leave a Reply

Your email address will not be published. Required fields are marked *