DataQueryQueryPolygonsAtPoint Method (LatLon, String) |
Namespace: Telogis.GeoBase
Map features are stored in tables, named according to type. Developers with custom data should avoid using the table names in the list below.
Pre-defined polygon query tables |
---|
all |
countries |
states |
counties |
islands |
cities |
airports |
runways |
cemeteries |
hospitals |
industrial |
major_parks |
state_parks |
parks |
shopping |
sports |
universities |
golf_courses |
native |
military |
buildings |
oceans |
bays |
water |
// // Get the golf course (if one exists) at the given location... // LatLon loc = new LatLon(33.919432,-118.31181); // location in Los Angeles, USA Polygon[] gcs = DataQuery.QueryPolygonsAtPoint(loc, "golf_courses"); Console.WriteLine("There is " + gcs.Length + " golf course at the location " + loc.ToString()); // // Get all polygons at the given location... // gcs = DataQuery.QueryPolygonsAtPoint(loc, "all"); Console.WriteLine("There are a total of " + gcs.Length + " polygons at the location " + loc.ToString()); int counter = 1; foreach (Polygon p in gcs) { Console.WriteLine("\t" + (counter++) + ") " + p.Name); }
The above code snippet produces the following output: