If the view is not tilted, we want the new symbols to show up faster, so we squeeze the placement period.
On contrary, with the tilted view it's more important to make placement rarely for performance reasons and as the new symbols are normally "far away" and the user is not that interested to see them ASAP.
Tile mode placement algorithm now checks if bounding boxes for both label text and icon are intersecting the edges of the tiles.
Before, it checked only text bounding boxes and thus label icons might have got cut off.
Map and renderer / orchestrator should be able to run on a separate threads,
however, legacy AnnotationManager is shared between Map and Renderer, therefore
is not a thread safe. Until AnnotationManager is deprecated and removed from a
code-base, use it only via weak pointers.
They have a different license from the rest of the code
and this will make it explicit. Also the script for generating
the license will dectect them correctly.
If we get a new sprite sheet from the server, we need to merge current
sprite sheet with a new one, while overwiting duplicates and keeping
old unique images in a style.
We used some shared SegmentVectors, e.g. for drawing raster or background tiles.
In longer running maps, this lead to resource accumulation. By storing the SegmentVectors
and the contained gfx::DrawScope objects, we ensure that resources get released
when the associated render objects vanish.
In cases when cached resource is useable, yet don't have an expiration
timestamp, we provided data to the requester from the cache and the same
data was returned once 304 response was received from the network.
What happened:
The excessive `onSpriteLoaded()` notifications were caused by the trick inside `OnlineFileRequest::completed()` implemenation,
which causes receving of two file source updates pointing to the *same* data in case the network response is `notModified` and
the local storage has the sprite sheet already stored inside.
In the SpriteLoader` implementation, it resulted in 2 extra `parseSprite()` calls and 2 extra `onSpriteLoaded()` notifications.
Then, the excessive `onSpriteLoaded()` notifications affected style images and all the unnecessarily added image dupes (btw,
the amount of these dupes `= 2 * number of style images`) were treated by the `RenderOrchestrator` as *updated* images.
Further, `RenderOrchestrator` called `ImageManager::updateImage()` for the updated images and the `ImageManager` populated the
`updatedImageVersions` map.
Finally, at every frame all the geometry tiles iterated through the `updatedImageVersions` to check whether their uploaded
textures needed patching.
All the mentioned above had a negative performance impact.
The fix:
Now, `SpriteLoader` sends `onSpriteLoaded()` notifications only if the data in the file source response is different comparing
to the existing one.