Giter Site home page Giter Site logo

Comments (5)

Splicer97 avatar Splicer97 commented on June 10, 2024

Hello! This map not use any api key. I'm not sure that you can use this map with Expo. Try with native CLI project.

from react-native-osmdroid.

firepked avatar firepked commented on June 10, 2024

Hey, first of all thank you for the quick answer.

I know that this component does not require an API key.

I have an programmed APP with the Expo Framework. I have difficulties to get an API key from Google.

I have replaced the original Mapview component 1to1 with this one.
It is not possible to debug with Expo GO, however the compiled version seems to work.

I was able to solve the crash I mentioned before by looking at the system log. The cause was as follows:

com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'region' of a view managed by: OsmMap
...
Caused by: com.facebook.react.bridge.NoSuchKeyException: longitudeDelta

For some reason I must have passed an empty object, or an object containing only the latitude and longitude.

I created a state that I set with a UseEffect on the original location variable and set longitudeDelta/latitudeDelta if it is null/undef.

Maybe it would be useful to handle this error for other users, since these values only determine the zoom, right?

The app "runs" with this fix before, however radius and other things are not displayed correctly. I'll have to take a closer look at that. Something about the Z-index was also in the readme from you I guess.

For the original problem I don't have a solution yet, probably it will be like you said, however I can't create a native project since the app is already finished.

I'll get back to here if I've found a solution or not.

First of all thanks for your work!

from react-native-osmdroid.

firepked avatar firepked commented on June 10, 2024

I didn't want to close sorry

from react-native-osmdroid.

Splicer97 avatar Splicer97 commented on June 10, 2024

I didn't want to close sorry

Deltas is necessary for this map. Expo Go not working with native libraries like this, you can use expo bare workflow if you want use expo with this library.

from react-native-osmdroid.

Splicer97 avatar Splicer97 commented on June 10, 2024

I didn't want to close sorry

Anyway, Thank you for feedback!

from react-native-osmdroid.

Related Issues (3)

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.