Click or drag to resize

BoundingBoxAdd Method (BoundingBox)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Inflate the BoundingBox to include this box.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public virtual void Add(
	BoundingBox box
)

Parameters

box
Type: Telogis.GeoBaseBoundingBox
A BoundingBox which this box will inflate to contain.
Remarks
This method is a convenience method that calls Add(LatLon) twice, once for P1 and again for P2.
Examples
C#
   // 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);
See Also