Skip to content
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

Map Box map not showing on production #1323

Closed
htimran opened this issue Feb 2, 2021 · 1 comment
Closed

Map Box map not showing on production #1323

htimran opened this issue Feb 2, 2021 · 1 comment

Comments

@htimran
Copy link

htimran commented Feb 2, 2021

I am facing an issue with the production environment, on my localhost map is working fine, but on production, it is not showing, just grey area with marker and footers.
the code and Image of the map are given below respectively.

import ReactMapGL, { Marker } from 'react-map-gl';

const [viewport, setViewport] = useState({
  latitude: 31.582045,
  longitude: 74.329376,
  width: '70vw',
  height: '100vh',
  zoom: 10,
});
const coordinates = {
    latitude: 31.3821,
    longitude: 74.1886,
  };
<ReactMapGL
  {...viewport}
  mapboxApiAccessToken={'pk.et.... Access Token................'}
  mapStyle="mapbox://styles/thingtrax/ckknlj19x5u6d17o68yxd7zol" // stylesheet location
  onViewportChange={viewport => {
    setViewport(viewport);
  }}
>
  <Marker
    key={1}
    latitude={coordinates.latitude}
    longitude={coordinates.longitude}
  >
    <img
      src={mapMarker}
      onClick={e => {
        e.preventDefault();
      }}
    />
  </Marker>
</ReactMapGL>

Image
image

@Pessimistress
Copy link
Collaborator

Pessimistress commented Feb 2, 2021

#1266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants