ubhub_maps 0.8.1 copy "ubhub_maps: ^0.8.1" to clipboard
ubhub_maps: ^0.8.1 copied to clipboard

Official UBHUB Flutter SDK with native vector maps, 3D buildings, place-search widgets, typed geocoding, reverse geocoding, and routing.

Changelog #

0.8.1 #

  • Fix (Android): closing the app with the back button crashed it with NetworkOnMainThreadException when the map had open connections. Map sessions now close their connections off the main thread.

0.8.0 #

  • Detailed 3D on Android and iOS: UbHubBuildings.detailed draws the detailed 3D buildings as parts, each raised to its own height, and UbHubTrees.extruded draws trees as a trunk and a crown. Both use MapLibre's native extrusions and fall back to extruded buildings and tree points where the API has none yet. The resource policies allow the new /v1/buildings/<release>/parts/ and /v1/trees/<release>/shapes/ tiles.
  • Fix: changing buildingStyle or treeStyle on a mounted map failed with a type error and replaced the map with "Unable to load the UBHUB map". Restyles now apply, and a look that cannot be applied leaves the map as it was.
  • Fix: a restyle kept the filter of extruded buildings (maplibre_gl drops it when a fill-extrusion layer is added), and restyles every building layer.

0.7.0 #

  • Fix: the standard basemap loads again. The API now serves the default basemap from versioned tile releases (/v1/basemap/<release>/tiles/...), which 0.6.0 rejected, so its maps failed with "Unable to load the UBHUB map". The style check and the Android and iOS resource policies accept the release paths, the building and tree tile sets, and the style's light.
  • 3D buildings and trees:
    • UbHubMapOptions.buildings (UbHubBuildings.none, flat (default) or extruded) and trees (UbHubTrees.none (default) or points).
    • UbHubMapOptions.initialTilt (0–60 degrees) opens the map tilted.
    • UbHubMap.buildingStyle (UbHubBuildingStyle: color, outline color, opacity, height scale) and treeStyle (UbHubTreeStyle: color, outline color, opacity) restyle the layers in place.
    • UbHubMap.showBuildings and showTrees hide or show them without a new map load.

0.6.0 #

  • Camera control on UbHubMapController:
    • fitBounds(bounds, padding:, animate:, duration:) frames a route or a set of markers. UbHubBounds.fromPoints builds the bounds.
    • animateCamera and moveCamera take a UbHubCameraPosition, including bearing and tilt. flyTo gains duration.
    • toScreenLocation and fromScreenLocation convert between map positions and logical-pixel screen offsets.
    • queryCamera() reads the camera from the native map, whether or not camera callbacks are set.
  • UbHubBounds gains validate() and value equality. UbHubMap now rejects cameraBounds with swapped corners.
  • Android: info windows are positioned in logical pixels. The native projection reports physical pixels, so windows were offset on high-density screens.
  • Place search localization and customization:
    • UbHubPlaceSearchStrings with english and mongolian presets. The widget picks Mongolian when the app locale is mn.
    • resultBuilder for custom result rows.
    • suggestions shows app-provided places, such as recent selections, while the field is focused and empty.
    • decoration is now optional; the default label follows strings.

0.5.1 #

  • Docs: a step-by-step Quickstart in the README; no code changes.

0.5.0 #

  • More Google-Maps-style options on UbHubMap:
    • Circles — UbHubCircle(center, radiusMeters: ...), drawn as a meter-accurate polygon that scales with the map; onCircleTap.
    • Zoom limits — minZoom/maxZoom (0–16).
    • Camera bounds — cameraBounds (UbHubBounds) restricts panning.
    • Gesture and compass toggles — rotateGesturesEnabled, scrollGesturesEnabled, zoomGesturesEnabled, tiltGesturesEnabled (still 2D by default), doubleClickZoomEnabled, compassEnabled, gestureRecognizers.
    • Long press — onLongPress.
    • Camera callbacks — onCameraMove and onCameraIdle report a UbHubCameraPosition; UbHubMapController.camera reads the current one.

0.4.0 #

  • Google-Maps-style map features on UbHubMap:
    • Markers are now UbHubMarker (was List<GeoPoint>). A bare UbHubMarker(point) draws the same dot. Migration: markers: points.map(UbHubMarker.new).toList().
    • Custom marker icons via UbHubMarkerIcon.asset/.bytes, plus per-marker label, size and opaque data.
    • Marker clustering with clusterMarkers, clusterRadius, clusterMaxZoom; tapping a cluster zooms to its expansion zoom (capped at the basemap maximum of 16).
    • Tap callbacks: onMarkerTap, onPolylineTap, onPolygonTap. onTap now fires only for basemap taps.
    • Polylines and polygons via UbHubPolyline and UbHubPolygon (per-shape color, width, fill and stroke).
    • Info windows: infoWindowBuilder shows your widget above a tapped marker and tracks it as the camera moves; UbHubMapController gains showInfoWindow, hideInfoWindow, zoomIn and zoomOut.
    • App-provided icons are registered with addImage and never pass through the basemap resource isolation; the overlay sources stay separate from the locked basemap.

0.3.3 #

  • Add width and height to UbHubMap so the map can be sized directly, without an outer SizedBox or Expanded. The native map has no intrinsic size; set a height here or give it an external constraint, otherwise it collapses in an unbounded parent such as a Column or ListView. Both default to null (fill the available space, as before).

0.3.2 #

  • Android: initialize MapLibre with the application context before the map transport configures its HTTP client, fixing a crash when the transport opens before any map view exists.
  • Android: report native initializer failures (LinkageError) as a transport error instead of crashing the app.

0.3.1 #

  • Add UbHubBasemap.nova and UbHubMapOptions.basemap to show the Nova basemap (/v1/basemap/nova/*); UbHubBasemap.standard remains the default.
  • Android: allow up to 20 concurrent resource requests per map instead of OkHttp's default 5, so tiles, glyphs and sprites no longer queue behind each other.
  • Android and iOS: pass a basemap 404 to MapLibre as a real 404, so missing tiles or glyph ranges are skipped instead of retried indefinitely.

0.3.0 #

  • BREAKING: requires Flutter; plain Dart CLI/backend consumers must stay on 0.2.1.
  • Consolidate native maps, place search, and REST services into ubhub_maps.
  • Add Android/iOS map widgets with markers, route overlays, and camera control.
  • Isolate native map credentials per session and reject redirected resources.
  • Add debounced place search, a runnable Flutter example, and native CI checks.
  • Replace ubhub_maps_flutter imports with package:ubhub_maps/ubhub_maps.dart.

0.2.1 #

  • Expose the complete CLI example at example/main.dart for pub.flutter-io.cn discovery.
  • Use the SDK default API origin in the example unless explicitly overridden.
  • Preserve the original example/basic_usage/main.dart entry point.

0.2.0 #

  • Use the verified deployed public API origin https://developers.ubhub.mn.

  • Share identical in-flight requests per client, avoiding duplicate HTTP calls, parsing, and API quota usage. Disable with coalesceRequests: false.

  • Never retain completed responses or failures; subsequent calls fetch fresh data.

  • Use typed byte buffers and fused UTF-8/JSON decoding for larger responses.

  • Avoid timing allocations when logging is disabled and reuse compiled patterns.

  • Add concurrency/stream regression tests and a reproducible Dart benchmark.

0.1.0 #

  • Initial UBHUB Dart SDK using the package name ubhub_maps.
  • Forward and reverse geocoding using the public /v1/geocode contract.
  • Driving and walking routes with typed GeoJSON geometry and snapped waypoints.
  • Instance-scoped Bearer authentication and reusable HTTP connections.
  • Typed failures, request IDs, rate-limit metadata, bounded timeouts, and safe logging.
  • Deterministic unit tests, example, and opt-in staging integration tests.
0
likes
150
points
462
downloads

Documentation

Documentation
API reference

Publisher

verified publisherdevelopers.ubhub.mn

Weekly Downloads

Official UBHUB Flutter SDK with native vector maps, 3D buildings, place-search widgets, typed geocoding, reverse geocoding, and routing.

Homepage
Repository (GitHub)

Topics

#geocoding #routing #geospatial

License

MIT (license)

Dependencies

flutter, http, maplibre_gl

More

Packages that depend on ubhub_maps

Packages that implement ubhub_maps