maps: [Bug]: Point annotations generating error in v11
Mapbox Implementation
Mapbox
Mapbox Version
11.0.0-beta.4
Platform
iOS
@rnmapbox/maps version
10.1.0-beta.11
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
PointAnnotation
} from '@rnmapbox/maps';
import { View } from 'react-native';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<PointAnnotation id="someId" coordinate={[-74,40.71]}>
<View style={{ backgroundColor: "red", width: 30, height: 30 }} />
</PointAnnotation>
</MapView>
);
}
}
Observed behavior and steps to reproduce
Using code like this generates the error Mapbox error MapLoad error Source RNMBX-mapview-point-annotations_drag is not in style {"level": "error", "message": "MapLoad error Source RNMBX-mapview-point-annotations_drag is not in style"}
Expected behavior
There is no error.
Notes / preliminary analysis
It seems additionally, that the onselect prop does not work also, at least I can’t get it to respond to any touches at all. The new updates to v11 on iOS do mention the use of a new drag handler, so this might be the root of the issue.
Additional links and references
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (7 by maintainers)
I am also seeing this issue
Here is a pretty poor work around for now: