Skip to content

Commit

Permalink
Needed a bit of trickery to find a mosaic method that only prints a h…
Browse files Browse the repository at this point in the history
…elping table.
  • Loading branch information
joa-quim committed Sep 28, 2024
1 parent e5a3698 commit af12730
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/imgtiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ viz(I, coast=true)
"""
function mosaic(; pt_radius=6378137.0, provider="", zoom::Int=0, cache::String="",
mapwidth=15, dpi=96, date::String="", verbose::Int=0, kw...)
isempty(kw) && return mosaic(zoom) # Call the method that only prints the zoom levels table.
d = KW(kw)
((opt_R = parse_R(d, "")[1]) == "") && error("To use the 'mosaic' function without the 'lon & lat' arguments you need to specify the 'region' option.")
ll = opt_R2num(opt_R)
Expand Down Expand Up @@ -445,7 +446,7 @@ end

# ---------------------------------------------------------------------------------------------------
"""
mosaic(; zoom::Int=0)
mosaic([zoom::Int=??])
Print a table with the zoom level characteristics in terms of tile sizes, resolutions, typical use.
Expand All @@ -462,7 +463,7 @@ julia> mosaic(zoom=10)
└───────┴────────────────┴────────────┴────────────────┴────────────────────┘
```
"""
function mosaic(; zoom::Int=0)
function mosaic(zoom)
(zoom < 1 || zoom > 22) && (zoom = 0)
hdr = (["Level", "Tile width", "m / pixel", "~Scale", "Examples of"], ["", "° of longitude", "on Equator", "", "areas to represent"])
data = Any[
Expand Down

0 comments on commit af12730

Please sign in to comment.