[Bug]: StyleImport overrides styleURL and fails over to default basemap
Open
Nobody has claimed this yet.
bug 🪲
- Dominant language
- Kotlin
- Stars
- 2.9k
- Forks
- 947
- Avg merge
- 6d 37m
- Merged PRs (30d)
- 1
Description
Mapbox Version
default
React Native Version
0.83.2
Platform
iOS
@rnmapbox/maps version
10.3.0
Standalone component to reproduce
import React from 'react';
import {
MapView,
StyleImport,
Camera,
} from '@rnmapbox/maps';
const styleUrl = ""
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}} styleURL={styleUrl}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<StyleImport
id="basemap"
existing
config={{
lightPreset: 'night',
}}
/>
</MapView>
);
}
}
Observed behavior and steps to reproduce
No response
Expected behavior
Changes current style's lightPreset
Notes / preliminary analysis
No response
Additional links and references
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the standalone JavaScript example using MapView, StyleImport, and Camera on iOS with @rnmapbox/maps 10.3.0 and React Native 0.83.2. Reproduce the case with an empty styleURL and existing StyleImport, then verify that lightPreset changes the current style rather than falling back to the default basemap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100