MapGL API Release notes | 2GIS Documentation

MapGL API Release notes

There are two ways to choose MapGL version:

  1. (recommended) major version:
  2. fixed version:

Major version guarantees to have stable API (breaking changes will land into the next major version). It is updated regularly with new features, bug fixes and performance improvements.

Fixed version does not have any updates. That's why it has a short support period of 3 months after a new version is released. We guarantee that the version will be working during the support period. The only reason to choose fixed version is when you need Subresource Integrity (SRI). Because of short support period you have to update the version regularly.


SRI: sha512-x1k9eH56m3nXWqLToQCysWKGsWFmeSFDmeLK7ggzGApuqkUlrntp0J/r/TZWp4zSDGK3db4v5sUiIFxC9AXokw==

Release Date: 29.07.2021

  • Added a new class GeoJsonSource to show GeoJSON data on the map.


SRI: sha512-dRBf5t1rtyCqNsUYodb+XUIgnH1xQW3gQSMjsfCsAzxSH9CJ9Rq8zBJYloNb3qQwUPGG6/MxThFr7f9NuQMZUA==

Release Date: 1.07.2021

Support End Date: 29.10.2021

  • Fixed bug, when red lines appearing on map with empty or erroneous style.
  • Fixed incorrect drawing of traffic lines.


SRI: sha512-JJaXd91lTYiDaLszyuaGrny42Q4/W17sxCkD1bFtBc006/kD9TA7/LNR0RBdqOVlq4FNJj1YxBlQSlTRHuoBTw==

Release Date: 23.06.2021

Support End Date: 1.10.2021


SRI: sha512-AD8uQ7zAaFGEGedY7Vy4QRssgHYt5MFtSKgXU+zFMVhWLTJcnuf5vr9NC9f/tn1IWGMIxDDy4J6D8watGG++oQ==

Release Date: 21.05.2021

Support End Date: 23.09.2021


SRI: sha512-LWi8DeY4c0tvk+rbbARd0A8flKr94SdDDFePeajHs+TQ3TjMPOas1DzIbZSGPPV9jhlL975dyuPa4jYsIueOJw==

Release Date: 16.04.2021

Support End Date: 21.08.2021

  • Fixed bug with traffic styles in editor.


SRI: sha512-cHiB6wGU/siI484XDbbyjEDHozlJ4UMWp+y9wVzitOEYZNKcGP3Ls8qDX9g5EvbFCKsuE/UqqvW/0AYC5iggNQ==

Release Date: 09.04.2021

Support End Date: 16.07.2021

  • Internal changes and bug fixes that do not affect the operation of the map engine.


SRI: sha512-/lHI9159IBmRoSusDRNah0N2NJn6AeCLzSDcgMb+fhAF++bJhPvZnCBSpKHC1cCz7romGE8QPyuLian+26MLJA==

Release Date: 05.04.2021

Support End Date: 09.07.2021


SRI: sha512-LmbthcOoHKXfvtTTCy7T7EQ9wMC0VCRg7AAc1ujEANbRtYLgnfPwxqjaumaBlizP8SA7SIw5edOkt6HcKcTXcQ==

Release Date: 29.03.2021

Support End Date: 05.07.2021

  • getContainer method now returns HTML Element provided by user.


SRI: sha512-rgqt/HdUEC1ghi2PJkls6h5jHBUiOSs3bb37j9lXidisdkPVEDtBFgpT1497E+OYwnW405PRycBvy3OxegQWBg==

Release Date: 25.03.2021

Support End Date: 29.06.2021

  • Added the getContainer method.
  • Added more descriptions for types and interfaces in methods used to work with floors.


SRI: sha512-ctWfi+SDW0sKD/SSbGn/6ehXXaDRI1qIWUQiQVB/2OWZHOwVDPrJtvEyx2G08XVcdzCTxydN/39jA5v1V/r2uA==

Release Date: 22.03.2021

Support End Date: 25.06.2021

  • Internal changes and bug fixes that do not affect the operation of the map engine.
  • Fixed a bug with the map container selection on long tap on iOS.


SRI: sha512-LgOZcpluRJVHVTCrGyf9B20eKewonlHEm1f0CIFXMzIXee90DgvEX2zIP+/ptRvePcEA4nPLjCzL8XaDLtP6oQ==

Release Date: 12.03.2021

Support End Date: 22.06.2021

  • Internal changes that do not affect the operation of the map engine


SRI: sha512-9ItZH5uDeTXsRdXNvxSh93D6V3M0CTToZgTWSzXJhCe8YEicERFdR8DTYt1r2QBTXdaotGTeIMVmHw6wKpThyQ==

Release Date: 3.03.2021

Support End Date: 12.06.2021

  • You can pass InterpolateExpression to width, width2 and width3 params in PolylineOptions
  • Fixed a bug with road render in some rare cases.


SRI: sha512-mS8YwCcOwHViXRgs1fhqcv9w0GnenNT7cHUDEkd55R/FywBh+tqlc+1OdecszX5hCZ8i9kwxCVCFqgL7JA0TKg==

Release Date: 1.03.2021

Support End Date: 3.06.2021


SRI: sha512-I2Gr48z/C5LtZ4B4/XcgSJREk1QYGGVuHpXrPAp1Qus2dhdgIrwm8148omEE/cDUppUIMYIQqR2s7KnntVnNEw==

Release Date: 24.02.2021

Support End Date: 1.06.2021


SRI: sha512-e2LUonKGcxMuQ+eVDrBflqsMJKeIMXkS9iecrwTbPqtP0iBB9PvoJ7MPvs+YOWOpd4zLMW4HMhwQwovR6hx5og==

Release Date: 02.02.2021

Support End Date: 24.05.2021

  • Fixed a bug in the fitBounds method, when rotation has negative value or rotation has not be considered.


SRI: sha512-aCuhmji0murRQCFMNpbyxI9atKUj1LcamTjMS1oMi+d+gWewmuytCTsdKfDhCXnPXL/e9s3uKJbhYmDaUqcEIg==

Release Date: 29.01.2021

Support End Date: 02.05.2021

  • Added a new method fitBounds to pan and zoom the map to contain its visible area within the specified geographical bounds.
  • Added a new method isSupported which checks whether the current browser supports MapGL.
  • Added a new method notSupportedReason which checks whether the current browser supports MapGL and which returns the reason in a string.


SRI: sha512-Qd8FJ4dTV0r7QlO5EZ/bH3eJHryP5F2JlGgSLpm16hKxd3v+YAx2fALVs2qdO8hKWD1FR6vpvuuqaioWbA08mQ==

Release Date: 24.12.2020

Support End Date: 29.04.2021

  • Fixed a bug where the inertia of the map doesn't work if a styleZoom was set

Release Date: 22.12.2020

Support End Date: 24.03.2021

  • Fixed the map center changing behavior by setting different zoom types. If a styleZoom option was set, the map style zoom doesn't change while map dragging. Conversely, if a zoom option was set — the map zoom doesn't change, but the style zoom does.

Release Date: 18.12.2020

Support End Date: 22.03.2021

  • Added a new map option styleZoom. This option allows you to set the same zoom that is used in the style settings. The styleZoom and zoom options set the same map scale but in different projections.
  • Added a new method setLanguage to change the desired map language. The map will try to set the language if it possible.
  • Added a new method getLanguage, which returns the desired map language.
  • Fixed a bug with touch events that leads to the exception with undefined.

Release Date: 10.12.2020

Support End Date: 18.03.2021

  • Added a new method setStyleById to change the map style by its ID. 🎉
  • Added a new map option defaultBackgroundColor. This option allows you to set the default background color while style is loading.
  • Added a new map option style that takes a style ID. The map will be initialized with the specified style.

Release Date: 1.12.2020

Support End Date: 10.03.2021

  • Internal changes that do not affect the operation of the map engine

Release Date: 09.11.2020

Support End Date: 1.03.2021

  • Internal changes that do not affect the operation of the map engine

Release Date: 22.10.2020

Support End Date: 09.02.2021

  • Added a new method setStyleZoom. It sets the map style zoom.
  • Added a new map option maxBounds. It restricts map to specified bounding box.

Release Date: 07.10.2020

Support End Date: 22.01.2021

  • Added stable fix for missing rerender (IOS 14 and other)

Release Date: 22.09.2020

Support End Date: 07.01.2021

  • Added patch for missing rerender on IOS 14

Release Date: 18.09.2020

Support End Date: 22.12.2020

Release Date: 26.08.2020

Support End Date: 18.12.2020

  • Added the new relativeAnchor and offset options to the LabelOptions. Use these options for the Label placement instead an anchor option, which is deprecated now.
  • Supported the new label placement options in the Marker object.

Release Date: 04.08.2020

Support End Date: 26.11.2020

Release Date: 21.07.2020

Support End Date: 04.11.2020

There are no any release notes. This is the first release with a fixed version.

  • New option disableZoomOnScroll was added to the Map options. This option disable zoom on scroll, when a mouse cursor is above the map container.
  • New method setSelectedObjects was added to the Map. This method allows to select any object on the map.