Comments (6)
@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 Immutable
object.
Will work on MWE now.
from react-map-gl.
MWE:
https://github.com/kachkaev/react-boilerplate-react-map-gl-mwe
from react-map-gl.
I'm not, we're using our default boilerplate. It's working correctly when we're using an Immutable style though.
FYI, I'm using this right now (it's using mapbox's raster tiles instead of vector, not perfect at all :/):
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]))
from react-map-gl.
Thanks for the hint @Calvein - raster tiles to seem to work. I'm still investigating what's wrong with the vector data here:
react-boilerplate/react-boilerplate#784
from react-map-gl.
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.
from react-map-gl.
Nice! Here's a direct link for those who feel lazy going there in a few hops:
https://github.com/mapbox/mapbox-gl-js#using-mapbox-gl-js-with-webpack
from react-map-gl.
Related Issues (20)
- [Bug] Draw Polygon calls onClick for Map when drawing
- [Bug]Returning response json source not drawing Markers on map. HOT 2
- [Bug] geojson example is not redirecting to source
- Uncaught TypeError: Cannot read properties of null (reading 'point') HOT 4
- [Bug] Fog & marker issue - getOpacityAtLatLng HOT 2
- Canvas width/height don't update when container's width/height are changed HOT 5
- [Bug] Quickly double-clicking on maps prevents zooming in HOT 1
- Updating the accessToken doesn't update the API call and crash HOT 1
- [Bug] Can't set configuration property for map HOT 1
- [Bug] CORS Error on electron HOT 1
- [Feat] Custom map.querySourceFeatues Renderer HOT 2
- Support Maplibre GL JS 4.x HOT 2
- [Bug] missing advanced example for geocoder HOT 2
- [Bug] ssr support missing example to await for geocoder results HOT 3
- [Bug] incompatible dom objects within the react landscape HOT 4
- When setting maxZoom and dragging map around markers are moving all over the place [Bug] HOT 1
- [Bug] [docs] Link to MapLibre API docs are broken
- [Feat] Add support for latest Mapbox rendering release (V3) HOT 1
- [Bug] Input data given to 'xxx' is not a valid GeoJSON object
- [Bug] Map loading issue on resizing width HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-map-gl.