- [osx] set -fvisibility-inlines-hidden in gyp/common.gypi to silence mismatched visibility linker warnings - [linux] set cxx_host in GYP_FLAGS to set -fabi-version=0 on gcc builds to use clang-built mason binaries - [ios] update symbol visibility for iOS tests - [ios] link libgeojsonvt.a in iOS tests xcodeproj - add libgeojsonvt.a to General -> Linked Frameworks and Libraries - add mason_packages (recursive) to Build Settings -> Library Search Path - [ios] add libuv and geojsonvt first in iOS libtool smush to ensure symbols are found by later compilation units where they are undefined
46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
#ifndef MBGL_SHAPE_ANNOTATION_IMPL
|
|
#define MBGL_SHAPE_ANNOTATION_IMPL
|
|
|
|
#include <mapbox/geojsonvt/geojsonvt.hpp>
|
|
|
|
#include <mbgl/annotation/annotation.hpp>
|
|
#include <mbgl/annotation/shape_annotation.hpp>
|
|
#include <mbgl/util/geo.hpp>
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <map>
|
|
|
|
namespace mbgl {
|
|
|
|
class Style;
|
|
class StyleLayer;
|
|
class AnnotationTile;
|
|
|
|
class ShapeAnnotationImpl {
|
|
public:
|
|
using Map = std::map<AnnotationID, std::unique_ptr<ShapeAnnotationImpl>>;
|
|
|
|
ShapeAnnotationImpl(const AnnotationID, const ShapeAnnotation&, const uint8_t maxZoom);
|
|
|
|
LatLngBounds bounds() const;
|
|
void updateStyle(Style&);
|
|
void updateTile(const TileID&, AnnotationTile&);
|
|
|
|
const AnnotationID id;
|
|
const std::string layerID;
|
|
const ShapeAnnotation shape;
|
|
|
|
private:
|
|
std::unique_ptr<StyleLayer> createLineLayer();
|
|
std::unique_ptr<StyleLayer> createFillLayer();
|
|
|
|
const uint8_t maxZoom;
|
|
mapbox::util::geojsonvt::ProjectedFeatureType type;
|
|
std::unique_ptr<mapbox::util::geojsonvt::GeoJSONVT> shapeTiler;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|