Back to Devexpress

GeoUtils.CalculateCenter(GeoPoint, GeoPoint) Method

wpf-devexpress-dot-xpf-dot-map-dot-geoutils-dot-calculatecenter-x28-devexpress-dot-xpf-dot-map-dot-geopoint-devexpress-dot-xpf-dot-map-dot-geopoint-x29.md

latest1.9 KB
Original Source

GeoUtils.CalculateCenter(GeoPoint, GeoPoint) Method

Returns a center point with geographical coordinates between two given points.

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public static GeoPoint CalculateCenter(
    GeoPoint point1,
    GeoPoint point2
)
vb
Public Shared Function CalculateCenter(
    point1 As GeoPoint,
    point2 As GeoPoint
) As GeoPoint

Parameters

NameTypeDescription
point1GeoPoint

The first geographical point.

| | point2 | GeoPoint |

The second geographical point.

|

Returns

TypeDescription
GeoPoint

A center between two specified points.

|

Remarks

The following code shows how to use the CalculateCenter method to find a center between two points.

csharp
GeoPoint centerPoint = GeoUtils.CalculateCenter(new GeoPoint(35.286, -111.1724), new GeoPoint(38.3802, -110.9307));
vb
Dim centerPoint As GeoPoint = GeoUtils.CalculateCenter(New GeoPoint(35.286, -111.1724), New GeoPoint(38.3802, -110.9307))

See Also

GeoUtils Class

GeoUtils Members

DevExpress.Xpf.Map Namespace