[core] Restored shape annotation z-order
Shapes are once again always added to the top z-index. Fixes #5691.
This commit is contained in:
committed by
Minh Nguyễn
parent
da35ef9f49
commit
74fe96d261
@@ -67,8 +67,10 @@ private:
|
||||
AnnotationID nextID = 0;
|
||||
|
||||
using SymbolAnnotationTree = boost::geometry::index::rtree<std::shared_ptr<const SymbolAnnotationImpl>, boost::geometry::index::rstar<16, 4>>;
|
||||
using SymbolAnnotationMap = std::unordered_map<AnnotationID, std::shared_ptr<SymbolAnnotationImpl>>;
|
||||
using ShapeAnnotationMap = std::unordered_map<AnnotationID, std::unique_ptr<ShapeAnnotationImpl>>;
|
||||
// Unlike std::unordered_map, std::map is guaranteed to sort by AnnotationID, ensuring that older annotations are below newer annotations.
|
||||
// <https://github.com/mapbox/mapbox-gl-native/issues/5691>
|
||||
using SymbolAnnotationMap = std::map<AnnotationID, std::shared_ptr<SymbolAnnotationImpl>>;
|
||||
using ShapeAnnotationMap = std::map<AnnotationID, std::unique_ptr<ShapeAnnotationImpl>>;
|
||||
|
||||
SymbolAnnotationTree symbolTree;
|
||||
SymbolAnnotationMap symbolAnnotations;
|
||||
|
||||
Reference in New Issue
Block a user