|
|
|
@ -63,8 +63,8 @@ class _BasicMapState extends State<BasicMap> {
|
|
|
|
showMapPoi: _showMapPoi,
|
|
|
|
showMapPoi: _showMapPoi,
|
|
|
|
//设定地图是否显示底图poi标注(不包含室内图标注),默认true
|
|
|
|
//设定地图是否显示底图poi标注(不包含室内图标注),默认true
|
|
|
|
zoomLevel: g_zoomLevel,
|
|
|
|
zoomLevel: g_zoomLevel,
|
|
|
|
maxZoomLevel: 16,
|
|
|
|
maxZoomLevel: g_zoomMax,
|
|
|
|
minZoomLevel: 12,
|
|
|
|
minZoomLevel: g_zoomMin,
|
|
|
|
mapPadding: BMFEdgeInsets(left: 30, top: 0, right: 30, bottom: 0),
|
|
|
|
mapPadding: BMFEdgeInsets(left: 30, top: 0, right: 30, bottom: 0),
|
|
|
|
//showMapScaleBar: true,
|
|
|
|
//showMapScaleBar: true,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -446,11 +446,11 @@ class _BasicMapState extends State<BasicMap> {
|
|
|
|
//color: Colors.white,
|
|
|
|
//color: Colors.white,
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
// child: Icon(Icons.my_location_outlined, color: Colors.black45),
|
|
|
|
// child: Icon(Icons.my_location_outlined, color: Colors.black45),
|
|
|
|
child: Icon(Icons.add, color: g_zoomLevel < 16 ? Colors.blue : Colors.grey),
|
|
|
|
child: Icon(Icons.add, color: g_zoomLevel < g_zoomMax ? Colors.blue : Colors.grey),
|
|
|
|
onTap: g_zoomLevel < 16
|
|
|
|
onTap: g_zoomLevel < g_zoomMax
|
|
|
|
? () {
|
|
|
|
? () {
|
|
|
|
//放大按钮,缩放限制12-16
|
|
|
|
//放大按钮,缩放限制g_zoomMin-g_zoomMax
|
|
|
|
if (g_zoomLevel < 16) {
|
|
|
|
if (g_zoomLevel < g_zoomMax) {
|
|
|
|
g_zoomLevel++;
|
|
|
|
g_zoomLevel++;
|
|
|
|
myMapController
|
|
|
|
myMapController
|
|
|
|
?.updateMapOptions(BMFMapOptions(zoomLevel: g_zoomLevel));
|
|
|
|
?.updateMapOptions(BMFMapOptions(zoomLevel: g_zoomLevel));
|
|
|
|
@ -467,10 +467,10 @@ class _BasicMapState extends State<BasicMap> {
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
// child: Icon(Icons.my_location_outlined, color: Colors.black45),
|
|
|
|
// child: Icon(Icons.my_location_outlined, color: Colors.black45),
|
|
|
|
child: Icon(Icons.horizontal_rule,
|
|
|
|
child: Icon(Icons.horizontal_rule,
|
|
|
|
color: g_zoomLevel > 12 ? Colors.blue : Colors.grey),
|
|
|
|
color: g_zoomLevel > g_zoomMin ? Colors.blue : Colors.grey),
|
|
|
|
onTap: g_zoomLevel > 12
|
|
|
|
onTap: g_zoomLevel > g_zoomMin
|
|
|
|
? () {
|
|
|
|
? () {
|
|
|
|
//缩小按钮,缩放限制12-16
|
|
|
|
//缩小按钮,缩放限制10-18
|
|
|
|
g_zoomLevel--;
|
|
|
|
g_zoomLevel--;
|
|
|
|
myMapController
|
|
|
|
myMapController
|
|
|
|
?.updateMapOptions(BMFMapOptions(zoomLevel: g_zoomLevel));
|
|
|
|
?.updateMapOptions(BMFMapOptions(zoomLevel: g_zoomLevel));
|
|
|
|
|