Is there an existing issue for this?
Use case
Delivery and rideshare apps carry their own visual identity onto the map. The
destination markers can already be branded — MarkerOptions.icon takes a
registered bitmap — but the one symbol a driver looks at most, their own
position, cannot.
Today the location indicator during guidance is drawn entirely by the native
SDK, and neither this plugin nor the native Navigation SDK exposes a way to
replace it.
What is missing
There is no API for the location indicator itself. Searching the Navigation SDK
documentation for the chevron finds only a note about where it sits relative to
a custom footer, not what it looks like:
The default position of the chevron does not change when a custom footer is
present since the footer does not extend to the end side of the map.
setMyLocationEnabled is on or off, and that is the whole surface.
Why this cannot be solved in this repository
This plugin is open source, but the SDK it wraps is not:
// googlemaps/ios-navigation-sdk — Package.swift
.binaryTarget(
name: "GoogleNavigation",
url: "https://dl.google.com/geosdk/swiftpm/11.1.0/GoogleNavigation_3p.xcframework.zip",
...
)
Android is the same — com.google.android.libraries.navigation:navigation:7.8.0
is a Maven artifact. A pull request here can only surface what the binary
already offers, and this is not offered. So this is a request to route upstream
rather than a request for a change in this repository.
What we would need
Either of these would be enough:
- A bitmap for the location indicator, in the shape markers already take —
registerBitmapImage() plus rotation, anchor and a flat flag.
- Or, closer to what the SDK draws itself, a 3D model. Mapbox does this through
its style specification, where a model is a first-class map primitive
(LocationPuck3D with a glTF asset). Google already ships glTF support in
the Maps 3D SDK, though that renderer has no turn-by-turn navigation, so the
two cannot be combined today.
The first would already cover most branding needs.
Workaround, and its limits
An app can hide the SDK indicator and draw its own marker with flat: true and
rotation, moved by road-snapped location updates. Two things make that a poor
substitute:
Package version
0.11.0
Is there an existing issue for this?
Use case
Delivery and rideshare apps carry their own visual identity onto the map. The
destination markers can already be branded —
MarkerOptions.icontakes aregistered bitmap — but the one symbol a driver looks at most, their own
position, cannot.
Today the location indicator during guidance is drawn entirely by the native
SDK, and neither this plugin nor the native Navigation SDK exposes a way to
replace it.
What is missing
There is no API for the location indicator itself. Searching the Navigation SDK
documentation for the chevron finds only a note about where it sits relative to
a custom footer, not what it looks like:
setMyLocationEnabledis on or off, and that is the whole surface.Why this cannot be solved in this repository
This plugin is open source, but the SDK it wraps is not:
Android is the same —
com.google.android.libraries.navigation:navigation:7.8.0is a Maven artifact. A pull request here can only surface what the binary
already offers, and this is not offered. So this is a request to route upstream
rather than a request for a change in this repository.
What we would need
Either of these would be enough:
registerBitmapImage()plus rotation, anchor and a flat flag.its style specification, where a model is a first-class map primitive
(
LocationPuck3Dwith a glTF asset). Google already ships glTF support inthe Maps 3D SDK, though that renderer has no turn-by-turn navigation, so the
two cannot be combined today.
The first would already cover most branding needs.
Workaround, and its limits
An app can hide the SDK indicator and draw its own marker with
flat: trueandrotation, moved by road-snapped location updates. Two things make that a poorsubstitute:
Dart jumps at the update rate unless the app interpolates itself.
Package version
0.11.0