BoundingBoxAdd Method (BoundingBox) |
Namespace: Telogis.GeoBase
// Create rendererlist RendererList renderList = new RendererList(); mapCtrl1.Renderer = renderList; // Create two BoundingBoxes BoundingBox bb1 = new BoundingBox(); bb1.Color = Color.Blue; BoundingBox bb2 = new BoundingBox(); bb2.Color = Color.Green; // Add locations to enclose, expanding the first BoundingBox bb1.Add(new LatLon(33.94, -118.34)); bb1.Add(new LatLon(33.78, -117.95)); // Add locations to enclose, expanding the second BoundingBox bb2.Add(new LatLon(33.680444,-118.003901)); bb2.Add(new LatLon(33.589877, -117.838811)); // Expand BoundingBox1 to include BoundingBox2 bb1.Add(bb2); // Zoom the map to the BoundingBox1: mapCtrl1.ZoomToBoundingBox(bb1, 20); // Add both BoundingBoxes to the renderer renderList.Add(bb1); renderList.Add(bb2);