gpt4 book ai didi

google-maps - 从 google maps flutter 中删除右下角按钮

转载 作者:IT王子 更新时间:2023-10-29 07:17:33 25 4
gpt4 key购买 nike

google maps API google maps widget 的右下角有一个按钮。我自己从来没有添加过这个按钮。如何删除它?

Bottom Right button

编辑:这是我的代码

  @override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("TravelBuddy"),
),
body: Stack(
children: <Widget>[
GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition:
CameraPosition(
target: _center,
zoom: 11.0,
),
mapType: _currentMapType,
markers: _markers,
onCameraMove: _onCameraMove,
),
Padding(
padding: EdgeInsets.all(16.0),
child: Align(
alignment: Alignment.topRight,
child: Column(
children: <Widget>[
button(_onMapTypeButtonPressed, Icons.map),
SizedBox(height: 16.0),
button(_onAddMarkerButtonPressed, Icons.add_location),
SizedBox(height: 16.0),
button(_goToPosition1, Icons.location_searching),
],),),),],),);}

最佳答案

感谢您的代码。

尝试在 Google Map() 小部件中放置一个选项“启用我的位置按钮”

     GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition:
CameraPosition(
target: _center,
zoom: 11.0,
),
mapType: _currentMapType,
markers: _markers,
onCameraMove: _onCameraMove,
myLocationButtonEnabled: false,
options: GoogleMapOptions(
myLocationEnabled:true
//there is a lot more options you can add here
)
),

关于google-maps - 从 google maps flutter 中删除右下角按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56879577/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com