All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add proper error description for cases where meta data is not a JSON object
This release includes two breaking changes to align this implementation to the latest PMTiles specification (version 3.4).
Version 3.2 of the PMTiles specification clarified that the JSON metadata must be a JSON object.
This brings along two breaking changes:
PMTiles::meta_data
is now of typeserde_json::Map<String, JSONValue>
(wasOption<serde_json::Value>
before)- When encountering meta data that is not a JSON object while reading a PMTiles archive, an error is returned. This affects the following functions:
PMTiles::from_reader
/PMTiles::from_async_reader
PMTiles::from_reader_partially
/PMTiles::from_async_reader_partially
PMTiles::from_bytes
Version 3.4 of the PMTiles specification clarified that directory entries must have a length that is greater than 0
. This was implemented with the following breaking changes:
PMTiles::add_tile
now returns andResult
and will error if it is being called with empty data- If an entry with a length of
0
is encountered while reading an directory, an error is returned. This affects the following functions:PMTiles::from_reader
/PMTiles::from_async_reader
PMTiles::from_reader_partially
/PMTiles::from_async_reader_partially
PMTiles::from_bytes
PMTiles::from_bytes_partially
util::read_directories
/util::read_directories_async
Directory::from_reader
/Directory::from_async_reader
Directory::from_bytes
- Calling
Directory::to_writer
/Directory::to_async_writer
on aDirectory
including an entry with a length of0
will result in an error
- Writing async PMTiles archives is corrupt (#10)
- Added AVIF tile type (as per PMTiles specification version 3.1)
- Added recommended MIME type constant
MIME_TYPE
(as per PMTiles specification version 3.3)
- Implement
IntoIterator
forDirectory
-struct - Deprecate
Directory::iter
method in favor ofIntoIterator
trait implementation
- Add
from_bytes
associated function toPMTiles
-,Header
- andDirectory
-struct - Add
from_bytes_partially
associated function toPMTiles
-struct - Add
find_entry_for_tile_id
method toDirectory
-struct - Fix the MIME type for Mapbox Vector Tiles (previously
application/x-protobuf
, nowapplication/vnd.mapbox-vector-tile
)
0.2.2 - 2023-10-23
- Tweaks to documentation
0.2.1 - 2023-10-23
- Tweaks to documentation
clippy
&cargofmt
fixes
0.2.0 - 2023-05-08
- Added
filter_range
parameter toread_directories
&read_directories_async
(use..
to have same behavior as before)
- Async support via the
AsyncRead
andAsyncWrite
traits (must be enabled via theasnyc
feature flag):- Added
from_async_reader
&to_async_writer
methods toPMTiles
- Added
from_async_reader
&to_async_writer
methods toDirectory
- Added
from_async_reader
&to_async_writer
methods toHeader
- Added
get_tile_async
,get_tile_by_id_async
&new_async
methods toHeader
- Added
compress_async
&decompress_async
utility functions - Added
read_directories_async
&write_directories_async
utility functions
- Added
- Added
from_reader_partially
&from_async_reader_partially
methods toPMTiles
- Improved example of
util::read_directories
0.1.6 - 2023-01-18
- Added
serde
support for most public types (must be enabled via theserde
feature flag)
0.1.5 - 2023-01-15
- Added
from_reader
method toHeader
- Added
to_writer
method toHeader
0.1.4 - 2023-01-14
- Update
zstd
feature flags to allowwasm-unknown-unknown
as a build target
0.1.3 - 2023-01-14
- Remove
getrandom
dependency to allowwasm-unknown-unknown
as a build target
0.1.2 - 2023-01-13
- Fix broken link to utilities documentation in README
0.1.1 - 2023-01-12
- Improved wording of the documentation in several places
0.1.0 - 2023-01-12
Initial public release