Importing KML from local source

Jan 21, 2010 at 1:41 PM

I would like to display a polygon defined in a KML string on my GMap.  Is there any built in way to do this?  The KML could come from a local source or a network location.  Thanks for putting out this control, it is a life safer!  I also think it's great you've spent the time doing it in WPF.



Jan 21, 2010 at 2:31 PM
Edited Jan 21, 2010 at 2:32 PM
  1. first you need a kml parser, or parse manualy,
  2. create custom marker, and draw your polygon using coordinates,
Jan 21, 2010 at 2:43 PM

Thanks Radioman for the quick response!  When using WPF to create markers, how would you recommend I create more complex polygons.  Polygons, for instance, with curves and straight lines.  Will Paths work for this scenario?  Thanks again!

Jan 21, 2010 at 2:47 PM

for best performance

Jan 22, 2010 at 12:55 PM

Thanks for the links.  They are certainly setting me in the right direction.  Do you have a function built into the GMaps API that will convert real world coordinates or distances into WPF Path pixels?  It seems like GMap places markers and then to draw a polygon from there it is a 0,0 coordinate system.


Thanks again!

Jan 22, 2010 at 1:37 PM

check GMap.NET.WindowsPresentation.RegenerateRouteShape. It's something like that. But there are many ways to do the same things. And i'm looking for the best ;}