[Bug][MapboxV10] - Expo SDK45: Compass position and fade not working
See original GitHub issueMapbox Implementation
Mapbox
Mapbox Version
default
Platform
Android
@rnmapbox/maps
version
^10.0.0-beta.57
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 style={{flex: 1}} styleJSON={styleJSON}
animated={true}
zoomEnabled={true}
rotateEnabled={true}
scrollEnabled={true}
pitchEnabled={true}
compassEnabled={true}
compassFadeWhenNorth={false}
compassPosition={{ top: 80, right: 80 }}
logoEnabled>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
Hi,
When trying to change the position of the compass, it gets stuck at the top right. Same for the compassFadeWhenNorth props which is always true.
Thx, Cyril
Expected behavior
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 style={{flex: 1}} styleJSON={styleJSON}
animated={true}
zoomEnabled={true}
rotateEnabled={true}
scrollEnabled={true}
pitchEnabled={true}
compassEnabled={true}
compassFadeWhenNorth={false}
compassPosition={{ top: 80, right: 80 }}
logoEnabled>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Notes / preliminary analysis
No response
Additional links and references
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Migrate to v10 | Maps SDK | iOS - Mapbox docs
The Mapbox Maps SDK v10 introduces improvements to how Mapbox works on iOS platforms, as well as changes to how developers use the...
Read more >Compass is not showing in "edge-to-edge" mode #1295
You can experiment by grabbing my fork, building, and then launching the "Display the use's location" sample. For comparison, here is a video...
Read more >Camera animation not working when map is touched
I would like to perform a long press on the map and as soon as the long press is detected, move the center...
Read more >Untitled
Xps 13 developer edition docking station, School bus tiny house big living! ... Problem management process objectives, Banquette d'angle bar, Omkt llc, ...
Read more >frequent-ids - CodaLab Worksheets
... 2037 tags 2031 promo 2031 44 2021 45 2019 grid 2016 maincontent 2016 help ... 807 132 eur 132 issues 132 reservation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I tested with 10.0.0-beta.59 and I still the same problem. The props compassPosition don’t change the position.
Only compassViewPosition and compassViewMargins props working
Thx, Cyril
Solution finded.
With expo you need to set plugin in app.config.js (Not tested with typescript). in plugins array.
If you set the plugins in your app.json you don’t use V10
Only compass rotation is not refresh now