mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.35k stars 1.33k forks source link

null is not an object (evaluating 'MapboxGL.StyleURL') #16523

Closed rhaegar453 closed 3 years ago

rhaegar453 commented 3 years ago

Steps to reproduce

1.Create a new react native project (react native init) 2.Follow the steps in the following article by Mapbox https://github.com/react-native-mapbox-gl/maps/blob/master/docs/GettingStarted.md

Expected behavior

The map should appear on the screen. But it gives me the following error

Actual behavior

image

Configuration

Mapbox SDK versions: "@react-native-mapbox-gl/maps": "^8.1.0-rc.2",

iOS/macOS versions: iOS Device/simulator models: iOS 11 Xcode version:

rhaegar453 commented 3 years ago

Got it. The issue was that I had not linked the modules after installing them. This is an important step which was not mentioned in the article