Skip to main content

generic_map 0.17.0 copy "generic_map: ^0.17.0" to clipboard
generic_map: ^0.17.0 copied to clipboard

Shared map models, camera controls, widget markers and place picking, rendered with Google Maps.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:generic_map/generic_map.dart';
import 'package:latlong2/latlong.dart';

void main() => runApp(const MapExample());

/// Configure a Google Maps key in the platform runner before running this app.
class MapExample extends StatelessWidget {
  const MapExample({super.key});

  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Scaffold(
          appBar: AppBar(title: const Text('Generic map')),
          body: GenericMap(
            interactive: true,
            initialLocation: const Place(
              LatLng(37.791714, -122.392249),
              'San Francisco, CA',
              'San Francisco',
            ),
            googleMapOptions: const GoogleMapsOptions(
              preset: GoogleMapStylePreset.standard,
            ),
          ),
        ),
      );
}
3
likes
150
points
1.41k
downloads

Documentation

API reference

Publisher

verified publisherbettersuite.io

Weekly Downloads

Shared map models, camera controls, widget markers and place picking, rendered with Google Maps.

Homepage

License

MIT (license)

Dependencies

collection, flutter, gm_google_maps_flutter, image, latlong2

More

Packages that depend on generic_map