nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

Impossible to use custom maps #1432

Closed cuscomcorp closed 5 years ago

cuscomcorp commented 5 years ago

Hi.

The problem is simple. I created a custom map in Mapbox studio but I can't integrate it into my react-native app. It works perfectly with the Dark / Light / Default maps but when I use my own custom map URL I get a grey screen.

Here is my code. I replaced sensible data with '#'.

capture d ecran 2018-11-22 a 12 04 02

Here is a screenshot of the result.

capture d ecran 2018-11-22 a 12 01 26

Could you help me?

mfazekas commented 5 years ago

I have the same issue, i've tried tested the same access token + mapbox url in a .html and it worked fine, but not from react-native-mapbox-gl

kristfal commented 5 years ago

Your style likely uses features that are not supported by the react native mapbox project. That will be fixed in 7.0.0, but in the mean time, you’ll have to identify which parts of your custom style that is unsupported and alter/remove it.

mfazekas commented 5 years ago

FWIW it did not display for me when i used the "Basic" template, but worked when i used "Streets".

alaurenz commented 5 years ago

I'm finding as similar issue with my custom styles. One pattern I'm finding is that the React Native SDK wont render any layers where I use the "style with data conditions" feature. Is there any work around for this?

matthieucan commented 5 years ago

Your style likely uses features that are not supported by the react native mapbox project. That will be fixed in 7.0.0, but in the mean time, you’ll have to identify which parts of your custom style that is unsupported and alter/remove it.

@kristfal Which version is supported by 6.x.y? Using the Compatibility tool of Mapbox Studio and choosing the lowest possible version of Mapbox GL JS doesn't fix the problem for me.

Also, side question: is there an approximative ETA for 7.0.0?

systemlevel commented 5 years ago

Custom styles not working here either. Streets map work just fine. After switching to a custom style it's blank.

alaurenz commented 5 years ago

Custom styles not working here either. Streets map work just fine. After switching to a custom style it's blank.

I've found that custom styles can work with the RN library but the styling syntax is limited. For example if you import a source and apply filtering the UI will generate filtering syntax that is incompatible with the latest version of the RN library. I havent tested things extensively but I think it helps to use the Compatibility setting in the right menu, I set the Mapbox GL one to 0.43.0. It seems like Mapbox should add a dropdown for the RN library, however.

nitaliano commented 5 years ago

this RN library is a major version behind, so if you're doing thing in studio you need to make sure you're not using expressions and things will work

systemlevel commented 5 years ago

The issue I'm running into now is that is seems that react-native-mapbox-gl is so far behind at this point that even the Outdoors basemap offered by Mapbox Studio as the starter basemap does not work at all in react-native-mapbox-gl. Without any modifications to the basemap offered by Mapbox Studio I get the following results:

screen shot 2019-02-12 at 3 11 34 pm
kristfal commented 5 years ago

This is a known issue, and sorry for this.

Honestly, we're in a bit of a limbo right now between ownerships of the repo. Mapbox just dropped official support, so either @nitaliano wraps up the release that contains fixes for this, or the company I'm working will figure out a way forward. The latter will likely take a bit of time.

systemlevel commented 5 years ago

@kristfal thank you for the update. Much appreciated. I think I speak on behalf of many here when I say I hope we can all figure out a way forward. Thanks again.

timhilgenstoehler commented 5 years ago

Any Updates on this?

engelzero commented 5 years ago

@kristfal any updates from your team re this issue? cc @nitaliano

lpfunding commented 5 years ago

@kristfal @nitaliano do we have any progress on these issues?

alexichristakis commented 5 years ago

@lpfunding development has been moved to: https://github.com/react-native-mapbox/maps

lpfunding commented 5 years ago

@alexichristakis why? and what is ETA of 7.0?

kristfal commented 5 years ago

7.0.0-rc1 is now available in the new repo and on NPM. That should resolve all issues mentioned in this issue.

lpfunding commented 5 years ago

Is there a document which shows an overview over the changes which need to happen for the transition to work? For example, I noticed that stylesheet changed quite drastically...

mfazekas commented 5 years ago

@lpfunding see https://github.com/react-native-mapbox-gl/maps/blob/master/CHANGELOG.md

lpfunding commented 5 years ago

Thanks @mfazekas, I'm getting two additional issues:

1) There is an issue with the filter in symbol layer, and in circle layer, which causes my app to freeze and break.

2) Secondly, in styles, the new way of getting the size/colour/radius of my icons/circles also causes my app to freeze and break.

Working environment:

iPhone: X React: 16.8.6 React-Native: 0.59.8 xcode: 10.2.1