Implement map projection functionality (#254)
* Implement map projection functionality * Add missing MGL_EXPORT * Remove the automatic copyright header
This commit is contained in:
committed by
GitHub
parent
ea234edf67
commit
6db27f50ad
@@ -23,6 +23,7 @@
|
||||
namespace mbgl {
|
||||
|
||||
class RendererFrontend;
|
||||
class TransformState;
|
||||
|
||||
namespace style {
|
||||
class Image;
|
||||
@@ -110,6 +111,9 @@ public:
|
||||
std::vector<ScreenCoordinate> pixelsForLatLngs(const std::vector<LatLng>&) const;
|
||||
std::vector<LatLng> latLngsForPixels(const std::vector<ScreenCoordinate>&) const;
|
||||
|
||||
// Transform
|
||||
TransformState getTransfromState() const;
|
||||
|
||||
// Annotations
|
||||
void addAnnotationImage(std::unique_ptr<style::Image>);
|
||||
void removeAnnotationImage(const std::string&);
|
||||
|
||||
30
include/mbgl/map/map_projection.hpp
Normal file
30
include/mbgl/map/map_projection.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <mbgl/map/camera.hpp>
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/util/noncopyable.hpp>
|
||||
#include <mbgl/util/geo.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
class Transform;
|
||||
|
||||
class MapProjection : private util::noncopyable {
|
||||
public:
|
||||
explicit MapProjection(const Map&);
|
||||
~MapProjection();
|
||||
|
||||
ScreenCoordinate pixelForLatLng(const LatLng&) const;
|
||||
LatLng latLngForPixel(const ScreenCoordinate&) const;
|
||||
|
||||
void setCamera(const CameraOptions&);
|
||||
CameraOptions getCamera() const;
|
||||
|
||||
/// Set the underneath camera so the requested coordinates are visible with the inset.
|
||||
void setVisibleCoordinates(const std::vector<LatLng>&, const EdgeInsets&);
|
||||
|
||||
private:
|
||||
std::unique_ptr<Transform> transform;
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
Reference in New Issue
Block a user