-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
How to scale / stretch the map well? #13117
Comments
Hi @fungiboletus, Could you please try using the transform: matrix(...); This issue tracker is for reporting bugs and feature requests, so you might also consider posting your question to https://stackoverflow.com/questions/tagged/mapbox-gl-js to ask the community for help. |
Thanks for your answer. I can try to use the transform CSS property, but should I expect different results? Isn't I created an issue because it did look like questions are accepted and an issue template: https://github.com/mapbox/mapbox-gl-js/blob/da16653d5592094948691110789cb506ae7731e1/.github/ISSUE_TEMPLATE/Question.md I can try StackOverflow, but I need a few more days of hard struggles before going there. It's very much my last resort. 🙂 |
@fungiboletus My bad, the Lines 3358 to 3362 in da16653
|
Oooh, that's neat. I didn't think MapBoxGlJS would read the values from the CSS transform. I checked the content of my matrix (set with a Thanks a lot for the help, I feel better about my CSS hack now. |
Hi,
I would like to change the aspect ratio of the map. Let's say I want it to be twice as wide than the standard projection.
I could apply a CSS
transform: scaleX(2)
ortransform: scaleY(0.5)
but it's not ideal: it renders using another resolution and the result is blurry.I think it could be possible to change some maths somewhere to have a non square ratio. I try to find something into the internal
transform
andcamera
objects, but without look so far. I'm wondering where I could apply the aspect ratio without breaking everything.Do you have any suggestion?
The text was updated successfully, but these errors were encountered: