mohesu / map_location_picker

Map location picker for flutter Based on google_maps_flutter
Apache License 2.0
46 stars 70 forks source link

support additional markers #8

Closed frankely closed 1 year ago

frankely commented 1 year ago

Scenario: When creating the MapLocationPicker, I would like to specify my own additional markers

So they can be loaded in _MapLocationPickerState.build

    const additionalMarkers = widget.additionalMarkers.map(entry => {
      return Marker(
        markerId: MarkerId(entry.key),
        position: entry.value,
      );
    }).toList();

    final markers = Set<Marker>.from(additionalMarkers);
    markers.add(Marker(
      markerId: const MarkerId("one"),
      position: _initialPosition,
    ));
//...
    markers: markers,
//...
rvndsngwn commented 1 year ago

https://github.com/rvndsngwn/map_location_picker/pull/9 Merged.