Skip to main content

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

Shows the positions of the geolocator package with the UserLocationLayer of the maplibre package.

example/example.md

Show the location of the device on a MapLibreMap with a UserLocationLayer:

import 'package:maplibre/maplibre.dart';
import 'package:maplibre_geolocator/maplibre_geolocator.dart';

MapLibreMap(
  options: MapOptions(
    style: MapStyle.url('https://demotiles.maplibre.org/style.json'),
  ),
  children: [
    UserLocationLayer(locations: geolocatorUserLocations()),
  ],
)

Ask for the location permission first, for example with Geolocator.requestPermission(). The User Location chapter of the documentation covers permissions, platform setup and tracking, and the example app has a complete page.

1
likes
160
points
787
downloads

Documentation

Documentation
API reference

Publisher

verified publishermaplibre.org

Weekly Downloads

Shows the positions of the geolocator package with the UserLocationLayer of the maplibre package.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#map #maplibre #location

License

BSD-3-Clause (license)

Dependencies

flutter, geolocator, maplibre

More

Packages that depend on maplibre_geolocator