DataQueryFindNearestPolygons Method (LatLon, String) |
Namespace: Telogis.GeoBase
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")[0];