Skip to content

[Bug]: iOS: localizeLabels not adopted when changing map style #3302

@cixio

Description

@cixio

Mapbox Implementation

Mapbox

Mapbox Version

default

Platform

iOS

@rnmapbox/maps version

10.1.3

Standalone component to reproduce

import React from 'react';
import {
	Button,
	SafeAreaView,
} from 'react-native';

import Mapbox from '@rnmapbox/maps';

const App = () => {
	
	const map_a = 'mapbox://styles/mapbox/streets-v12'; 
	const map_b = 'mapbox://styles/mapbox/outdoors-v12';
	
	const [mapStyle, setMapStyle] = React.useState(map_a);
	const [localizeLabels, setLocalizeLabels] = React.useState();
	
	const changeMap = () => {
		setMapStyle((mapStyle==map_a)?map_b:map_a);
	}
	
	return (
		<SafeAreaView style={{flex: 1}}>
			<Button onPress={changeMap} title={'change map'} />
			<Mapbox.MapView
				style={{ flex: 1}}
				localizeLabels={{ locale: 'de' }}
				styleURL={mapStyle}
			>
			</Mapbox.MapView>
		</SafeAreaView>
	);
  
}

export default App;

Observed behavior and steps to reproduce

when changing map the labels change to english (on a german device)

Expected behavior

labels language should be as definied in localizeLabels

Notes / preliminary analysis

working on android with a little blink

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions