Code Monkey home page Code Monkey logo

Comments (4)

Kewal89 avatar Kewal89 commented on May 18, 2024

It's probably because MapBox Location parameters (latitude and longitude) are standardized in that way.
Even <MapboxGL.Camera /> centerCoordinate props needs [lng, lat] as value.
Interchanging them will result in blank or incorrect response.

from react-native-mapbox-navigation.

zoolle avatar zoolle commented on May 18, 2024

That's fine but at least we can put in component, [lat, lng] format and then handled from behind in mapbox standard. For example I am using Google maps to get the coordinates of origin and destination and I am passing origin and destination as objects the way Google maps generates it

from react-native-mapbox-navigation.

Kewal89 avatar Kewal89 commented on May 18, 2024

Yeah. Not Sure But You Could Try array.reverse() or [...array].reverse() To Make It Work.

from react-native-mapbox-navigation.

rossmartin avatar rossmartin commented on May 18, 2024

This is an artifact of how this library evolved and also to stay consistent with @react-native-mapbox-gl/maps. I do agree that it really should be [lat, lng] but I don't plan to change this (for now at least). It is documented here and also with @react-native-mapbox-gl/maps. If I do change it to [lat, lng] I'll document the breaking change and do a major version bump.

from react-native-mapbox-navigation.

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.