How to resize() Mapbox canvas without preserving original center?
I have a mapbox map set up with resize() during transition working fine. I know the resize() function will try to keep the original center as it’s resizing (For example, A city that was in the center of the map will still be at the center when the mapContainer size is doubled) However, I don’t want this effect and would rather have the same location be at the same screen position instead. How would I be able to do this without setting setCenter() right after every resize? I have tried setCenter but it makes it look incredibly clunky. I’ve attached a picture description of effect I would like to have. (circle represents a location)
I’ve tried searching through resize documentation but nothing really seemed to help where I could disable the center option. I would appreciate any help I can get! Thank you!
maplibre: Why sometimes does not trigger the map.on(‘load’,()=>{}) callback?
As I described in on load method: Occasionally the load method does not trigger a callback, the on-load event callback sometimes fires unactively when the layer data source is slow to load or when the amount of data is large. Why? Do you have any suggestions help me