A map as a compact string, e.g. in the address of a shared map: writing and reading it, how accurate its positions are, and what makes it long.
The map as a whole: its type, what a shared map shows of it when it opens, its positions and areas.
How an element looks: the types of its styles, the values that a field can have, and the defaults, which a style leaves out.
Reads and writes the maps of the VersaTiles map editor: markers, lines, polygons and circles with their styles and popups, and the properties of a map like its background map and its legend.
A map
A map is a MapState: plain data, without classes.
Only
elementsis required. Each part has its type: StateElement, StateFrame, StateMetadata.Examples
A link of a map, and the map of a link:
A shorter link: with a visible area, and positions only as fine as that area needs:
A
.mapjsonfile, which may come from anywhere:A map for other tools:
What to use
encodeState(state, { resolution }), resolutionForArea.mapjsonfileGood to know
[longitude, latitude]in degrees with 5 decimal places, about 1 m..mapjsonfiles of an earlier one (from 1.0.1 on), as the same map; an older version refuses a link of a newer format with a LinkVersionError, a file with a MapJSONVersionError. The README has the promise and its limits.The file format is explained field by field in MAPJSON.md, the formats of links, GeoJSON and KML in the README. Below, everything the package exports, by what it is for.