[Bug]: When projection globe, maxZoomLevel of camera gets ignored
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 Implementation
Mapbox
Mapbox Version
10.17.0
React Native Version
0.73.8
Platform
iOS
@rnmapbox/maps version
10.1.24
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView projection={'globe'} style={{flex: 1}}>
<Camera maxZoomLevel={22} centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
THe maxZoomLevel prop from <Camera /> gets igonored. No matter what I fill in here, the ability to zoom out is not affected by it.
Expected behavior
I expect the maxZoomLevel prop to affect the ability to (max) zoom.
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 BugReportExample using MapView projection="globe" and Camera maxZoomLevel={22} on iOS. Trace how the Camera maxZoomLevel prop is handled with globe projection, then verify that the prop limits zooming as expected in the reported versions.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100