Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Point annotations generating error in v11 #3121

Closed
balloman opened this issue Oct 19, 2023 · 15 comments · Fixed by #3261
Closed

[Bug]: Point annotations generating error in v11 #3121

balloman opened this issue Oct 19, 2023 · 15 comments · Fixed by #3261
Labels
upstream the bug source is a bug in native mapbox gl v11

Comments

@balloman
Copy link
Contributor

balloman commented Oct 19, 2023

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

https://github.com/mapbox/mapbox-maps-ios/blob/main/Sources/MapboxMaps/Documentation.docc/Migrate%20to%20v11.md#24-map-content-gesture-system

@balloman
Copy link
Contributor Author

Any updates?

@balloman
Copy link
Contributor Author

@mfazekas Have you figured out anything? I've spent a few days investigating and haven't figured this error out

@mfazekas
Copy link
Contributor

@balloman sorry didn't have time look. Sounds like an upstream issue

@mfazekas
Copy link
Contributor

I've reported the error as mapbox/mapbox-maps-ios#2058 to upstream, but could not reproduce in the native mapbox app.

@mfazekas
Copy link
Contributor

Also mapbox/mapbox-maps-ios#2059 that causes the issue with tap handlers

@Infinity1high
Copy link

Infinity1high commented Jan 31, 2024

Seems the issue still exists on ios in the last version @rnmapbox/maps 10.1.9. using v11 MapLoad error Source RNMBX-mapview-point-annotations_drag is not in style

@Ritik5Prasad
Copy link

Any fixes ??

@valn1
Copy link

valn1 commented Feb 5, 2024

i tried the latest version and still does not fix the issue @mfazekas
is there any patch we can apply to fix it temporarily?

@mfazekas
Copy link
Contributor

mfazekas commented Feb 6, 2024

@valn1 the bugreport had two issues: one the log issue was not fixed, the other unselect should be fixed.

As a workaround for the log issue you should be able to filter this one out with Logging callbacks.

@talesborn
Copy link

talesborn commented Feb 16, 2024

Any news?

I updated to the version released two days ago, but there is still no solution for this problem

@gabrielsalvi
Copy link

Any workaround on this problem?? I'm using the last released version

@marktfaust
Copy link

updates?

@RemiHin
Copy link

RemiHin commented Mar 6, 2024

still running in to this issue, im on 10.1.18

@mfazekas
Copy link
Contributor

mfazekas commented Mar 6, 2024

Pls see #3121 (comment)

@number1hustler
Copy link

number1hustler commented May 9, 2024

I am also seeing this issue

Here is a pretty poor work around for now:

  Mapbox.Logger.setLogCallback((log) => {
    // remove Source RNMBX-mapview-point-annotations_drag
    if (
      log.message.includes('RNMBX-mapview-point-annotations_drag') ||
      log.message.includes('RNMBX-mapview-callouts_drag')
    ) {
      return true;
    }
    return false;
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream the bug source is a bug in native mapbox gl v11
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants