DataQueryFindNearestPolygons Method (LatLon, String, Double) |
Namespace: Telogis.GeoBase
public static Polygon[] FindNearestPolygons( LatLon location, string tableName, double simplificationLevel )
See CustomTable for a list of predefined tables.
// // This example will use a GPS unit to find the current location, // and then perform a DataQuery to find the nearest hospital to our // current location... // SerialPort myPort = new SerialPort(); // create the GPS's serial port myPort.PortName = "COM1"; // configure the serial port myPort.BaudRate = 9600; IGps myGps = new NMEAGps(myPort); // create GPS unit myGps.PowerUp(); // power up the GPS, ready for use LatLon myLoc = myGps.Position.location; // get the current location // then get the nearest hospital, as a polygon... Polygon hospital = DataQuery.FindNearestPolygons(myLoc, "hospitals", 5)[0];