Click or drag to resize

BoundingBoxCenter Property

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Gets a LatLon representing the center of the BoundingBox.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public LatLon Center { get; }

Property Value

Type: LatLon
Examples
C#
// 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);
See Also