Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

238
Views
React-map-gl with mapbox on NodeJS map -- map is not showing up

I was following a youtube tutorial and followed the steps exactly, however, my map does not seem to work. I get a blank screen even when I put my own access token in. Ive tried following other tutorials and I get the same issue. When I go on the react-map-gl website and follow their example, it also does not work. I have tried debugging this for hours and I would really appreciate any advice on how to proceed. For reference here is my code:

import { useState } from 'react';
import ReactMapGL from 'react-map-gl';

function App() {
    const [viewport, setViewport] = useState({
        width: 400,
        height: 400,
        latitude: 37.7577,
        longitude: -122.4376,
        zoom: 8
    });

  return (
    <div className="App">
        happy
        <ReactMapGL
        {...viewport}
        mapboxAccessToken ={'pk.eyJ1IjoiZGFuaXlhbG1vaGEiLCJhIjoiY2wyNnBsdHpnMDF0YTNqc2VibTd2OGhhcSJ9.ASJaKcGz1eIhWr38-askQQ'}
        onViewportChange={nextViewport => setViewport(nextViewport)}
        />
        sad
    </div>
  );
}

export default App;

and here is what I see on my screen:

what I can see on my screen

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!