DataQueryQueryStreets Method (BoundingBox, StreetType, CancellationToken) |
Namespace: Telogis.GeoBase
public static Street[] QueryStreets( BoundingBox bbox, StreetType type, CancellationToken token )
This method also matches Streets that pass through bbox and continue
outside its area.
Further, Streets with BoundingBoxes
that intersect bbox will also be returned by this method, thus it is possible
that streets will be returned that appear to lie outside rect.
Note |
---|
The maximum number of results that can be returned is limited to 262144. |
// Create a BoundingBox enclosing and intersecting with the streets to query BoundingBox queryBox = new BoundingBox(new LatLon(33.634706, -117.900585), new LatLon(33.633433, -117.899539)); // Create a cancellation token var token = new CancellationToken(); // Create the QueryStreets array. In this case specifying a StreetType of 'STREETS' Street[] queryStreets = DataQuery.QueryStreets(queryBox, StreetType.STREETS, token); // Write out the results string output = "Found " + queryStreets.Length + " streets in the BoundingBox: "; for (int i = 0; i < queryStreets.Length; i++) { output += queryStreets[i].ToString() + ", "; } Console.WriteLine(output); // Found 10 streets in the BoundingBox: Diana Ln, Deborah Ln, Sylvia Ln, Priscilla // Ln, Beryl Ln, Highland Dr, Santiago Dr, Tustin Ave, Santa Ana Ave, Orange Ave,