- Added
ZoomPanOptions
andFitBoundsOptions
toMap
component (PR #593 by scailbc). - Updated Flow types support for Flow v0.100.
- [website] Updated Docusaurus.
- Updated Leaflet dependency to v1.5.
- Updated React dependency to v16.8.
- Added
useLeaflet
hook (PR #571 by vadzim). - [website] Added
react-leaflet-google-layer
plugin (PR #576 by aviklai). - [internal] Replaced deprecated
webpack-serve
library bywebpack-dev-server
to run the examples.
- Fixed passing options in the
LayerGroup
component (PR #570 by failociraptor). - [website] Added
react-leaflet-textpath
plugin (PR #556 by clementallen). - [website] Minor text fixes to components docs (PR #558 by arthurRuf).
- [website] Updated compatibility info for 5 plugins and added 2 new plugins (PR #560 and PR #564 by mhasbie).
- [website] Updated
react-leaflet-control
compatibility status (PR #567 by robinmetral). - [website] Updated third party compatibility docs for 2 plugins (PR #568 by renanbandeira).
- Updated Leaflet dependency to v1.4.
- Fixed duplicate element creation in
Path
(PR #549 by vadzim). - Changed
whenReady
logic inMap
to get triggered after React reference is bound. - [internal] Replaced
lodash
withfast-deep-equal
and vanilla JS implementations (PR #554 by jtfell). - [website] Added
react-leaflet-semicircle
plugin (PR #552 by clementallen).
Fixed event handlers changes in Map
component.
- [website] Added
react-leaflet-figure-editor
plugin (PR #542 by argonavt11). - [website] Added
react-leaflet-box-zoom
plugin (PR #543 by ChrisLowe-Takor). - Added example for custom icons usage (PR #545 by rlahoda).
- Updated Flow types support for Flow v0.89.
- Fixed support for multiple classes in the
Pane
component. - [internal] Replaced some lodash functions (PR #533 by radeno).
- [website] Added
react-leaflet-geojson-patterns
plugin (PR #536 by lkazberova).
- Fixed regression when updating the
className
prop of theMap
component. - [internal] Use ESM babel runtime (PR #527 by eanajavi).
- [website] Indicate
react-leaflet-locate-control
as not compatible with v2 (PR #528 by eanajavi).
- Added support for dynamic
attribution
prop in layers. - Added
MapEvented
abstract class used byMapComponent
andMap
. - [website] Added
react-leaflet-freedraw
plugin (PR #508 by elangobharathi). - [website] Updated "Lifecycle process" overview (PR #509 by clintharris).
- [website] Added
react-leaflet-distortable-imageoverlay
plugin (PR #511 by ChrisLowe-Takor). - [website] Fixed typo in docs (PR #513 by Roconda).
- [website] Added
react-leaflet-sidetabs
plugin (PR #517 by eferhatg). - [website] Added
leaflet-react-track-player
plugin (PR #523 by argonavt11). - [website] Added
react-leaflet-wmts
plugin (PR #524 by mpivaa). - [internal] Updated Babel dependency to v7.
- Fixed setting
maxZoom
andminZoom
options toGridLayer
usingMap
options. - [website] Added
react-leaflet-search
andreact-leaflet-zoom-indicator
plugins (PR #501 by tumerorkun).
Changes from v1.9.1:
- [BREAKING] Updated React dependency to v16.3.
- [BREAKING] Replaced React context usage with new APIs introduced in React v16.3.
- [BREAKING] Removed PropTypes.
- [BREAKING] Dropped support for IE < 11.
- React Portals are now used to render the
DivOverlay
and thereforePopup
andTooltip
components, enabling context propagation (PR #475 by hannesj). - Replaced wrapping
div
elements withFragment
. - Added
collapsed
as dynamic property toLayersControl
. - Added
ControlledLayer
abstract class export. - [website] Added
react-leaflet-nmscale
plugin (PR #479 by anajavi). - [website] Added 3 plugins (PR #482 by fullhdpixel).
- [website] Updated docs for abstract classes and usage for custom components.
Added collapsed
as dynamic property to LayersControl
.
- Added
ControlledLayer
abstract class export. - [website] Updated docs for abstract classes and usage for custom components.
- [website] Added
react-leaflet-nmscale
plugin (PR #479 by anajavi). - [website] Added 3 plugins (PR #482 by fullhdpixel).
- [BREAKING] Updated React dependency to v16.3.
- [BREAKING] Replaced React context usage with new APIs introduced in React v16.3.
- [BREAKING] Removed PropTypes.
- [BREAKING] Dropped support for IE < 11.
- React Portals are now used to render the
DivOverlay
and thereforePopup
andTooltip
components, enabling context propagation (PR #475 by hannesj). - Replaced wrapping
div
elements withFragment
.
- Added check for open popup to rendering logic (PR #464 by olabalboa).
- [website] Added plugins (PR #463 by mhasbie).
- Fixed event listeners removal in
Map
(PR #459 by andersonveiga). - Added support for dynamic handlers in
Map
(PR #452 by jonathanchrisp). - Added
DivOverlay
component as base class forPopup
andTooltip
, now supporting dynamicclassName
prop. - [website] Updated Docusaurus, with added on-page navigation sidebar.
- Fixed
Map
unmounting whenpreferCanvas
is set. - Added
es
folder to npm package (PR #449 by jonathanchrisp). - [website] Fixed link in examples page.
- [internal] Updated examples to webpack 4.
- Fixed
Tooltip
component unmounting. - Updated Flow support for v0.66 (PR #447 by slek22).
- [website] Fixed typo (PR #440 by BartWaardenburg).
- [website] Added plugins (PR #446 by mhasbie).
React-Leaflet now has a website! Check out react-leaflet.js.org to browse the documentation.
If you wish to help out improving the website, this issue is a good starting point!
- Updated documentation and dependency to Leaflet v1.3.
- Added
HTMLImageElement
support toImageOverlay
(new in Leaflet v1.3). - [website] Setup using Docusaurus.
- [website] Fixed links to examples (PR #430 by subelsky).
Update Popup
and Tooltip
layout after render
(PR #423 by jeffchan).
More permissive support for the className
prop of Map
.
- Fixed supporting
Popup
children inCircleMarker
. - Fixed updating multiple classes in the
className
prop ofMap
.
Fixed unmounting Tooltip
with interactive
prop.
Updated Flow types for Flow v0.59 (PR #412 by rsolomon).
Fixed Tooltip
teardown logic.
- Updated docs to use
https
for URLs (PR #403 by sehaas). - Fixed initial props in
WMSTileLayer
(PR #405 by markhepburn). - Added tests for viewport and teardown logic in the
Map
component (PR #406 by uxtx).
- Added UMD build to CDNJS (PR #11863 in cdnjs/cdnjs and #390 by extend1994).
- Fixed setting the default pane for
Popup
andTooltip
(PR #394 by RichardWithnell).
- [internal] Added support for building the library using node 6 (PR #376 by tusbar).
- Added support for React v16 as peer dependency.
- Fixed
Path
options. - Fixed
WMSTileLayer
options.
- [doc] Added
react-leaflet-sidebarv2
to the plugins documentation (PR #369 by markhepburn). - Fixed Flow types in
Map
andPopup
.
Fixed positions
proptype in Polyline
.
Fixed support for Flow types.
Added support for Flow types in CommonJS and ESM builds as Flow comments.
- Fixed
GridLayer
inheritingmaxZoom
andminZoom
fromMap
. - Fixed regression introduced in v1.6.0 with
ScaleControl
.
- [internal] Updated build process (PR #359 by tusbar) - see the UPGRADING guide for more information if you're relying on internals.
- [internal] Fixed hot module reloading in examples (PR #360 by tusbar).
- Updated Flow types to support Flow v0.53.
Updated documentation and dependency to Leaflet v1.2.
Fixed allowing a zoom
value of 0
in Map
.
This release now requires Leaflet v1.1+ as a peer dependency in order to add support for the new features introduced by Leaflet in this release:
- Added support for dynamic
zIndex
property toImageOverlay
. - Added
VideoOverlay
component. - Moved the
prop-types
dependency topeerDependencies
.
See the relevant section of the upgrading guide for more information.
Fixed Popup auto-panning.
- Added
viewport
property toMap
, as an alternative and complementary way to manipulate the map's viewport. - Added
onViewportChange
andonViewportChanged
callbacks toMap
as a simplified way to track the map's viewport changes. - Added
onClose
andonOpen
callbacks toPopup
. - Added
onClose
andonOpen
callbacks toTooltip
.
Fixed updating the Map's zoom
when not previously set.
Removed leftover console.log()
in Polygon
.
- Added support for dynamic
bounds
property inImageOverlay
, PR #326 by Gjum. - Added
whenReady
property toMap
, running the provided function according to Leaflet's documentation.
- Fixed DOM leak when unmounting an unclosed popup, PR #326 by DirtyHairy.
- [doc] Updated Leaflet documentation links, PR #324 by Chris-Petty.
- [doc] Fixed "quick start" link, PR #321 by mojo5000.
- [doc] Added react-leaflet-ant-path to the plugins documentation, PR #318 by rubenspgcavalcante.
- Added support for React v15.5, fixes PropTypes warning.
- [internal] Use Prettier code formatting.
Filter falsy values as event handlers, PR #308 by awinograd.
Fixed updating some properties in TileLayer
and WMSTileLayer
.
Fixed regressions in GridLayer
and Babel configuration.
Make GridLayer
inherit maxZoom
and minZoom
properties from Map
.
- The UMD build is now created using Webpack 2.
- Fixed supporting multiple children in
Marker
. - [internal] Updated Webpack to v2.
- [internal] Small refactoring of the
Map
component. - [doc] Various improvements, including PRs #280 by h4, #282 by cwalv and #283 by YUzhva.
- Added support for
Popup
andTooltip
children toImageOverlay
PR #270 by rjdestigter. - Added
createLeafletElement()
andupdateLeafletElement()
methods to simplify the abstraction between React's lifecycle hooks and Leaflet's APIs. See the relevant section of the upgrading guide for more information.
Fixed updating the className
property of Map
.
Fixed binding events in FeatureGroup
.
- Fixed updating
opacity
andzIndex
inWMSTileLayer
(PR #259 by YannickBochatay). - [doc] Added link to plugins documentation in README (PR #258 by jakehm).
Changes from v0.12.3:
- [BREAKING] Updated Leaflet dependency requirement to v1.0.0.
- [BREAKING] Renamed
GeoJson
toGeoJSON
to match Leaflet's change. - [BREAKING] Removed
MultiPolygon
andMultiPolyline
, now supported byPolygon
andPolyline
respectively. - [BREAKING] Removed
CanvasTileLayer
, replaced byGridLayer
. See Leaflet's documentation. - [BREAKING] Removed
getLeafletElement()
method inMapComponent
andMapControl
, deprecated since v0.12.0. - [BREAKING] Removed
setIconDefaultImagePath()
helper, setLeaflet.Icon.Default.imagePath
directly using Leaflet if you need. Leaflet.Icon.Default.imagePath
is no longer set by default, as per Leaflet v1.0.0 it should be auto-detected.- The
Map
component no longer creates an unique ID for its container if none is provided. - Added
useFlyTo: bool
property toMap
to useflyTo
instead ofsetView
andflyToBounds
instead offitBounds
when changing the map's view or bounds (PR #148 by jgimbel). - Added
GridLayer
. - Added
Pane
component introduced in Leaflet v1. (PR #227 by rjdestigter). - Added
Tooltip
component introduced in Leaflet v1. See Leaflet's documentation for usage. - Added support for IE9 and IE10 (PR #235 by dettier).
- Updated
WMSTileLayer
to support dynamicurl
and parameters. - [internal] Fixed Flow errors (PR #251 by joeyrosztoczy).
- [internal] Updated
MapLayer
to only create divs when necessary. - [internal] Removed
BaseTileLayer
, replaced byGridLayer
. - [internal] Removed
bower.json
file.
Updated WMSTileLayer
to support dynamic url
property.
- Added
Pane
component introduced in Leaflet v1. (PR #227 by rjdestigter). - Added support for IE9 and IE10 (PR #235 by dettier).
- Updated
WMSTileLayer
to support dynamic parameters.
- [BREAKING] Removed
setIconDefaultImagePath()
helper, setLeaflet.Icon.Default.imagePath
directly using Leaflet if you need. - Updated Leaflet dependency requirement to v1.0.0.
Leaflet.Icon.Default.imagePath
is no longer set by default, as per Leaflet v1.0.0 it should be auto-detected.
Fixed Tooltip
removal handling.
- Added
Tooltip
component introduced in Leaflet v1.0.0-rc.2. See Leaflet's documentation for usage. - Updated Leaflet dependency to v1.0.0-rc.3.
- Reverted basing components on
React.PureComponent
, they are now based onReact.Component
.
- [BREAKING] Renamed
GeoJson
toGeoJSON
to match Leaflet's change. - [BREAKING] Removed
MultiPolygon
andMultiPolyline
, now supported byPolygon
andPolyline
respectively. - [BREAKING] Removed
CanvasTileLayer
, replaced byGridLayer
. See Leaflet's documentation. - [BREAKING] Removed
getLeafletElement()
method inMapComponent
andMapControl
, deprecated since v0.12.0. - Removed
BaseTileLayer
, replaced byGridLayer
. - Removed
bower.json
file. - The
Map
component no longer creates an unique ID for its container if none is provided. - All components now extend from
React.PureComponent
instead ofReact.Component
, as such React v15.3.0+ is now required. - Added
GridLayer
. - Added
useFlyTo: bool
property toMap
to useflyTo
instead ofsetView
andflyToBounds
instead offitBounds
when changing the map's view or bounds (PR #148 by jgimbel).
Fixed events bindind in UMD build.
- Updated propTypes to allow polygons with holes in
MultiPolygon
(PR #218 by ernoaapa). - Fixed badly named
ScaleControl
class.
- Fixed unmounting
LayersControl
when theMap
is unmounting as well. - Added a plugins section to the documentation.
- [BREAKING] Moved Leaflet instances injection from props to context. All components provided by this lib should continue to work as expected, but custom components need to be updated. Read the UPGRADING file for more information.
- Deprecated
getLeafletElement()
method, simply use theleafletElement
property instead. - Documentation moved to the docs folder and has been split into different files for better readability.
Fixed removing layers from LayersControl
.
- Fixed allowing to set and update the
style
prop as a function inGeoJson
. - [internal] Added lodash-webpack-plugin to reduce the size of the UMD build.
- Fixed updating
boundsOptions
in theMap
without updatingbounds
. - Fixed setting
opacity
andzIndex
properties to0
in tile layers.
Fixed TileLayer
properties update.
Made the draggable
property in Marker
dynamic (PR #148 by riolowry).
Fixed layer removal in LayersControl
.
Fixed map
property injection in LayersControl
(PR #142 by Dahlgren).
- [BREAKING] Added
layerContainer
property as a consistent replacement formap
orlayerGroup
(PR #132 by boromisp). This is only breaking if you are creating custom components, as you will need to make sure to also inject thelayerContainer
property to children layers as you need to do withmap
. - Changed
LayersControl
to be based on components:- Added
LayersControl.BaseLayer
container component to add a base layer to aLayersControl
. - Added
LayersControl.Overlay
container component to add an overlay to aLayersControl
. baseLayers
andoverlays
properties forLayersControl
are still supported but deprecated. Using either of them will make theLayersControl
behave the same way it does in versions < 0.11.
- Added
- Deprecated
onLeaflet...
properties for events, simply useon...
, exonClick
instead ofonLeafletClick
. - Added warnings for deprecated features, the same way React does. Make sure to address these warnings to ease the transition to future releases.
- Added React v15.0.0 support as peer dependency.
- [internal] Fixed
no-unused-vars
linting (PR #131 by boromisp).
- Added
animate
optional property toMap
(PR #126 by mariusandra). - Added React v15.0.0-rc.1 support as peer dependency.
- Added the popup container as source layer to
Popup
creation, fixes #113 (PR #112 by amarant). - [internal] Updated Lodash to v4.
- Added
AttributionControl
,LayersControl
andScaleControl
(PR #100 by jonboiser). - Added example to render a list of custom Markers (PR #104 by varya).
- [internal] Updated Babel to v6.
- Removed
PopupContainer
component, extended internally by other components. FeatureGroup
now expects its layers to be passed as children, likeLayerGroup
.- Added
renderChildrenWithProps()
toMapLayer
, used internally by the library. - Added
MapControl
as base component for controls. - Added
ZoomControl
.
Fix PropTypes
export.
Changes from v0.7.0:
- Updated React to v0.14.0.
- Added ReactDOM v0.14.0 to peer dependencies.
Popup
now renders its contents usingReactDOM.render()
and therefore supports dynamic children.Map
now supports dynamicbounds
andmaxBounds
properties (#72).- Added
LayerGroup
component (#58).
Check if Popup
content node exists before trying to unmount.
- Updated React to v0.14.0-rc1.
- Added ReactDOM v0.14.0-rc1 to peer dependencies.
Popup
now renders its contents usingReactDOM.render()
and therefore supports dynamic children.
- Updated Leaflet to v0.7.5.
- Added
Path
base component for vector layers, handling dynamic Path options properties. - Added support for holes in
Polygon
. - [internal] Updated Jest to v0.5.
- [internal] Updated Gulpfile to use Babel.
- [internal] Added ESLint validation.
Fix ignored events in MapComponent
(#41).
Fix PopupContainer
export.
- Added
style
property on theMap
component. - Replaced the
<noscript>
element inPopupContainer
by a<div>
to be properly updated.
Set icon
, zIndexOffset
and opacity
properties as dynamic on Marker
.
- Removed
getLeafletElement()
deprecation. - Updated Babel to v5.
Released v0.4.
React v0.13.0.
- Updated React dependency to v0.13.0-rc2:
- Components are defined as ES6 classes.
- Mixins are replaced by the base components
MapComponent
,MapLayer
,BaseTileLayer
andPopupContainer
. All components extend from these. - The new
React.cloneElement()
API is used instead of the deprecatedReact.addons.cloneWithProps()
to pass themap
property to the components. - The
map
property has been removed from the componentspropTypes
definition as it is dynamically injected to its children by theMap
component, React would now warn it is not set. It is still required by components to have access to the Leaflet object.
- Events can now be set as
on{Event}
rather thanonLeaflet{Event}
, exonClick
instead ofonLeafletClick
, as all events are proxied to Leaflet. - Deprecated
getLeafletElement()
method, simply use theleafletElement
property instead to access the Leaflet object created for a component.