[core] Add RendererState::{pixelForLatLng,latLngForPixel}
This commit is contained in:
@@ -87,6 +87,21 @@ bool HeadlessFrontend::hasSource(const std::string& id) {
|
||||
|
||||
return false;
|
||||
}
|
||||
ScreenCoordinate HeadlessFrontend::pixelForLatLng(const LatLng& coordinate) {
|
||||
if (updateParameters) {
|
||||
return RendererState::pixelForLatLng(*updateParameters, coordinate);
|
||||
}
|
||||
|
||||
return ScreenCoordinate {};
|
||||
}
|
||||
|
||||
LatLng HeadlessFrontend::latLngForPixel(const ScreenCoordinate& point) {
|
||||
if (updateParameters) {
|
||||
return RendererState::latLngForPixel(*updateParameters, point);
|
||||
}
|
||||
|
||||
return LatLng {};
|
||||
}
|
||||
|
||||
void HeadlessFrontend::setSize(Size size_) {
|
||||
if (size != size_) {
|
||||
|
||||
@@ -39,6 +39,9 @@ public:
|
||||
bool hasLayer(const std::string&);
|
||||
bool hasSource(const std::string&);
|
||||
|
||||
ScreenCoordinate pixelForLatLng(const LatLng&);
|
||||
LatLng latLngForPixel(const ScreenCoordinate&);
|
||||
|
||||
PremultipliedImage readStillImage();
|
||||
PremultipliedImage render(Map&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user