[Feature request]: Support custom marker icons (bitmap/URI) via icon field in MarkerOptions
Mantenedores costumam responder em até 5 dias
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Is there an existing issue for this?
- I have searched the existing issues
Use case
addMarker() via MapViewController only renders the default Google Maps pin regardless of what MarkerOptions is passed. There is no way to supply a custom image as the marker icon through the JS layer.
This is a blocking limitation for any app that needs to differentiate markers visually — the most common real-world case being live location sharing, where each member's marker should display their profile photo rather than an indistinguishable default pin.
Concrete scenario: In a group coordination app where 8 users share live location on the same NavigationView, all 8 markers render as identical red pins. There is no way to tell who is who without tapping each one individually. A custom avatar icon per member solves this entirely.
Alternatives considered:
Rendering an RN View as an overlay — Possible for static UI, but overlays are not anchored to map coordinates and don't move correctly with map pan/zoom/tilt. Not a real substitute for a native map marker.
react-native-maps — Supports custom marker icons but is a completely separate library. It cannot be used alongside @googlemaps/react-native-navigation-sdk on the same map surface, as both require owning the map view.
No existing package solves this within the Navigation SDK's MapViewController surface.
The underlying native SDKs fully support this — BitmapDescriptorFactory.fromBitmap() on Android and GMSMarker.icon on iOS. The gap is only in the React Native wrapper not exposing it.
Proposal
Add an optional icon field to MarkerOptions that accept a URI string pointing to a local asset or remote image, passed through the JS-to-native bridge and applied as the marker's bitmap icon on both Android and iOS.
Proposed TypeScript change:
export interface MarkerOptions {
position: LatLng;
title?: string;
snippet?: string;
isVisible?: boolean;
isFlat?: boolean;
isDraggable?: boolean;
rotation?: number;
alpha?: number;
icon?: { uri: string }; // ← proposed addition
}
Expected usage:
mapViewController.addMarker({
position: { lat: 17.385, lng: 78.4867 },
title: 'Sannihith',
icon: { uri: 'https://example.com/avatar.jpg' },
});
Android (Kotlin) — intended implementation path:
kotlinval iconUri = markerOptionsMap.getString("icon_uri")
val markerOptions = MarkerOptions()
.position(LatLng(lat, lng))
if (iconUri != null) {
val bitmap = BitmapFactory.decodeStream(
URL(iconUri).openConnection().getInputStream()
)
markerOptions.icon(BitmapDescriptorFactory.fromBitmap(bitmap))
}
iOS (Swift) — intended implementation path:
swiftif let iconUri = options["icon_uri"] as? String,
let url = URL(string: iconUri),
let data = try? Data(contentsOf: url),
let image = UIImage(data: data) {
marker.icon = image
}
I am willing to implement the Android side and submit a PR. Happy to align on the preferred API shape before starting if maintainers have a different approach in mind.
- Linguagem predominante
- TypeScript
- Estrelas
- 226
- Forks
- 39
- Merge médio
- 1d 20h
- PRs com merge (30d)
- 7
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de googlemaps/react-native-navigation-sdk
-
[Support Request]: Status of Expo config plugin release (prebuild fails on 0.19.0)Talvez já em andamento @jokerttu assumiu há 2 dias. Aberta
googlemaps/react-native-navigation-sdk#711 · 1 responsável ·
Mantenedores costumam responder em até 5 dias
-
[Bug]: In-navigation notification can't be stoppedTalvez já em andamento @jokerttu assumiu há 8 dias. Abertatriage me type: bug
googlemaps/react-native-navigation-sdk#696 · 1 responsável ·
Mantenedores costumam responder em até 5 dias
-
[Bug]: [iOS] Navigation SDK init/quota retry loop pins the main thread; React Native's Settings module and addMarker's temporary GMSMarker add to the costTalvez já em andamento @illuminati1911 assumiu há 15 dias. Abertatriage me type: bug
googlemaps/react-native-navigation-sdk#687 · 1 responsável ·
Mantenedores costumam responder em até 5 dias
-
[Bug]: iOS crash in GMSObjectDataCache Core Data save (fatal optimistic locking failure)Talvez livre de novo @illuminati1911 assumiu há 61 dias e não há nenhum pull request aberto. Abertanative sdk issue
googlemaps/react-native-navigation-sdk#647 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 5 dias
-
[Bug]: CarPlay map view never sets GMSMapViewOptions.screen, so the navigation header and footer are sized for the phoneTalvez livre de novo @jokerttu assumiu há 74 dias e não há nenhum pull request aberto. Aberta
googlemaps/react-native-navigation-sdk#640 · 4 comentários · 1 reação · 1 responsável ·
Mantenedores costumam responder em até 5 dias
Todas as issues de googlemaps/react-native-navigation-sdk
Issues semelhantes
-
bug:unconfirmed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Heroic-Games-Launcher/HeroicGamesLauncher#6062 ·
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
Richard-Zhang1019/Crossbow#431 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
EKKOLearnAI/ekko-studio#3761 ·
Mantenedores costumam responder em até 1 dia
-
Per line discountAbertaenhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
ruyd/agentic-sdlc-lab#4 · 2 comentários ·