Search code examples
google-mapsexporeact-native-maps

How can I use any map (Google, Mapbox, etc.) without an API key to only render the map via React Native (expo) on phisical device?


I need to just show the map on my physical device without any functionality, but each map library needs an API key or something like that, maybe someone knows any use cases for any map library for simplicity? thx!


Solution

  • You need an API key if you want to use the map services.

    Alternatively, if you just want to point to a given pleace and display a map showing that place:

    1. Go to the map website with your browser (make sure to have the place you want in the middle of screen)
    2. Grab the address (url) from the browser
    3. In React Native, use an instance of a Webview targeting the URL just copied.

    The Webview inside your app will render the map as your browser does.