Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

#2329 Constrain map to user specified bounds #2341

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed indentation
maciekish committed Nov 26, 2015
commit 5a2704f789958f191d113bbbf79e5c5b9ec59fc0
4 changes: 2 additions & 2 deletions src/mbgl/map/transform_state.hpp
Original file line number Diff line number Diff line change
@@ -75,12 +75,12 @@ class TransformState {
LatLng coordinateToLatLng(const TileCoordinate&) const;

PrecisionPoint coordinateToPoint(const TileCoordinate&) const;
PrecisionPoint latLngToXY(LatLng latlng) const;
PrecisionPoint latLngToXY(LatLng latlng) const;
TileCoordinate pointToCoordinate(const PrecisionPoint&) const;

private:
void constrain(double& scale, double& x, double& y) const;
void userConstrain(double& scale_, double& x_, double& y_) const;
void userConstrain(double& scale_, double& x_, double& y_) const;

// Limit the amount of zooming possible on the map.
double min_scale = std::pow(2, 0);