sterna 0.1.0 copy "sterna: ^0.1.0" to clipboard
sterna: ^0.1.0 copied to clipboard

Moving map for flutter.

sterna #

Moving map for Flutter. This project is not stable yet. API may change.

Features #

  • Moving map tailored for navigation apps
  • Camera animation
  • Camera focal alignment
  • Asynchronous marker resolution when map bounds change
  • Auto zoom to fit markers
  • Implemented with RenderObject to optimise performance.
  • Plain dart code with no dependencies. Supports Android, IOS and Web.

Usage #

SternaMap(
  controller: MapController(initialCameraFocal: Latlng(45.6391, 5.8800)),
  children: <Widget>[
    TileLayer(
      delegate: RasterTileLayerChildDelegate.osm(),
    ),
    Layer(children: <Widget>[
      Marker(center: Latlng(45.6391, 5.8800)),
    ]),
    MarkerLayer(
      delegate: MarkerLayerChildResolverDelegate(
        resolver: (bounds) async => BuilderBundle<Latlng>(
          iterable: [Latlng(45.6391, 5.9769)].where(bounds.contains),
          builder: (_, latlng) => Marker(
            key: ValueKey(latlng),
            center: latlng,
          ),
        ),
      ),
    ),
  ],
);
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Moving map for flutter.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on sterna