-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
honor minimal zoom when rendering map preview
- Loading branch information
Showing
4 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
defmodule Basemap.Constants do | ||
def bounds_fitting_max_zoom, do: 17 | ||
# keep in sync with map.js | ||
def min_zoom, do: 9 | ||
|
||
@max_zoom 19 | ||
def max_zoom, do: @max_zoom | ||
|
||
@bounds_fitting_max_zoom 17 | ||
def bounds_fitting_max_zoom, do: @bounds_fitting_max_zoom | ||
|
||
if @bounds_fitting_max_zoom > @max_zoom, do: raise("invalid config") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters