web_mercator 0.9.4 copy "web_mercator: ^0.9.4" to clipboard
web_mercator: ^0.9.4 copied to clipboard

outdated

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
35
pub points
0%
popularity

Publisher

verified publisherpenumbra.me

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

Repository (GitHub)
View/report issues

License

WTFPL, MIT (LICENSE)

Dependencies

flutter, meta, vector_math

More

Packages that depend on web_mercator