Click or drag to resize

CircleFence Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A circular-shaped geofence, defined by a center point and radius.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBase.GeoFenceCircleFence

Namespace:  Telogis.GeoBase.GeoFence
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class CircleFence : IMapRenderer, 
	IGeoFence

The CircleFence type exposes the following members.

Constructors
  NameDescription
Public methodCircleFence
Initializes a new instance of the CircleFence class
Top
Properties
  NameDescription
Public propertyBoundingBox
Calculates and returns the BoundingBox for this GeoFence.
Public propertyRenderBrush
Brush used to fill the GeoFence, use null for no fill.
Public propertyRenderPen
Pen used to draw the border around the GeoFence, use null for no border.
Public propertyRequiredRendermodes
Gets the RenderMode required by this CircleFence.
Top
Methods
  NameDescription
Public methodContains
Determines whether the given point is within this GeoFence.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRadius
Gets the radius of the GeoFence in the specified DistanceUnit.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRender
Render the GeoFence on the specified IMap.
Public methodSetRadius
Sets the radius of the GeoFence in the specified DistanceUnit.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldCenter
A LatLon describing the center-point of the circle.
Public fieldRadius
The radius of the GeoFence (in Radians).
Top
Remarks

Related articles: Geofences Concept.

Examples

C#
CircleFence cf = new CircleFence();

// set the radius (in miles - we can use similar properties to set
// the radius in meters and feet) and center location of the fence
cf.RadiusMiles = 2;
cf.Center = new LatLon(33.581353, -117.726979);

// draw the CircleFence on our map
myMap.Items.Add(cf);

The same effect can be achieved using XAML code by placing the following code snippet inside a Map object.

XAML
<GeoFence:CircleFence x:Name="cf"
    Center="33.581353, -117.726979"
    RadiusMiles="2"
/>

See also PolygonFence.

See Also