songjingyu / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
0 stars 0 forks source link

How to create a route #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How to create a manually route?
I have points (x,y) and I need to create a route by this locations 

Original issue reported on code.google.com by hamdy.ghanem on 15 Aug 2012 at 12:51

GoogleCodeExporter commented 9 years ago
Sorry, I don't understand what you mean by 'route', are you wanting to draw a 
line or something else? Other than that you would need to explain more clearly 
- routes and directions are part of the Maps api - rather than the Earth api.

Original comment by fraser.c...@gmail.com on 15 Aug 2012 at 8:49

GoogleCodeExporter commented 9 years ago
Yes
I mean draw paths from sorted cordinates

Original comment by hamdy.ghanem on 15 Aug 2012 at 11:47

GoogleCodeExporter commented 9 years ago
Ok I understand. There are a couple of ways. Firstly you could use the 
overloaded static method CreateLineString in the KmlHelpers class. 

http://code.google.com/p/winforms-geplugin-control-library/source/browse/trunk/H
elpers/KmlHelpers.cs

Or you could use the standard javascript api calling things like...

// where ge is the GEPlugin object and startLat, startLong, etc are your 
coordinate values.

dynamic lineString = ge.createLineString(id);
lineString.setTessellate(1);
lineString.getCoordinates().pushLatLngAlt(startLat, startLong, startAlt);
lineString.getCoordinates().pushLatLngAlt(endLat, endLong, endAlt);

Original comment by fraser.c...@gmail.com on 17 Aug 2012 at 6:42