mapbox / mapbox/mapbox-navigation-ios

Allow intermediate waypoints to be marked by annotations

Open
#1,993 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

By default, the final destination is marked on the map by a non-view-backed annotation, while intermediate waypoints’ markers are implemented using runtime styling (with a shape source, symbol style layer, and circle style layer). We originally used runtime styling for the intermediate waypoints out of expedience – there are built-in ways to render circles and numbers.

The developer can customize the runtime styling layers, but they can’t mark the intermediate waypoints using an annotation, view-backed or otherwise. So to make all the markers look consistent, the developer has to write two marker implementations, one using runtime styling and the other using an annotation.

Perhaps NavigationMapView could create an annotation and pass it into `MGLMapViewDelegate.mapView(_:viewFor:)` or `MGLMapViewDelegate.mapView(_:imageFor:)`; if the delegate responds with an MGLAnnotationView or MGLAnnotationImage, respectively, then add the annotation to the map and exclude that feature from the shape source. The default implementation would remain runtime styling–based, but the developer would have the flexibility to implement a more sophisticated waypoint marker.

/ref https://github.com/mapbox/mapbox-navigation-ios/pull/270#discussion_r132098089

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with NavigationMapView’s intermediate waypoint rendering and the referenced PR #270 discussion. Review how the shape source and symbol and circle style layers are used, then assess the mapView(_:viewFor:) and mapView(_:imageFor:) delegate paths. Done means developers can provide annotation-backed waypoint markers while the default runtime-styling behavior remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.