-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
[Bug]: images not being stretched? #3313
Comments
@thomasgrivet can you explain this a bit further:
Images are resized by stretching the parts that specified. So being resized but not being stretched, doesn't make sense to me. Can you explain? |
Hello! Sorry for the confusion, what I meant was that even though the pin image is being resized to fit the text, I would have expected it to have some spacing around my text (8px horizontally with |
stretch doesn't add padding, it just means that For that you can use content or https://rnmapbox.github.io/docs/components/SymbolLayer#icontextfitpadding https://docs.mapbox.com/mapbox-gl-js/example/add-image-stretchable/ |
Thanks for the quick answer! |
Mapbox Implementation
Mapbox
Mapbox Version
default
Platform
iOS
@rnmapbox/maps
version10.1.15
Standalone component to reproduce
Observed behavior and steps to reproduce
Hello, the 'pin' image is being resized to fit the text, but is not being stretched. Did I miss something? Thanks!
![Simulator Screenshot - iPhone 15 - 2024-01-11 at 08 22 11](https://private-user-images.githubusercontent.com/18561703/295826215-cb35c9b7-5a62-420b-b8b7-a8f2140ca930.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NjI1OTksIm5iZiI6MTczOTQ2MjI5OSwicGF0aCI6Ii8xODU2MTcwMy8yOTU4MjYyMTUtY2IzNWM5YjctNWE2Mi00MjBiLWI4YjctYThmMjE0MGNhOTMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE1NTgxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM5NjAyOTA5NmExNWUwZjAxZmZlMzlhN2Q2ZWQyYjdlYzBjODQ5MmIxYWVjNjNhMjMzZGEzMDQ2NjdmYzVlN2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.SlYSliI0ykOKA66rOp9ohyIFLGStL_oGjNEh8bcmTTY)
Expected behavior
There should be a padding of 8px vertically & 4px horizontally
Notes / preliminary analysis
No response
Additional links and references
I have created a minimum reproductible example here : https://github.com/Cocolis-1/blank-expo/tree/feat/mapbox-stretchable-images
If you want to try it, you have to edit the
MAPBOX_DOWNLOAD_TOKEN
inapp.json
and theMAPBOX_TOKEN
inMap.tsx
.To create a dev client, run
eas build --profile development -p ios --local
, please ping me if you need any help, thanks!The text was updated successfully, but these errors were encountered: