The Map component does not render attribution correctly when using the latest version of libraries. There are several issues.
Attribution is missing the copywrite symbols
Attribution is pushed off the map. If you set the map height to be 100% you won't see the attribution as it will be off screen. If you set map height to be 90% you will see the attribution off the bottom of the map.
Attached are pictures of how the attribution is getting rendered with the latest versions.
Expected Behavior
You would expect to see the attribution in a similar style as the this boiler plate
npx create-react-app test
cd test
npm install --save react-map-gl mapbox-gl
Replace App.js with below code
Replace the App.css with the below css code.
yarn start
App.js
import React from 'react';
import './App.css';
import Map, {NavigationControl, AttributionControl} from 'react-map-gl';
export default function App() {
const MAPBOX_ACCESS_TOKEN =
"My Super Fancy Key";
return (
<div id='app'>
<Map
initialViewState={{
latitude: 40,
longitude: -74.5,
zoom: 12
}}
style={{width: '100%', height: '90%'}}
mapStyle="mapbox://styles/mapbox/outdoors-v12"
mapboxAccessToken={MAPBOX_ACCESS_TOKEN}
attributionControl={true}
>
</Map>
</div>
);
}
Description
The Map component does not render attribution correctly when using the latest version of libraries. There are several issues.
Attached are pictures of how the attribution is getting rendered with the latest versions.
Expected Behavior
You would expect to see the attribution in a similar style as the this boiler plate
Steps to Reproduce
Option 1 - I have the repo -> https://github.com/nbroeking/mapbox-bug
Option 2 - Recreate from scratch
App.js
App.css
Environment
Logs
No errors