Closed jbixon13 closed 4 years ago
I'm a bit confused by this PR actually - where is the element with class "mapboxgl-map"?
I think the example of options is a good idea to have on both examples - so lets do that :)
that css class refers to the map container as is created by mapbox - see the first line:
I used that css class selector to make my map fullscreen which is a little more complicated than the example I included but has the same concepts:
:global(.article .mapboxgl-map) {
height: 100vh;
width: 100vw;
position: relative;
left: calc(-50vw + 50%)
}
Ah okay - then I think your example is wrong. You need the :global
selector :)
good point, I assumed that was only needed for my use-case because all of my styles on that page are globally scoped. You're correct though because I tried to use the same css class without the global and it didn't work. I'll update accordingly and add the options example as well
Added example of troubleshooting map render. Additionally, I considered adding an example of options on the base map as I didn't even notice there was already an example on GeolocateControl:
It would look something like:
Let me know if you think it's redundant; I'll note I think I didn't notice the existing example on GeolocateControl because I knew I just wanted to get a basic example working and didn't want geolocation.