-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic mapbox style example not working #96
Comments
@Calvein are you using https://github.com/mxstbr/react-boilerplate/issues by a chance? I'm experiencing the same problem with this boilerplate. However, after I build and open a minified version of the app, the map shows up in full. The same applies when instead of defining the style as a string, I use my custom style that is inside Will work on MWE now. |
I'm not, we're using our default boilerplate. It's working correctly when we're using an Immutable style though. import Immutable from 'immutable'
import rasterTileStyle from 'raster-tile-style'
const tileSource = 'http://a.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=' + mapboxApiAccessToken
const mapStyle = Immutable.fromJS(rasterTileStyle([tileSource])) |
Thanks for the hint @Calvein - raster tiles to seem to work. I'm still investigating what's wrong with the vector data here: |
I am going to close this as slightly off-topic, as no specific react-map-gl bugs are mentioned. FWIW, there are now instructions from Mapbox on how to build with webpack, see README. |
Nice! Here's a direct link for those who feel lazy going there in a few hops: |
Hi, I'm having issues with changing the
mapStyle
to a mapbox url.Here's my example with script tags and without React:
it works has intended, but the same-ish basic example with react-map-gl doesn't work properly (they both use the same
MAPBOX_API_ACCESS_TOKEN
):The map is here and I can interact with it (because I have another layer on top in my real example), but the tiles aren't loading, I just have a grey-ish color which seems to be the background color of the style (because it changes if I change
mapStyle
).Any idea why ?
The text was updated successfully, but these errors were encountered: