Incorporating the Mapbox JavaScript SDK into my VueJS app has been successful in displaying a map. Now, I am looking to enhance it by adding markers. According to this page, importing a CSS stylesheet is necessary for markers to function properly. I have attempted both methods recommended in the documentation:
within my Vue Componentimport 'mapbox-gl/dist/mapbox-gl.css';
placed in the<link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css">
<head>
section of myindex.html
However, upon implementing either of these approaches, the map disappears without any visible warnings or errors in the console. On the other hand, when excluding them, the map displays correctly but triggers a warning message:
This page seems to be lacking CSS declarations for Mapbox GL JS, potentially affecting the map's visual presentation. To rectify this, please ensure that your page contains mapbox-gl.css, as outlined in https://www.mapbox.com/mapbox-gl-js/api/.
I am unsure where I might be making a mistake. Could someone pinpoint what could be going wrong?