패키지, 저장소 및 앱 카테고리 검색

custom_map_markers 표지
패키지 상세v0.0.2+1

custom_map_markers

런타임 위젯을 지도 마커 아이콘 또는 바이트 배열 이미지로 변환하는 패키지입니다.

AndroidiOSWeb
30일 다운로드
15
좋아요
86
Pub 점수
140

패키지 설치

flutter pub add custom_map_markers

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

런타임 위젯을 사용자 지정 지도 마커 아이콘으로 사용하거나 바이트 배열 이미지로 변환하여 지도에서 사용할 수 있도록 해주는 플러터 패키지입니다. 안드로이드, iOS, 웹 플랫폼 간에 플러터 위젯을 지도 뷰에 직접 통합할 수 있어 동적이고 상호작용 가능한 마커를 만드는 과정을 단순화합니다. 실시간 데이터 기반의 개인화되거나 애니메이션된 마커가 필요한 애플리케이션에 적합합니다.

사용 사례

  • 사용자 데이터를 기반으로 한 동적 마커 아이콘
  • 애니메이션 또는 상태 기반 지도 핀
  • 지도上的 사용자 정의 UI 요소
  • 실시간 위치 시각화
  • 인터랙티브 지도 오버레이

주요 기능

  • 위젯을 지도 마커로 변환
  • 바이트 배열 출력 지원
  • 크로스 플랫폼 호환성
  • 지도 플러그인과의 간편한 통합
  • 런타임 마커 사용자 정의

적합한 대상

  • 인터랙티브 지도를 개발하는 개발자
  • 실시간 위치 추적 기능이 있는 앱
  • UI 중심의 위치 정보 기능
  • 사용자 정의 가능한 지도 인터페이스
  • 웹 및 모바일 지도 애플리케이션

고려 사항

  • 복잡한 위젯으로 인한 성능 영향
  • 호환되는 지도 플러그인 필요
  • 지원되는 플랫폼에 제한됨
  • 자주 업데이트될 때의 메모리 사용량
  • 웹에서의 잠재적인 렌더링 불일치

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Custom Map Markers

Not only "Everything is a widget" also "Everywhere is a widget".
custom_map_marker is a package that turns runtime widgets into map marker icons.

Features

this package providers the following features:

  • Ability to create runtime map markers using flutter widgets.
  • Capture Images of any list of widgets.

Getting started

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

dependencies:
  custom_map_markers: ^0.0.1

Usage

  1. Wrap your GoogleMaps widget with CustomGoogleMapMarkerBuilder.
  2. Define each marker and its custom widget in customMarkers
  3. Once custom markers are ready they will be passed as Set<Marer> in builder function.
final locations = const [  
  LatLng(37.42796133580664, -122.085749655962),  
  LatLng(37.41796133580664, -122.085749655962),  
];  

CustomGoogleMapMarkerBuilder(  
  customMarkers: [  
  MarkerData(  
        marker: Marker(  markerId: const MarkerId('id-1'), position: locations[0]),  
		child: _customMarker('A', Colors.black)),  
  MarkerData(  
        marker: Marker(  markerId: const MarkerId('id-2'), position: locations[1]),  
		child: _customMarker('B', Colors.red)),    
  ],  
  builder: (BuildContext context, Set<Marker>? markers) {  
    if (markers == null) {  
      return const Center(child: CircularProgressIndicator());  
  }  
    return GoogleMap(  
      initialCameraPosition: const CameraPosition(  
        target: LatLng(37.42796133580664, -122.085749655962),  
  zoom: 14.4746,  
  ),  
  markers: markers,  
  onMapCreated: (GoogleMapController controller) { },  
  );  
  },  
)

Not a google map user?

if you are not willing to use google maps you can use CustomMapMarkerBuilder that takes List<widgets> instead of List<MarkerData> and returns List<Uint8List> instead of Set<Marker> so you are free to use captured png images as you need.

Notes:
  1. Make sure your marker widget has boundaries.
  2. This package capture a png image of widget markers once they render, if your widget would take more time to render like Image.network you can use screenshotDelay parameter to daley the capture process making sure that your widget is rendered properly before capturing it.
  3. to run project example you have to add a valid google maps key to android/ios directories.

Features and bugs

Please feel free to:

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.