web_mercator 0.9.4+1 icon indicating copy to clipboard operation
web_mercator: ^0.9.4+1 copied to clipboard

Dart implementation of the uber @math.gl/web-mercator javascript module.

web_mercator #

Dart implementation of the uber @math.gl/web-mercator javascript module.

Getting Started #

See the tests for in-depth implementation methods. Here is a basic example using the fitBounds factory with end user device informations:

import 'package:web_mercator/web_mercator.dart' show MercatorViewport

final viewport = MercatorViewport.fitBounds(width: deviceWidth, height: deviceHeight, bounds: northEastSoutWest);

With that viewport, you can now project coordinates passing a Vector to the project method. Using a Vector2 will result in a flat projection (onto a sphere) while a Vector3 will consider the z component as an altidude expressed in meters.

The example/ folder contains a sample app displaying the boudary of Martinique with interactive pitch, bearing & zoom touch interactions.

1
likes
105
pub points
0%
popularity

Publisher

verified publisher iconpenumbra.me

Dart implementation of the uber @math.gl/web-mercator javascript module.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.WTFPL, MIT (LICENSE)

Dependencies

flutter, meta, vector_math

More

Packages that depend on web_mercator