StaticMaps.TileError exception (staticmaps v0.1.0)

Copy Markdown View Source

One or more tiles a render needed could not be used.

:tiles pairs each failed tile key {z, x, y} with the reason:

  • the reason from a source's {:error, reason}
  • {:invalid_return, value} when fetch/2 returned something other than {:ok, binary} or {:error, reason}
  • {:truncated, format} for a PNG, JPEG or WebP cut short
  • {:undecodable, message} for bytes that are not an image
  • {:wrong_size, actual, expected} for an image whose size does not match the source's info/1

Summary

Types

t()

@type t() :: %StaticMaps.TileError{
  __exception__: term(),
  source: module(),
  tiles: [{StaticMaps.TileGrid.key(), term()}]
}