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

store_locator 封面
插件详情v1.1.0

store_locator

适用于 Flutter 的商店定位器。可根据当前地图位置显示商店(或兴趣点)。

AndroidiOSWeb
近 30 天下载
83
喜欢数
3
Pub 分数
160

安装插件

flutter pub add store_locator

插件介绍

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

Flutter 的 store_locator 包使开发者能够将商店或兴趣点(POI)显示在地图上,并根据用户的当前位置动态更新。它可无缝集成到 Android、iOS 和 Web 平台的 Flutter 应用中,提供直观的方式来可视化附近的位置。该包设计简洁,利用地图服务渲染标记,并支持自定义样式和过滤功能。非常适合需要基于位置发现的零售、服务或物流应用。

适合场景

  • 查找附近的商店
  • 在地图上显示兴趣点
  • 基于位置的服务发现
  • 零售应用导航
  • 基于地图的客户互动

主要特点

  • 基于位置的实时店铺展示
  • 可自定义的地图标记
  • 支持 Android、iOS 和 Web
  • 与 Flutter 的轻松集成
  • 可筛选的商店列表

适合对象

  • 零售应用
  • 服务提供商目录
  • 物流和配送跟踪
  • 旅行和旅游应用
  • 本地企业发现工具

使用建议

  • 需要配置地图 API 密钥
  • 仅限支持的平台
  • 依赖外部地图服务
  • 可能需要处理位置访问权限
  • 性能取决于数据大小和网络速度

原始 README

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

Store Locator for Flutter

pub package build

A Flutter package for showing map markers dynamically based on API calls that use Haversine distance or a similar location query.

Android iOS Web
Support SDK 24+ 14.0+ Any*

The example app running in Android

Installation

First, add store_locator as a dependency in your pubspec.yaml file.

You also need to implement google_maps_flutter properly, check their guide

Import

You can import the package with:

import 'package:store_locator/store_locator.dart';

Example

StoreLocator<Store>(
  mapConfiguration: const MapConfiguration(
    initialCameraPosition: CameraPosition(
      target: LatLng(45.464211, 9.191383),
      zoom: 10,
    ),
  ),
  positionCallback: (position) async {
    Response response = await Dio().get('stores', queryParameters: {
      "latitude": position.latitude,
      "longitude": position.longitude,
    });
    if (response.statusCode == 200 || response.statusCode == 201) {
      return storesFromJson(response.data);
    }
    return [];
  },
  markerBuilder: (store) {
    return Marker(
      markerId: MarkerId(store.id.toString()),
      position: LatLng(store.latitude, store.longitude),
      infoWindow: InfoWindow(
        title: store.name,
        snippet: store.city,
      ),
    );
  },
)

See the example directory for a complete sample app.

Support

If this plugin was useful to you, helped you to deliver your app, saved you a lot of time, or you just want to support the project, I would be very grateful if you buy me a cup of coffee.

Buy Me A Coffee

License

MIT

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。