Merge pull request #294 from AdenKoperczak/location_markers_ids

Location markers ids
This commit is contained in:
Dan Paulat 2024-11-27 12:32:22 -06:00 committed by GitHub
commit c4f78df149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 451 additions and 58 deletions

View file

@ -55,17 +55,13 @@ void MarkerLayer::Impl::ReloadMarkers()
geoIcons_->StartIcons();
for (size_t i = 0; i < markerManager->marker_count(); i++)
{
std::optional<types::MarkerInfo> marker = markerManager->get_marker(i);
if (!marker)
markerManager->for_each(
[this](const types::MarkerInfo& marker)
{
break;
}
std::shared_ptr<gl::draw::GeoIconDrawItem> icon = geoIcons_->AddIcon();
geoIcons_->SetIconTexture(icon, markerIconName_, 0);
geoIcons_->SetIconLocation(icon, marker->latitude, marker->longitude);
}
std::shared_ptr<gl::draw::GeoIconDrawItem> icon = geoIcons_->AddIcon();
geoIcons_->SetIconTexture(icon, markerIconName_, 0);
geoIcons_->SetIconLocation(icon, marker.latitude, marker.longitude);
});
geoIcons_->FinishIcons();
Q_EMIT self_->NeedsRendering();