#pragma once #include #include #include #include #include #include #include #include #include namespace mbgl { class AnnotationTileLayer; class CanonicalTileID; class SymbolAnnotationImpl { public: SymbolAnnotationImpl(AnnotationID, SymbolAnnotation); void updateLayer(const CanonicalTileID&, AnnotationTileLayer&) const; const AnnotationID id; const SymbolAnnotation annotation; }; } // namespace mbgl namespace boost { namespace geometry { // Make Boost Geometry aware of our LatLng type namespace traits { template<> struct tag { using type = point_tag; }; template<> struct dimension : boost::mpl::int_<2> {}; template<> struct coordinate_type { using type = double; }; template<> struct coordinate_system { using type = boost::geometry::cs::cartesian; }; template<> struct access { static inline double get(mbgl::LatLng const& p) { return p.longitude(); } }; template<> struct access { static inline double get(mbgl::LatLng const& p) { return p.latitude(); } }; template<> struct tag { using type = box_tag; }; template<> struct point_type { using type = mbgl::LatLng; }; template struct indexed_access { using ct = coordinate_type::type; static inline ct get(mbgl::LatLngBounds const& b) { return geometry::get(b.southwest()); } static inline void set(mbgl::LatLngBounds& b, ct const& value) { geometry::set(b.southwest(), value); } }; template struct indexed_access { using ct = coordinate_type::type; static inline ct get(mbgl::LatLngBounds const& b) { return geometry::get(b.northeast()); } static inline void set(mbgl::LatLngBounds& b, ct const& value) { geometry::set(b.northeast(), value); } }; } // namespace traits // Tell Boost Geometry how to access a std::shared_ptr object. namespace index { template <> struct indexable> { using result_type = mbgl::LatLng; mbgl::LatLng operator()(const std::shared_ptr& v) const { const mbgl::Point& p = v->annotation.geometry; return {p.y, p.x}; } }; } // namespace index } // namespace geometry } // namespace boost