yarrow_map_flutter_sdk 0.1.0 copy "yarrow_map_flutter_sdk: ^0.1.0" to clipboard
yarrow_map_flutter_sdk: ^0.1.0 copied to clipboard

Flutter SDK for Yarrow Maps with API parity to the web SDK.

0.1.0 #

Feature parity with the Yarrow web SDK 1.2.0.

Breaking #

  • [lng, lat] coordinate order for addMarker and all routing coordinates (buildRoute, buildRouteWithLabels, buildMultiSegmentRouteWithLabels), matching the web SDK and GeoJSON. Previously these took [lat, lng].
  • changeStyles now takes a YarrowStyleType? enum (default_ / satellite / hybrid) instead of a String?.
  • onIconClick callbacks receive a fourth selected parameter (bool?) — for pois it reports whether the tapped POI is currently highlighted.
  • Event subscriptions (onMoveEnd, onMapClick, onIconClick, onLayerClick, onCustomLayerClick) now return an unsubscribe function instead of void.
  • addMarker renders a proper pin as a symbol annotation (previously a small circle layer); YarrowMarkerHandle.id values are now annotation ids.
  • Requires Flutter >= 3.29 (via maplibre_gl 0.26).

Added #

  • POI highlighting: highlightPOI(id, options), highlightPOIs(ids, options), resetPOIHighlight([idOrIds]), isPOIHighlighted(id), getHighlightedPOIs() with HighlightPOIOptions (location, icon, title, iconSize, panTo, zoom, replace, onClick). Highlighted POIs are hidden from the base layer and re-rendered as markers, matching the web SDK.
  • Clustering of highlighted POIs: setClustering(YarrowClusteringConfig) / getClustering(), config in YarrowMapConfig.clustering (radius 60 px, maxZoom 16, minPoints 2, onClusterClick — return false to suppress zoom-to-expand).
  • Modern routing API: buildRoute(BuildRouteOptions) with styling options, Accept-Language, cancellation via dio CancelToken, onRouteClick, fitBounds/clearOldRoutes/layerPrefix, and a BuildRouteResult with meta (profile, totalRoutes, bestRouteIndex, duration, distance). buildRouteWithLabels / buildMultiSegmentRouteWithLabels are deprecated delegates.
  • POI base layer toggles: excludePoiLayer config option, enablePoiLayer(), disablePoiLayer(), setPoiLayerEnabled(bool).
  • Read accessors: isReady(), getTheme(), getStyleType(), getCenter() ([lng, lat]), getZoom().
  • Expanded onLayerClick targets: mahalla, district, region, country admin label layers in addition to buildings / pois.
  • Camera option objects: zoomTo(..., ZoomToOptions(speed, durationMs)) and fitBounds(..., FitBoundsOptions(padding, durationMs, maxZoom)).
  • Search: page / pageSize options; onIconClick is now wired; in-flight requests are cancelled when superseded; re-fetch on move only after the center shifts >= 500 m (was: every move); iconImage defaults to 'geo-icon' as a fallback for results without icons.
  • setFeatureState(...) passthrough (web-only in maplibre_gl 0.26 — Android/iOS throw UnimplementedError).
  • destroy() alias for dispose(); init() is idempotent and retryable; map-dependent calls made before the map is ready are queued and flushed on ready.
  • Anonymous DAU tracking ping (sdk_type: 'flutter') matching the web SDK.
  • addMarker options: anchor, iconImage, iconSize, rotation; default pin is drawn natively and tinted by color.

Fixed #

  • Custom sources/layers added via addSource/addLayer now survive changeStyles/changeTheme (they are replayed after every style load).
  • changeTheme no longer resets satellite/hybrid back to the default style.
  • Feature taps no longer double-dispatch click callbacks (via maplibre_gl 0.26's featureTapsTriggersMapClick default).
  • onLayerClick(buildings) matches only building layers instead of every polygon_tile layer.

Changed #

  • Dependencies: maplibre_gl ^0.26.2, dio ^5.10.0, flutter_cache_manager ^3.4.2, flutter_svg ^2.3.0; added path_provider ^2.1.5.

Platform limitations (vs. web SDK) #

  • Hover effects are not applicable on touch devices and are not implemented.
  • onRouteHover is omitted from BuildRouteOptions for the same reason.
  • setFeatureState only works on web until maplibre_gl implements it natively.
  • Highlight markers have no enter/exit scale animation (GL symbols, not DOM).
  • Clusters update on camera events (idle + throttled move), not per frame.

0.0.5 #

  • Breaking: apiKey is now a required parameter in YarrowMapConfig.
  • API key is automatically attached to all requests via Dio interceptor.
  • Migrate routing endpoints to new API (/api/routing/route) with updated coordinate and response formats.
  • Migrate search endpoint to new API (/api/search/) with flat results structure and additional query parameters.
  • Add changeBrandBadgePosition() method for dynamic badge repositioning at runtime.
  • Update brand badge and map controls with glassmorphism design (backdrop blur, updated colors and shadows).
  • Improve search result rendering: conditional icon vs circle+label layers when results lack icons.
  • Fix icon loading: clear registered images on style reload, fix trailing slash on icons endpoint.

0.0.4 #

  • Add web-SDK parity APIs: addSource, updateSourceData, queryRenderedFeatures, and addLayer(options: ...) with sourceId / filter.
  • Expand controls positions to 6-way placement (left, leftTop, leftBottom, right, rightTop, rightBottom).
  • Add automatic controls/badge collision inset for shared corners.

0.0.3 #

  • Migrate from maplibre to official maplibre_gl.
  • Expose GeoJSON clustering options in YarrowMap.addLayer(...): cluster, clusterRadius, clusterMaxZoom, clusterProperties.

0.0.2 #

  • Add YarrowMap.onCustomLayerClick(layerId, callback) for click handling on SDK-added custom layers.

0.0.1 #

  • TODO: Describe initial release.
1
likes
140
points
89
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter SDK for Yarrow Maps with API parity to the web SDK.

Homepage

License

unknown (license)

Dependencies

dio, flutter, flutter_cache_manager, flutter_svg, maplibre_gl, path_provider

More

Packages that depend on yarrow_map_flutter_sdk