flutter_osm_web 2.2.0
flutter_osm_web: ^2.2.0 copied to clipboard
flutter web interface for flutter osm contain web channel and web api
ChangeLog #
2.2.0 #
- Use the canonical OSM raster endpoint, send an explicit browser referrer policy and retain visible provider attribution. Normalize legacy OSM a/b/c subdomain URLs without changing other providers.
- Serialize tile-layer changes, await replacement styles, keep raster basemaps below overlays and restore gradient road metrics after style changes. Failed style loads reject their caller and allow a later reset to recover.
- Breaking: remove the Leaflet engine; MapLibre GL JS is now the only web
rendering engine. The
map.htmlasset and theuseMapLibreflag onOsmWebWidgetare removed (the map iframe always loadsindex_maplibre.html). - add gradient road support:
RoadOption.roadGradientColors(at least 2 colors) draws the road with a start-to-end color gradient using MapLibre'sline-gradient(road sources now enablelineMetrics). Gradient roads skip the dotted dash pattern on the main line; borders still apply.
2.1.0 #
- Migrate routing_client_dart to ^1.0.8 (Dart 3.7+): routing goes through
RoutingManager.getRoute(request: OSRMRequest.route(...))and reads instructions fromroute.instructionsinstead ofbuildInstructions. Routes explicitly request GeoJSON geometry to preserve coordinate precision, and road-type mapping (RoadType→RoutingType) is preserved. - Handle a missing/null route geometry without a null assertion:
drawRoadreturns an empty route instead of crashing. - Require Dart 3.7+ / Flutter 3.47+ and update
webto ^1.1.2. - Use
widgets.dartonly: bundle a default pin asset and provide a neutral, animated loading indicator, so no Material/Cupertino icon fonts are required on web. - Apply
RoadOptionJSdefaults in Dart before crossing the JS/WASM boundary (dart2wasm ignores defaults on external JS constructors) and typeroadBorderColoras nullable. - Move
flutter_testtodev_dependenciesand add Chrome JS/WASM regression tests for routing, JS defaults, and the loading indicator.
2.0.1: #
- fix Flutter Web WASM build: load map HTML/JS from Flutter assets instead of Dio/CDN
- inject map scripts with
HTMLScriptElement.text(WASMinnerHTMLparsed the JS as HTML) - load the map iframe from a same-origin blob URL instead of
srcdocto avoidabout:srcdocHistory.replaceState errors under COOP/COEP
2.0.0: #
- Breaking: migrate web rendering engine from Leaflet to MapLibre GL JS
- add
useMapLibreflag toOsmWebWidgetto toggle between Leaflet and MapLibre - add
index_maplibre.htmlasset (MapLibre GL JS implementation) - add
styleURLsupport toCustomTileJsinterop andWebMixinfor vector tiles - load assets from local package in debug mode instead of GitHub CDN
- prevent marker click event propagation to map
- add tracking state guard to prevent duplicate callbacks
- improve sidebar toggle and road rendering
- change
flutter_osm_interfacedependency to^1.4.0
1.4.4: #
1.4.3: #
- remove package_info_plus dependency
1.4.2: #
- fix bug in loading assets where we download them from github cdn
1.4.1: #
1.4.0: #
- add
onGeoPointLongPressEventto handle long click in web - fix tracking position information from js to dart
1.3.5: #
1.3.4+1: #
1.3.4: fix bug #
1.3.3: fix bug #
1.3.2: fix bug #
- fix mylocation api
1.3.1: fix bug #
- fix bug in setIconMarker
- improve changeMarker API in JS
1.3.0: #
1.2.0-wasm: #
- add wasm support (migrate from package:js to dart:js_interop)
1.1.0: #
1.0.5: #
1.0.4: #
1.0.3: #
1.0.2: #
1.0.1: #
1.0.0: #
1.0.0-rc.4: update dependencies #
1.0.0-rc.3: update dependencies #
1.0.0-rc.2: migrate to wasm #
1.0.0-rc.1: fix bug #
- fix bug delete road #500
1.0.0-rc: #
- improve draw shape in web
1.0.0-dev.3 #
1.0.0-dev.2 #
1.0.0-dev.1 #
1.0.0-dev #
0.6.2 #
0.6.1 #
0.6.0 #
0.5.0 #
0.4.2 #
0.4.1 #
0.4.0 #
0.3.0 #
0.1.0 #
0.0.1 #
- TODO: Describe initial release.