Release date: Feb 4, 2022
v7 is a complete rewrite of the library. It addresses many long-standing issues in v5 and v6 limited by legacy architecture decisions. The most notable results of this redesign are:
flyTo
, fitBounds
etc.) can now be called directly without breaking the React binding.Visit the upgrade guide if you are trying to upgrade from v5 and v6.
Release date: Jan 27, 2020
GeolocateControl
added supports for showAccuracyCircle
style
propRelease date: Dec 16, 2020
The 6.0 release upgrades its Mapbox GL JS dependency to v2.0. There are important changes to mapbox-gl's license and pricing model in this milestone. If you are NOT using a Mapbox account (e.g. self-hosting map tiles), do NOT upgrade to this version, and consider your options discussed in this document.
See upgrade guide for a complete list of breaking changes.
Release date: Jan 6, 2020
ScaleControl
label
proplabel
, onGeolocate
, auto
propsWebMercatorViewport
is re-exported from the viewport-mercator-project
library for ease of use. It's recommended to import it from react-map-gl
instead to avoid future dependency change.Release date: Oct 30, 2019
Layer
and Source
have been added to provide better React parity with the Mapbox GL JS
API.transitionDuration
can be set to 'auto'
when using FlyToInterpolator
.Release date: May 31, 2019
The only change between the 5.0 release and the latest 4.1 release is Mapbox GL JS v1.0. By using this version, you opt into Mapbox's new pricing model, which bills per map load instead of map views. 5.0.x and 4.1.x will continue to update in parallel with otherwise identical features until November 2019 when Mapbox moves all users of 0.xx to a new pricing scheme. For more details, see mapbox's changelog and blog post.
Alongside Mapbox GL JS's new milestone, we have relaxed the mapbox-gl
dependency from locking minor release (~0.53.0
) to major release (^1.0.0
). This will allow developers to upgrade faster without waiting for a new release from react-map-gl.
Release date: Mar 14, 2019
FullscreenControl
, GeolocateControl
have been added to provide better React parity with the Mapbox GL JS
API.InteractiveMap
supports more callbacks:onNativeClick
Release date: Nov 5, 2018
InteractiveMap
and StaticMap
now support CSS strings supplied to map width
and height
props. New onResize
callback is fired when the map resizes.Marker
component now supports a new prop draggable
, along with callbacks onDragStart
, onDrag
, and onDragEnd
.Popup
component now supports a new prop sortByDepth
to enable proper occlusion when multiple popups are used in a tilted map.onViewportChange
is now called with richer descriptors of the user interaction, including isPanning
, isZooming
and isRotating
.interactive
property on the layer styles. Use the interactiveLayerIds
prop to specify which layers are clickable.InteractiveMap
supports more callbacks:onDblClick
onMouseDown
onMouseMove
onMouseUp
onTouchStart
onTouchMove
onTouchEnd
onMouseEnter
onMouseLeave
onWheel
onMouseOut
See upgrade guide for breaking changes.
Release date: July, 2018
viewState
Property: Makes it possible to specify all map state properties (longitude
, latitude
, zoom
, bearing
and pitch
) as a single property.onViewStateChange
callback: An alternative callback that matches the new viewState
prop.Realease date: January, 2018
reuseMaps
is provided for applications that create and destroy maps, to help work around a mapbox-gl resource leak issue that can lead to a browser crash in certain situations.transformRequest
, reuseMaps
touchZoom
, touchRotate
transitionDuration
, transitionInterpolator
, transitionEasing
, transitionInterruption
, onTransitionStart
, onTransitionInterrupt
, onTransitionEnd
Release date: October 19, 2017
>=15.4.x
.Release date: July 27th, 2017
Mapbox GL JS
to 0.38.MapGL
component has been split into StaticMap
and InteractiveMap
(the default). Also, Popup
, Marker
, NavigationControl
have been added to provide better React parity with the Mapbox GL JS
API.width
height
zoom
longitude
and latitude
) are no longer required if you render SVGOverlay
, CanvasOverlay
or HTMLOverlay
as a child of the map. Perspective mode is now supported in all overlays.maxPitch
, minPitch
, dragPan
, doubleClickZoom
, touchZoomRotate
,
scrollZoom
are now provided to allow granular control of map interactivity.This is a wrapper on top of StaticMap
. It takes all the props of StaticMap
and additional ones such as onViewportChange
, scrollZoom
, dragRotate
, etc. to control interactivity on the map. See Source Code for more information.
This is the React wrapper around Mapbox GL JS
and takes in viewport properties such as width
, height
, latitude
, longitude
. Style diffing and updating logic also live here. See Source Code for more information.
ScatterplotOverlay
, DraggablePointsOverlay
, ChoroplethOverlay
), have been moved out of the library and are now only provided as examples.isHovering
, isDragging
, startDragLngLat
have been removed.
These were never meant to be useful publicly and have caused confusions in the past.fitBounds
has been moved to another repository and has been rewritten to provide a more logical interface.For more information, see the Upgrade Guide
.
Date: Jan 17, 2017
mapbox-gl
to v0.31.0maxZoom
prop and defaults to 20
onLoad
event handleronClick
prop handler (#140)bearing
and pitch
properties, per mapbox-gl api documentation. These props default to 0 which means that maps will still be rendered in flat/ortographic mode when they are not providedInitial public version