markers in google map flutter code example
Example: set markers in google_map_flutter
List _markers = []
_markers.add(
Marker(
markerId: MarkerId('SomeId'),
position: LatLng(38.123,35.123),
infoWindow: InfoWindow(
title: 'The title of the marker'
)
)
);
GoogleMap(
initialCameraPosition: CameraPosition(
target: LatLng(38.9647,35.2233),
zoom: 9.0,
),
mapType: MapType.normal,
markers: Set.of(_markers),
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
)