- fitBounds(): accept bounds coordinates in either order (#102) Thanks @apete343
- flyToViewport: add support for speed, screenSpeed, curve and maxDuration (#97)
- Add specs for maxZoom / minExtents (#100)
- fitBounds: Handle "degenerate" bounds (#93)
- Bump gl-matrix dependency to prod version (#90)
- Add user-friendly error messages on malformed coordinates (#91)
- Replace gl packages with original gl-matrix (#85)
- Remove math.gl dependency (#86)
- NEW:
getProjectionMatrix
can match the behavior of the latest Mapbox (when called withnearZMultipler: 1 / viewport.height, farZMultiplier: viewport.height
) - NEW:
addMetersToLngLat
utility - FIX: returned values by
getDistanceScales
now reflect the flipped y-direction between spherical coordinates and the WebMercator world. - FIX:
WebMercatorViewport
'sproject
andunproject
handle altitude correctly - BREAKING:
getWorldPosition
is removed
- Use
@babel/runtime
in the ES5 entry point - Babel 7 - upgrade from beta to official release
- Remove
babel-minify
to preserve debugging. - Add
sideEffects
field topackage.json
to optimize tree-shaking performance.
- Upgrade to math.gl@2.0.0
- Add esnext dist
- Add test-size-* scripts
- Remove dependeny on external assert
- Bump to math.gl v1.1.0 for esnext dist
- Fix bug in
getMeterZoom
wherelatitude: 0
throws error
- New util
flyToViewport
- New util
normalizeViewportProps
- Removed
getUncenteredViewMatrix
- Renamed
WebMercatorViewport.getLocationAtPoint
togetMapCenterByLngLatPosition
- Renamed projection functions:
lngLatToWorld
,worldToLngLat
,worldToPixels
,pixlesToWorld
- Improve perf of
getDistanceScales
- Add paramter
highPrecision
togetDistanceScales
to return extra precision multipliers forpixelsPerDegree
andpixelsPerMeter
- Introduce math.gl
- New utility functions
- Removed
FlatMercatorViewport
PerspectiveMercatorViewport
renamed toWebMercatorViewport
WebMercatorViewport.project
andWebMercatorViewport.unproject
handle pixel depth
- Replace gl-matrix dependency with cherry-pick imports
- NEW:
PerspectiveMercatorViewport.fitBounds
method
- FIX Make mapbox a devDependency instead of a dependency (only used for testing)
- FIX getLocationAtPoint
- Simplificaton
- Removes non-essential classes from v3 beta (moved to deck.gl)
- Adopt buble compiler for smaller transpiled code
Adds a new perspective enabled WebMercatorViewport
class that inherits
from a "basic" 3D Viewport
class.
This allows 3D applications to work with familiar view
and projection
matrices provided by the Viewport
and optionally use the WebMercatorViewport
for seamless integration with map components.
This split into two classes makes it easier for applications to reason about perspective mode and map projections.
import WebMercatorViewport from 'viewport-mercator-project/perspective';
var viewport = new WebMercatorViewport({
latitude,
longitude,
zoom,
pitch,
bearing,
altitude
});
const pixel = viewport.project(...);
center
property was broken up intolongitude
,latitude
properties.dimensions
property was broken up intowidth
, andheight
properties.
var viewport = ViewportMercator({
longitude: 0,
latitude: 0,
zoom: 0,
width: 600,
height: 800
});
Here's what creating a viewport used to look like, prior to 2.0
.
var viewport = ViewportMercator({
center: [0, 0],
zoom: 0,
dimensions: [600, 800]
});
The change was made to support the typical viewport
object from the new
react-map-gl
API changes.