- 5a45f61: chore: updated all dependencies of mapbox-gl-export and maplibre-gl-export (particularly for eslint v9)
- b7a4bff: Fix an error: Style is not done loading
- 26a1d32: fix: It has a breaking change on attribution options.
options.attributionStyle
is changed tooptions.attributionOptions.style
. addvisibility
andposition
option intooptions.attributionOptions
. Due to technical issue, onlytop-right
orbottom-right
position are supported currently.
-
a66f15b: feat: export north icon on the map. North icon image, size, visibility and position can be customized through
northIconOptions
. The below is default settings for north icon.{ "image": `<svg width="800px" height="800px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--gis" preserveAspectRatio="xMidYMid meet"><path d="M47.655 1.634l-35 95c-.828 2.24 1.659 4.255 3.68 2.98l33.667-21.228l33.666 21.228c2.02 1.271 4.503-.74 3.678-2.98l-35-95C51.907.514 51.163.006 50 .008c-1.163.001-1.99.65-2.345 1.626zm-.155 14.88v57.54L19.89 91.461z" fill="none" stroke="white" stroke-width="1.5"/><path d="M47.655 1.634l-35 95c-.828 2.24 1.659 4.255 3.68 2.98l33.667-21.228l33.666 21.228c2.02 1.271 4.503-.74 3.678-2.98l-35-95C51.907.514 51.163.006 50 .008c-1.163.001-1.99.65-2.345 1.626zm-.155 14.88v57.54L19.89 91.461z" fill="#000000" fill-rule="evenodd"></path></svg>`, "imageName": "gl-export-north-icon", "imageSizeFraction": 0.05, "visibility": "visible", "position": "top-right" }
- 6dd9820: fix: add check for actual image data before calling addImage by @jmbarbier
- bf0467a: feat: add Catalan language contributed by @lstiz
-
406978e: feat: add attribution to the bottom-right of an exported image.
attributionStyle
property is added into options. The default attribution style is{ attributionStyle: { textSize: 16, textHaloColor: '#FFFFFF', textHaloWidth: 0.8, textColor: '#000000', fallbackTextFont: ['Open Sans Regular'] } }
This plugin will try to get attribution from HTMLElement by class name of 'maplibregl-ctrl-attrib-inner' or 'mapboxgl-ctrl-attrib-inner' first. If elements are not available, it will try to make attribution text from 'attribution' property of map style source.
If
glyphs
property is not set to map style, attribution will not be added since the plugin will add attribution as a symbol layer of maplibre/mapbox.In terms of text-font, the plugin will use the same font of the first layer which has text-font property in its layer style. If a text-font is not available from style object, fallbackTextFont will be used instead.
- 85470db: feat: added Portuguese language which the translation was contributed by @leoneljdias via #133
- 1a9b3d8: fix: use local language name for Translation object
- 64d39b0: refactor: export AvailableLanguages as an array from maplibre-gl-export
- a86c079: fix: add LanguageCode in Translation interface
-
7639be0: feat: export markers as circle layer if they are added to map object.
markerCirclePaint
option is added to allow changing default circle style for marker. The default marker style is:{ "circle-radius": 8, "circle-color": "red", "circle-stroke-width": 1, "circle-stroke-color": "black" }
- eba7503: refactor: Extends MaplibreExportControl to MapboxExportContorl to use the same logic and UI. Fixed type error for languages
- 93722dd: refactor: import interfaces from maplibre-gl-export
- 7d86d84: - feat: add languageName prop in Translation interface
- fix: remove PrintableArea when the control is removed from map instance.
- f7b81d9: refactor: Use Translations, PrintableAreaManager and CrosshairManager from maplibre-gl-export at mapbox-gl-export
-
a03a84b: This release has breaking changes.
- merged mapbox-gl-export repository to
maplibre-gl-export
. - added Spanish language and Japanese language from
maplibre-gl-export
- added
Filename
option frommaplibre-gl-export
to allow to change default file name frommap
. - added
AllowedSizes
option frommaplibre-gl-export
to allow to set available file sizes. - the URL of CDN script and css were changed. Use the below URLs for CDN.
<link href="https://www.unpkg.com/@watergis/mapbox-gl-export@latest/dist/mapbox-gl-export.css" rel="stylesheet" /> <script src="https://www.unpkg.com/@watergis/mapbox-gl-export@latest/dist/mapbox-gl-export.umd.js"></script>
- merged mapbox-gl-export repository to