Giter VIP home page Giter VIP logo

Comments (9)

VovkViktor avatar VovkViktor commented on June 4, 2024 3

I noticed that it happens if "coordinates" prop array length less than 2

from maps.

stalteri avatar stalteri commented on June 4, 2024 3

I noticed that it happens if "coordinates" prop array length less than 2

You are right, there no crash if I render ShapeSource only if coordinates length > 1

from maps.

mfazekas avatar mfazekas commented on June 4, 2024

Thanks for the report, I wasn't able to reproduce the issue in our env.
What is your RN version?

image

from maps.

stalteri avatar stalteri commented on June 4, 2024

Thanks for response.

What is your RN version?

0.73.4
Android 13

from maps.

mfazekas avatar mfazekas commented on June 4, 2024

@stalteri I see our app uses 0.73.4 as well. Can you try to reproduce in our example app, or a new app created with npx react-native init?

from maps.

stalteri avatar stalteri commented on June 4, 2024

@stalteri I see our app uses 0.73.4 as well. Can you try to reproduce in our example app, or a new app created with npx react-native init?

Ok, I'll try to reproduce asap.

from maps.

stalteri avatar stalteri commented on June 4, 2024

@mfazekas

@stalteri I see our app uses 0.73.4 as well. Can you try to reproduce in our example app, or a new app created with npx react-native init?

Screen_Recording_20240221_105904_RNMapboxGLExample.mp4

P.S. I forget to add a "draggable" prop to PointAnnotation in the component to reproduce (alredy edited).

from maps.

VovkViktor avatar VovkViktor commented on June 4, 2024

I crashed too when I used ShapeSource with prop shape type 'LineString'. RN 0.73.5, "@rnmapbox/maps": "^10.1.18" and "@rnmapbox/maps": "^10.1.19"

 <MapboxGL.MapView
              ref={refMap}
              style={{flex: 1, width: '100%'}}
              styleURL={MapboxGL.StyleURL.Street}>
              <MapboxGL.ShapeSource
                id="lineSource"
                buffer={32}
                shape={{
                  type: 'LineString',
                  coordinates: locations,
                }}>
                <MapboxGL.LineLayer
                  id="lineLayer"
                  sourceID="lineSource"
                  style={{lineColor: 'blue', lineWidth: 3}}
                />
              </MapboxGL.ShapeSource>
              <MapboxGL.UserLocation
                visible={true}
                animated={true}
                androidRenderMode="gps"
              />
              <MapboxGL.Camera
                ref={cameraRef}
                allowUpdates={true}
                followUserLocation={true}
                animationMode="moveTo"
                animationDuration={200}
                followZoomLevel={16}
                defaultSettings={{
                  zoomLevel: 16,
                }}
              />
            </MapboxGL.MapView>

Also I created a new empty project on RN and installed only MapBox package. It isn't work too
image
image

from maps.

wrldh avatar wrldh commented on June 4, 2024

Just had the same issue with version 10.1.21 and the reason is exact the same as described above (only one Position in ShapeSource's coordinates).

from maps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.