diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp index d9d6312a7..c652520bc 100644 --- a/map-widget/qmlmapwidgethelper.cpp +++ b/map-widget/qmlmapwidgethelper.cpp @@ -115,7 +115,7 @@ void MapWidgetHelper::reloadMapLocations() // at least MIN_DISTANCE_BETWEEN_DIVE_SITES_M apart if (locationNameMap.contains(name)) { MapLocation *existingLocation = locationNameMap[name]; - QGeoCoordinate coord = qvariant_cast(existingLocation->getRole(MapLocation::Roles::RoleCoordinate)); + QGeoCoordinate coord = existingLocation->coordinate(); if (dsCoord.distanceTo(coord) < MIN_DISTANCE_BETWEEN_DIVE_SITES_M) continue; }