mapbox-gl
Advanced tools
Changelog
0.12.1 (Dec 8 2015)
line-offset
(#1808)Pinch
interaction handler to TouchZoomRotate
(#1777)Map#update
and Map#render
private methods (#1798)Map#remove
remove created DOM elements (#1789)position
option for Attribution
(#1689)Changelog
0.11.5 (Dec 1 2015)
mouseend
events (#1104)mousedown
and mouseup
events (#1411)movestart
and moveend
when panning (#1658)Changelog
0.11.3 (Nov 10 2015)
Changelog
0.11.2 (Oct 29 2015)
devicePixelRatio
s (#1029 #1475 #1476)raster-opacity
on non-tile sources (#1270)Transform#resize
methodMap#getLayer
method (#1183)Transform#unmodified
property (#1452)Changelog
0.11.1 (Sep 30 2015)
Map#featuresAt
for non-4096 vector sources (#1529)mousemove
on drag-panTileCoord
, fix wrap calculation in TileCoord#cover
(#1483)Map
event listeners for mouseup
, contextmenu
(right click) (#1532)Changelog
0.11.0 (Sep 11 2015)
Map#featuresIn
: a bounding-box feature querycenter
, zoom
, bearing
, pitch
(#1452)text-size
via setLayoutProperty
(#1451)Changelog
0.10.0 (Aug 21 2015)
Switched to [longitude, latitude] coordinate order, matching GeoJSON. We anticipate that mapbox-gl-js will be widely used with GeoJSON, and in the long term having a coordinate order that is consistent with GeoJSON will lead to less confusion and impedance mismatch than will a [latitude, longitude] order.
The following APIs were renamed:
LatLng
was renamed to LngLat
LatLngBounds
was renamed to LngLatBounds
Popup#setLatLng
was renamed to Popup#setLngLat
Popup#getLatLng
was renamed to Popup#getLngLat
latLng
property of Map events was renamed lngLat
The following APIs now expect array coordinates in [longitude, latitude] order:
LngLat.convert
LngLatBounds.convert
Popup#setLngLat
center
and maxBounds
options of the Map
constructorMap#setCenter
, Map#fitBounds
, Map#panTo
, and Map#project
center
option of Map#jumpTo
, Map#easeTo
, and Map#flyTo
around
option of Map#zoomTo
, Map#rotateTo
, and Map#easeTo
coordinates
properties of video and image sourcesUpdated to mapbox-gl-style-spec v8.0.0 (Changelog). Styles are now expected to be version 8. You can use the gl-style-migrate utility to update existing styles.
The format for mapbox://
style and glyphs URLs has changed. For style URLs, you should now use the format
mapbox://styles/:username/:style
. The :style
portion of the URL no longer contains a username. For font URLs, you
should now use the format mapbox://fonts/:username/{fontstack}/{range}.pbf
.
Mapbox default styles are now hosted via the Styles API rather than www.mapbox.com. You can make use of the Styles API
with a mapbox://
style URL pointing to a v8 style, e.g. mapbox://styles/mapbox/streets-v8
.
The v8 satellite style (mapbox://styles/mapbox/satellite-v8
) is now a plain satellite style, and not longer supports labels
or contour lines via classes. For a labeled satellite style, use mapbox://styles/mapbox/satellite-hybrid
.
Removed mbgl.config.HTTP_URL
and mbgl.config.FORCE_HTTPS
; https is always used when connecting to the Mapbox API.
Renamed mbgl.config.HTTPS_URL
to mbgl.config.API_URL
.
setLayoutProperty
and setPaintProperty
APIs
by passing undefined
as a property value.layer
option of featuresAt
now supports an array of layers.Changelog
0.9.0 (Jul 29 2015)
glyphs
URL now normalizes without the /v4/
prefix for mapbox://
urls. Legacy behavior for mapbox://fontstacks
is still maintained (#1385)
Expose geojson-vt
options for GeoJSON sources (#1271)
bearing snaps to "North" within a tolerance of 7 degrees (#1059)
Now you can directly mutate the minzoom and maxzoom layer properties with map.setLayerZoomRange(layerId, minzoom, maxzoom)
Exposed mapboxgl.Control
, a base class used by all UI controls
Refactored handlers to be individually included in Map options, or enable/disable them individually at runtime, e.g. map.scrollZoom.disable()
.
New feature: Batch operations can now be done at once, improving performance for calling multiple style functions: (#1352)
style.batch(function(s) {
s.addLayer({ id: 'first', type: 'symbol', source: 'streets' });
s.addLayer({ id: 'second', type: 'symbol', source: 'streets' });
s.addLayer({ id: 'third', type: 'symbol', source: 'terrain' });
s.setPaintProperty('first', 'text-color', 'black');
s.setPaintProperty('first', 'text-halo-color', 'white');
});
Improved documentation
featuresAt
performance improvements by exposing includeGeometry
option
Better label placement along lines (#1283)
Improvements to round linejoins on semi-transparent lines (mapbox/mapbox-gl-native#1771)
Round zoom levels for raster tile loading (2a2aec)
Source#reload cannot be called if source is not loaded (#1198)
Events bubble to the canvas container for custom overlays (#1301)
Move handlers are now bound on mousedown and touchstart events
map.featuresAt() now works across the dateline