Click here to Skip to main content
6,629,885 members and growing! (19,977 online)
Email Password   helpLost your password?
Desktop Development » Miscellaneous » Windows Forms     Advanced License: The MIT License

GMap.NET - Great Maps for Windows Forms & Presentation

By radioman.lt

GMap.NET is a powerful, Free, cross platform, open source .NET control. Enable use routing, geocoding and maps from Google, Yahoo!, OpenStreet in Windows Forms & Presentation, supports caching!
C#.NET 2.0, Mono, .NET 3.0, GDI, GDI+, ADO.NET, WPF, WinForms, Architect, Dev, Design
Version:8 (See All)
Posted:18 Jan 2009
Updated:31 Jan 2009
Views:46,719
Bookmarked:225 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
55 votes for this article.
Popularity: 7.74 Rating: 4.45 out of 5
3 votes, 5.5%
1
2 votes, 3.6%
2
3 votes, 5.5%
3
6 votes, 10.9%
4
41 votes, 74.5%
5
GMapNET/GMapNETv7cp.PNG

Introduction

Google maps are cool, yeah? But it's useful only in browser and is insufficient for real time tracking. It also does not have cache so Google servers are overloaded. This control removes all these deficiencies! It also gives the .NET developer unlimited ability to extend it!

Background

The basic idea is simple: get the required data from Google, cache it, and use it. Fast, simple and practical.

Using the Code

It's more than easy. GMap.NET.dll contains the user control. Add it to your project and simply use it.

Basic control initial options:

// render mode, can be GDI/GDI+
MainMap.RenderMode = GMapRenderMode.GDI;

// cache usage
MainMap.UseTileCache = true;
MainMap.UseRouteCache = true;
MainMap.UseGeocoderCache = true;

// map type, map/satellite/terrain
MainMap.MapType = GMapType.Map;
MainMap.Zoom = 13;
MainMap.Language = "lt";

// set initial map coordinates in Latitude,Langtitude
MainMap.CurrentPosition = new PointLatLng(54.6961334816182, 25.2985095977783);

// for advanced, we can set events
MainMap.OnCurrentPositionChanged += 
	new GMapControl.CurrentPositionChanged(MainMap_OnCurrentPositionChanged);
MainMap.OnTileLoadStart += new GMapControl.TileLoadStart(MainMap_OnTileLoadStart);
MainMap.OnTileLoadComplete += 
	new GMapControl.TileLoadComplete(MainMap_OnTileLoadComplete);

// load map on main form shown
private void MainForm_Shown(object sender, EventArgs e)
{
   MainMap.ReloadMap();
}

As you can see, control options are quite simple. And there is nothing more to add.

Points of Interest

Well, it was quite cryptic to figure out how Google manages tiles, what coordinate system it uses, JSON decryption, etc.

History

Go to the project's CodePlex site to get a running update of any changes or improvements I've made.

License

This article, along with any associated source code and files, is licensed under The MIT License

About the Author

radioman.lt


Member

Occupation: Software Developer
Location: Lithuania Lithuania

Other popular Miscellaneous articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 122 (Total in Forum: 122) (Refresh)FirstPrevNext
QuestionError while coverting the route results with KmlType [modified] Pinmemberrmpandu22:45 26 Aug '09  
AnswerRe: Error while coverting the route results with KmlType Pinmemberradioman.lt23:10 26 Aug '09  
GeneralRe: Error while coverting the route results with KmlType Pinmemberrmpandu22:18 27 Aug '09  
GeneralError on loading Map PinmemberKashif Usman0:47 20 Aug '09  
GeneralRe: Error on loading Map Pinmemberradioman.lt2:07 20 Aug '09  
GeneralRe: Error on loading Map PinmemberKashif Usman18:31 20 Aug '09  
QuestionUsing the core in a Windows Service PinmemberDrJaymz6:54 3 Jun '09  
AnswerRe: Using the core in a Windows Service Pinmemberradioman.lt10:54 3 Jun '09  
GeneralRe: Using the core in a Windows Service PinmemberDrJaymz0:11 4 Jun '09  
GeneralRe: Using the core in a Windows Service Pinmemberradioman.lt0:18 4 Jun '09  
GeneralRe: Using the core in a Windows Service PinmemberDrJaymz5:53 5 Jun '09  
GeneralRe: Using the core in a Windows Service Pinmemberradioman.lt6:58 5 Jun '09  
GeneralRe: Using the core in a Windows Service Pinmemberradioman.lt9:55 5 Jun '09  
GeneralRe: Using the core in a Windows Service PinmemberDrJaymz13:01 5 Jun '09  
GeneralRe: Using the core in a Windows Service Pinmemberradioman.lt13:11 5 Jun '09  
GeneralRe: Using the core in a Windows Service PinmemberDrJaymz7:54 8 Jun '09  
GeneralRe: Using the core in a Windows Service Pinmemberradioman.lt8:02 8 Jun '09  
GeneralExcellent control Pinmemberfergal_moran9:45 25 May '09  
GeneralRe: Excellent control Pinmemberradioman.lt9:49 25 May '09  
QuestionAdd Marker and Black Map Screen PinmemberChris Dunne Kinetic1:02 22 Apr '09  
AnswerRe: Add Marker and Black Map Screen Pinmemberradioman.lt2:26 22 Apr '09  
RantRe: Add Marker and Black Map Screen PinmemberChris Dunne Kinetic4:41 22 Apr '09  
GeneralRe: Add Marker and Black Map Screen Pinmemberradioman.lt5:06 22 Apr '09  
GeneralRe: Add Marker and Black Map Screen PinmemberChris Dunne Kinetic1:31 24 Apr '09  
GeneralRe: Add Marker and Black Map Screen PinmemberChris Dunne Kinetic1:48 24 Apr '09  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 31 Jan 2009
Editor: Deeksha Shenoy
Copyright 2009 by radioman.lt
Everything else Copyright © CodeProject, 1999-2009
Web19 | Advertise on the Code Project