Modify usage of get_marker for updated interface, and update checks for lat/lon input

This commit is contained in:
AdenKoperczak 2024-10-06 12:23:45 -04:00
parent 0ec81e5832
commit 0cfad82933
2 changed files with 30 additions and 34 deletions

View file

@ -57,10 +57,14 @@ void MarkerLayer::Impl::ReloadMarkers()
for (size_t i = 0; i < markerManager->marker_count(); i++)
{
const types::MarkerInfo& marker = markerManager->get_marker(i);
std::optional<types::MarkerInfo> marker = markerManager->get_marker(i);
if (!marker)
{
break;
}
std::shared_ptr<gl::draw::GeoIconDrawItem> icon = geoIcons_->AddIcon();
geoIcons_->SetIconTexture(icon, markerIconName_, 0);
geoIcons_->SetIconLocation(icon, marker.latitude, marker.longitude);
geoIcons_->SetIconLocation(icon, marker->latitude, marker->longitude);
}
geoIcons_->FinishIcons();