- Fix left-shift numerical problem in static frontend projection via @saranrapjs [#171]
- switch to tsup for generating ESM, CJS and IIFE modules [#158, #161, #162].
- should fix import issues related to typescript.
- IIFE script name changed from
protomaps-leaflet.min.js
toprotomaps-leaflet.js
- generate ESM and CJS builds unbundled. iife is still unbundled.
- remove use of default exports: theme.ts exports
theme
- bump internal dependencies.
- Fix pmtiles URL detection on relative paths [#152]
- Detect pmtiles URLs by using URL parsing, which handles query parameters [#147]
- add
queryTileFeaturesDebug
back in for basic interactions (You should use MapLibre if you want interactivity)
- Unexport
PMTiles
because you shouldn't be depending on the one bundled in this library. - Bump
pmtiles
dependency to v3.x - package.json defaults to ES6.
- remove CubicBezier function as no longer used.
Major version 2.0 aggressively reduces the scope of this rendering library.
This library re-focuses on being a Leaflet plugin for vector tile basemaps, i.e. "Mapnik in the browser"
-
All user interaction features are removed. Every mapping application with clickable features should use MapLibre GL JS.
-
MapLibre JSON style compatibility is removed. The surface area of the JSON style is too large to maintain for real-world use cases, and styles written for MapLibre perform poorly with this library.
-
Programmatic shading and extra basemap styles are removed. This library's default style aligns with the 5 MapLibre styles developed in protomaps/basemaps.
-
levelDiff
is no longer configurable and defaults to 1 to match MapLibre GL. -
consistent camelCase naming e.g.
paint_rules
->paintRules
-
You must pass one of the default basemap themes
light, dark, white, black, grayscale
. removedark
andshade
options. -
Remove WebKit vertex count workaround.
-
remove
PolygonLabelSymbolizer
as it is not accurate for tiled rendering. -
maxDataZoom
defaults to 15. -
Use Protomaps basemap tileset v3 instead of v2.
-
remove
setDefaultStyle
method. -
remove multi-language
language1
,language2
: frontends take a singlelanguage
parameter.
- Continue internal refactors in preparation of 2.0.0 major revision.
- Apply linting rules; fix scoping and equality problems caught by linter.
- library renamed from
protomaps
toprotomaps-leaflet
, including npm package.
- bump
pmtiles
to 2.6.1.
- fix type of multiple
Source
s passed into leaflet layer or static map.
- support pmtiles v3.
- missing tiles in PMTiles archive do not show a browser error
- Fix stroking of circle symbolizer
- Fix static map
drawCanvasBounds
anddrawContextBounds
coordinate order
- Fix labeling-across-tiles bug introduced in 1.19.0
- Support for vector PMTiles with compression
- Multiple vector tile sources in a single layer
- Fix missing last stroke of
PolygonSymbolizer
- make css-font-loading-module a dependency for types to be findable
- Sprites module formerly under
protosprites
package merged into this project
- Set canvas size to 0,0 before garbage collection, workaround for Safari
- Type improvements for Symbolizers, thanks nf-s
- add additional TextTransforms
- LineLabelSymbolizer features, step interpolation features, label deduplication
- Label repetition for lines
- Limit label repetition when overzooming
PolygonSymbolizer
hasstroke
andwidth
for efficient outlines.maxLineChars
line-breaking can be a function.
Static
takes same basic options as leaflet frontend.
backgroundColor
option for leaflet or static map.
- Center text justification only in the case of
CenterdSymbolizer
TextSymbolizer
label_props
can be a functionLineSymbolizer
lineJoin
andlineCap
attributes
- add
Padding
generic label symbolizer
TextSymbolizer
attributes:lineHeight
inem
,letterSpacing
inpx
- add
linear
andstep
shortcut functions for zoom-based styling
- add
removeInspector
levelDiff
option to set ratio of display tiles to data tiles.
- Feature picking more accurate; uses distance-to-line and point-in-polygon.
xray
option to show all layers.
addInspector
to click on features and show an information popup.
- Label symbolizers for point and polygon features take the same set of attributes for text display.
- Add maxLineChars to define line breaking by maximum code units
PickedFeature in queryFeatures returns object with LayerName and feature.
- Most color and numerical Symbolizer attributes can now be treated as evaluated properties, with parameters (zoom:number,feature:Feature)
Rule
filters parameters changed from (properties:any) to (zoom:number,feature:Feature) to enable filtering on zoom level and geom_type.Feature.properties
renamed toFeature.props
for brevity- Internal
PaintSymbolizer.draw
signature now takes zoom as third parameter. properties
for defining fallbacks for text in label Symbolizers renamed tolabel_props
e.g. ["name:en","name"]