mapbox / mapbox/mapbox-navigation-android

How to set marker in version 10.12.1 of mapbox in android

Open
#7,094 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

mapboxMap.cameraState.center.also { positionLatLng ->
mapboxMap.markers.forEach { mapboxMap.removeMarker(it) }
mapboxMap.addMarker(MarkerOptions().position(positionLatLng))
onMapPositionSelected?.invoke(
Position(
positionLatLng.latitude(), positionLatLng.longitude(), getAccuracy(
positionLatLng.latitude(), positionLatLng.longitude()
)
)
)
}
I cannot setmarker using verison 10.12.1 version of mapbox any with solution

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 the shown mapboxMap.cameraState.center callback and the mapboxMap.markers, removeMarker, and addMarker calls, using Mapbox version 10.12.1. Reproduce the reported failure and inspect the applicable marker API or runtime error; done means a marker can be created at the selected camera position.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.