【发布时间】:2020-05-12 12:02:10
【问题描述】:
我正在开发一个显示滑雪道和缆车的应用。我可以单独获取这些地图:
对于底图(这是我的主图)
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';
class SkiMapSection extends StatelessWidget {
const SkiMapSection({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Expanded(
child: new FlutterMap(
options: new MapOptions(
center: LatLng(40.58, 31.78),
minZoom: 10.0,
),
layers: [
TileLayerOptions(
urlTemplate:
"https://snowmap.fast-sfc.com/base_snow_map/{z}/{x}/{y}.png",
subdomains: ['a', 'b', 'c'],
),
],
),
);
}
}
对于滑雪道和升降机,我需要将 urlTemplate: 更改为 https://snowmap.fast-sfc.com/pistes/{z}/{x}/{y}.png
但我的目标是将电梯网址打印到底图上。我怎样才能做到这一点?颤振能做到吗?
干杯
【问题讨论】: