0

I am working on Windows Forms C# .Net 4.0 application and have a request to create a controls that:

Displays a map, hopefully current from Google Maps/Bing etc. that will allow the user to scroll and zoom

Allows a user to draw a shape on the this map, a circle at a minimum but a square or free form would be nice

Return the zip codes found in that shape for use by the application

I have been searching for .net map controls and most refer to asp.net controls, of the ones that seem to be for windows (GMap.net, SharpMap) it is not clear to me that I can do what I am trying to with these libraries. An opensource would be nice but buying a licence is not out of the question. Anyone who can point me in the right direction would be appreciated.

Matthew Bierman
  • 360
  • 3
  • 12

1 Answers1

0

I ve done something similar by combining Gmap.Net with google maps api for .NET (http://gmaps.codeplex.com/)

I already posted a way to draw a shape here

How to draw circle on the MAP using GMAP.NET in C#

It can be easily be adjusted to draw free form polygons (with the respective mouse click events)

as far as quering the google maps api to get post codes ect it might be proved tricky with shapes (especially freeform ones)

generally the idea on how google maps api for .net works is this

    private void findadd(string addstring)
    {
        var request = new GeocodingRequest();
        request.Address = addstring;
        request.Sensor = "false";
        var response = GeocodingService.GetResponse(request);
     }
Community
  • 1
  • 1
elasticrash
  • 1,181
  • 1
  • 12
  • 30