搜索插件、代码仓与 APP 分类

label_marker 封面
插件详情v1.0.1

label_marker

一个用于创建和使用带有标签文本的 Google 地图标记的包;最简单高效的方式。

AndroidiOSWeb
近 30 天下载
1890
喜欢数
88
Pub 分数
150

安装插件

flutter pub add label_marker

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Label Marker 是一个 Flutter 包,可简化在 Google 地图上创建带有自定义标签文本的标记。它提供了一种高效且直观的方式来在地图上显示带标签的标记,提升地图可读性,而无需复杂的配置。专为寻求轻量级解决方案的开发者设计,它可与 Google Maps for Flutter 无缝集成,支持 Android、iOS 和 Web 平台。该包注重性能和易用性,非常适合需要清晰文本标记注释的应用程序。

适合场景

  • 在地图上显示位置名称
  • 用标签突出显示兴趣点
  • 创建带有文本的交互式地图标记
  • 通过可读的注释增强地图用户体验
  • 构建导航或发现类应用

主要特点

  • 用于带标签标记的简单 API
  • 高效的渲染性能
  • 支持 Google 地图集成
  • 跨平台兼容性(Android、iOS、Web)
  • 所需设置最少

适合对象

  • 开发基于地图的应用程序的开发者
  • 需要标记的项目
  • 专注于位置可视化的应用
  • 注重开发速度的团队
  • 使用 Google Maps 的 Flutter 前端开发人员

使用建议

  • 需要 Google Maps API 密钥
  • 仅限Google地图平台
  • 依赖于 Google Maps Flutter 插件
  • 不适用于非谷歌地图提供商
  • 可能需要额外的样式自定义

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

A package to create and use Google Maps marker with label text; the easiest and most efficient way.

Pub Package MIT License

Features

logo

Use this package in your Flutter app to:

  • Include map marker with text in flutter app
  • Customise the background colour of the label
  • Customise the font style of the label
  • Implement any other functionality that you could do with normal markers

Getting started

  1. Do the basic setup for having Google Maps
  2. Create a Set of normal markers ( Set < Marker > ) and set it as markers parameter of Google Maps widget
  3. Import this package; label_marker, and call addLabelMarker() function on the Set of markers when you want to add a label marker.
  4. Pass a LabelMarker widget, (created by giving required parameters, ie, label, position and markerId) to the above function. (See example.)
  5. Remember to call setState using 'then' keyword on the addLabelMarker() function.

Usage

markers.addLabelMarker(LabelMarker(
    label: "TextToShow",
    markerId: MarkerId("idString"),
    position: LatLng(10.0, 11.0),
    backgroundColor: Colors.green,
    )).then((value) {
    setState(() {});
    },
);

Additional information

This was done alone and contributions are absolutely welcome. Any idea or suggestion to remove the need of setState after the function manually called, would be most appreciated.

Enjoy the package. Develop something beautiful.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。