Commit 5fcaf0d9 authored by Yasiru-Deshan's avatar Yasiru-Deshan

Marker for my location added

parent 8d32716e
...@@ -31,7 +31,7 @@ class MapSampleState extends State<MapSample> { ...@@ -31,7 +31,7 @@ class MapSampleState extends State<MapSample> {
zoom: 14.4746, zoom: 14.4746,
); );
static const Marker _kGooglePlexMarker = Marker( static final Marker _kGooglePlexMarker = Marker(
markerId: MarkerId('_kGooglePlex'), markerId: MarkerId('_kGooglePlex'),
infoWindow: InfoWindow(title:"Google Plex"), infoWindow: InfoWindow(title:"Google Plex"),
icon: BitmapDescriptor.defaultMarker, icon: BitmapDescriptor.defaultMarker,
...@@ -44,12 +44,21 @@ class MapSampleState extends State<MapSample> { ...@@ -44,12 +44,21 @@ class MapSampleState extends State<MapSample> {
tilt: 59.440717697143555, tilt: 59.440717697143555,
zoom: 19.151926040649414); zoom: 19.151926040649414);
static final Marker _kLakeMarker = Marker(
markerId: MarkerId('_kLakeMarker'),
infoWindow: InfoWindow(title:"Lake"),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue),
position: LatLng(37.43296265331129, -122.08832357078792),
);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: GoogleMap( body: GoogleMap(
mapType: MapType.normal, mapType: MapType.normal,
markers: {_kGooglePlexMarker}, markers: {_kGooglePlexMarker,
_kLakeMarker,
},
initialCameraPosition: _kGooglePlex, initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) { onMapCreated: (GoogleMapController controller) {
_controller.complete(controller); _controller.complete(controller);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment