Back to Devexpress

GeoPoint.Latitude Property

wpf-devexpress-dot-xpf-dot-map-dot-geopoint-47b90326.md

latest4.0 KB
Original Source

GeoPoint.Latitude Property

Gets or sets a latitude value for the current geographical coordinate.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public double Latitude { get; set; }
vb
Public Property Latitude As Double

Property Value

TypeDescription
Double

A Double value that is the latitude for this GeoPoint.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Latitude property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-map_implement-custom-map-projection/CS/CustomProjection/HammerAitoffProjection.cs#L42

csharp
maxLatitude,
    Math.Max(minLatitude, geoPoint.Latitude)
)

wpf-map-use-ray-casting-algorithm-to-check-if-point-is-inside-polygon/CS/DXMapShapeFile1/MainWindow.xaml.cs#L52

csharp
for (int i = 0; i < polygon.Count(); i++) {
    if (polygon[i].Latitude < testPoint.Latitude && polygon[j].Latitude >= testPoint.Latitude || polygon[j].Latitude < testPoint.Latitude && polygon[i].Latitude >= testPoint.Latitude) {
        if (polygon[i].Longitude + (testPoint.Latitude - polygon[i].Latitude) / (polygon[j].Latitude - polygon[i].Latitude) * (polygon[j].Longitude - polygon[i].Longitude) < testPoint.Longitude) {

wpf-map_implement-custom-map-projection/VB/CustomProjection/HammerAitoffProjection.vb#L61

vb
Dim lonInRadian As Double = DegreeToRadian(Math.Min(maxLongitude, Math.Max(minLongitude, geoPoint.Longitude)))
Dim latInRadian As Double = DegreeToRadian(Math.Min(maxLatitude, Math.Max(minLatitude, geoPoint.Latitude)))
Dim z As Double = Math.Sqrt(1 + Math.Cos(latInRadian) * Math.Cos(lonInRadian / 2))

wpf-map-use-ray-casting-algorithm-to-check-if-point-is-inside-polygon/VB/DXMapShapeFile1/MainWindow.xaml.vb#L46

vb
For i As Integer = 0 To polygon.Count() - 1
    If polygon(i).Latitude < testPoint.Latitude AndAlso polygon(j).Latitude >= testPoint.Latitude OrElse polygon(j).Latitude < testPoint.Latitude AndAlso polygon(i).Latitude >= testPoint.Latitude Then
        If polygon(i).Longitude + (testPoint.Latitude - polygon(i).Latitude) / (polygon(j).Latitude - polygon(i).Latitude) * (polygon(j).Longitude - polygon(i).Longitude) < testPoint.Longitude Then

See Also

GeoPoint Class

GeoPoint Members

DevExpress.Xpf.Map Namespace