Wrong position of MarkerView
See original GitHub issueEnvironment
- Mapbox (GL) implementation: v10
- Mapbox (GL) version: 10.7.0
- @rnmapbox/maps Version #main
- Platform: iOS
- React Native Version 0.69.4
- Platform OS: iOS 15
- Device: iPhone X
- Emulator/ Simulator: simulator and physical device
- Dev OS: macOS Monterey 12
Standalone component to reproduce
import React from 'react';
import { View } from 'react-native';
import {
MapView,
ShapeSource,
Camera,
CircleLayer,
MarkerView,
} from '@rnmapbox/maps';
const coordinate = [30.319378097536216, 59.879647222152855];
const BugReport = () => (
<MapView style={{ flex: 1 }}>
<Camera
defaultSettings={{
centerCoordinate: coordinate,
zoomLevel: 16,
}}
/>
<ShapeSource
id='point'
shape={{
type: 'Point',
coordinates: coordinate,
}}
>
<CircleLayer
id='circle'
style={{ circleRadius: 10, circleColor: 'black' }}
/>
</ShapeSource>
<MarkerView id='marker' coordinate={coordinate}>
<View
style={{
width: 60,
height: 60,
borderRadius: 30,
backgroundColor: 'rgba(255,0,0,0.5)',
}}
/>
</MarkerView>
</MapView>
);
Observed behavior and steps to reproduce
Expected behavior
Notes / preliminary analysis
PointAnnotation
displays perfectly
I think it’s because initialized with wrong bounds (should be 60 instead of 375)
Issue Analytics
- State:
- Created a year ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
The last MarkerView x-position is wrong. · Issue #2832 - GitHub
My requirement is The actual result is The ONLY last MarkerView x-position is wrong. Here is my MarkerView class: public class ...
Read more >MarkerView goes out of the chart for the last point on the chart
I have found a simple solution to this issue. You need to set chart in your custom marker view as below: setChartView(chart);.
Read more >Overview | Maps JavaScript API - Google Developers
With Advanced Markers, you can customize the default marker's background, border, and glyph color, adjust marker size, and replace the default marker icon...
Read more >Work with markers in Mapbox.js | Help
In this guide, we'll show how to add markers, customize them, and make them interactive with Mapbox.js. Think of this guide as a...
Read more >Introduction to React Native Maps - LogRocket Blog
Having accurate information about your users' location is a great way ... android:name="org.apache.http.legacy" android:required="false"/> ...
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
Since there is an example that reproduces the issue against the current HEAD, it seems that this issue should be reopened.
I don’t think I’ll be able to test anytime soon, but there’s a good possibility that #2203 has resolved this issue. Maybe someone who’s reproduced this issue prior to that changeset could verify?