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.
example/ folder contains a sample app displaying the boudary of Martinique with interactive pitch, bearing & zoom touch interactions.