【问题标题】:How to add a marker in flutter to the Yandex MapKit?如何在 Flutter 中添加标记到 Yandex MapKit?
【发布时间】:2022-04-21 21:13:16
【问题描述】:

如何在flutter中添加marker(据我了解,这是placemark,但是研究了文档。我还没找到怎么添加。marker on the map)在地图上?我使用 Yandex Mapkit

【问题讨论】:

    标签: flutter dart yandex-maps yandex-mapkit


    【解决方案1】:

    这样试试

      final List<MapObject> mapObjects = [];
      final placemarks = [
          Placemark(
             mapId: MapObjectId('placemark_3'),
             point const Point(latitude: 55.69494398296744, longitude: 37.653375915527334),
             ....
               
          ),
         ...
      ];
       setState(() {
           mapObjects.addAll(placemarks);
      });
    

    【讨论】:

      猜你喜欢
      • 2020-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-04
      • 2019-02-18
      • 1970-01-01
      • 2021-08-17
      相关资源
      最近更新 更多