Back to Devexpress

GeoPoint.Longitude Property

wpf-devexpress-dot-xpf-dot-map-dot-geopoint-d18b9818.md

latest3.9 KB
Original Source

GeoPoint.Longitude Property

Gets or sets a longitude 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 Longitude { get; set; }
vb
Public Property Longitude As Double

Property Value

TypeDescription
Double

A Double value that is the longitude for this GeoPoint.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Longitude 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-use-ray-casting-algorithm-to-check-if-point-is-inside-polygon/CS/DXMapShapeFile1/MainWindow.xaml.cs#L53

csharp
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) {
        result = !result;

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

csharp
maxLongitude,
    Math.Max(minLongitude, geoPoint.Longitude)
)

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

vb
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
        result = Not result

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

vb
Public Overrides Function GeoPointToMapUnit(ByVal geoPoint As GeoPoint) As MapUnit
    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)))

See Also

GeoPoint Class

GeoPoint Members

DevExpress.Xpf.Map Namespace