I'm using the react-map-gl package from Uber, but even after trying it for a few days, haven't been able to get it to work.
I'm not trying to do anything fancy (yet) - for now, I simply want a map to appear on my page. I figured that once I got that step to work, I can try more advanced things.
Unfortunately, this is all I see:
Any suggestions?
Here's the relevant section of my code (from the .jsx file):
import React from 'react'
import { connect } from 'react-redux'
import MapGL from 'react-map-gl'
const App = React.createClass({
render: function () {
const map = (
<div>
<MapGL
width={700}
height={450}
latitude={37.78}
longitude={-122.45}
zoom={11}
mapStyle={'mapbox://styles/mapbox/basic-v9'}
mapboxApiAccessToken={'pk.ey...<removed for privacy>...'}
/>
</div>
)
return (
<div>
=======Map should be below=======
<br/>
{ map }
<br/>
=======Map should be above=======
</div>
)
}
})
export default connect()(App)
Everything else on my site works; the only thing missing is that the map does not actually appear. Thanks in advance for any help provided.