Skip to content

[Feature]: Allow the location indicator (chevron) to be replaced with a custom image #762

Description

@mikamootz

Is there an existing issue for this?

  • I have searched the existing issues

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:

  1. A bitmap for the location indicator, in the shape markers already take —
    registerBitmapImage() plus rotation, anchor and a flat flag.
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

native sdk issueIssue is in the underlying native Android or iOS SDKpriority: p3Desirable enhancement or fix. May not be included in next release.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions