GithubHelp home page GithubHelp logo

Comments (6)

kachkaev avatar kachkaev commented on May 13, 2024

@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.

kachkaev avatar kachkaev commented on May 13, 2024

MWE:
https://github.com/kachkaev/react-boilerplate-react-map-gl-mwe

from react-map-gl.

Calvein avatar Calvein commented on May 13, 2024

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.

kachkaev avatar kachkaev commented on May 13, 2024

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.

ibgreen avatar ibgreen commented on May 13, 2024

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.

kachkaev avatar kachkaev commented on May 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.