BoundingBoxCenter Property |
Namespace: Telogis.GeoBase
// Create a render list to draw on the Map RendererList renderList = new RendererList(); mapCtrl1.Renderer = renderList; // Create a BoundingBox BoundingBox bb1 = new BoundingBox(); // Add arbitrary points in Los Angeles, USA bb1.Add(new LatLon(33.787935, -118.013866)); bb1.Add(new LatLon(33.761919, -117.985009)); // Write the box center LatLon location to the console Console.WriteLine("The center of this BoundingBox is {0}", bb1.Center); // Prints 'The center of this BoundingBox is 33.774928,-117.999437' // Add a BalloonPushPin at the center of the box BalloonPushPin centerLoc = new BalloonPushPin(bb1.Center); centerLoc.Name = "BoundingBox Center"; // Add the BoundingBox and BalloonPushPin to the Map renderList.Add(bb1); renderList.Add(centerLoc); // Zoom to the BoundingBox mapCtrl1.ZoomToBoundingBox(bb1,10);