mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:50:05 +00:00
Modify usage of get_marker for updated interface, and update checks for lat/lon input
This commit is contained in:
parent
0ec81e5832
commit
0cfad82933
2 changed files with 30 additions and 34 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue