Bitmap: icon-size with Expression.match blurs the icon
Currently, when using style image (a bitmap) with icon-size which contains Expression.match expression, it blurs the icon. Please note that using Expression.literal(1f) works ok, but when this literal is in a match, the icon is blurred.
Steps to reproduce
- Take bitmap and put it into the style
- The same bitmap draw using ImageView
- See the difference
mapStyle.addImage("m_eating", ContextCompat.getDrawable(context, R.drawable.marker_eating)!!.toBitmap(64, 64), false)
marker_test.setImageBitmap(ContextCompat.getDrawable(context, R.drawable.marker_eating)!!.toBitmap(64, 64))
// style setting
withProperties(
PropertyFactory.iconSize(
Expression.match(
Expression.get("sizeLevel"),
Expression.literal(MarkerSize.LARGE.ordinal),
Expression.literal(1f),
Expression.literal(MarkerSize.MEDIUM.ordinal),
Expression.literal(1f),
Expression.literal(1f)
)
)
)
Expected behavior
Both bitmaps seems same.
Actual behavior
ImageView on the left, SymbolLayer on the right.

Configuration
Android versions: Android Q Device models: Pixel 2 Mapbox SDK versions: implementation "com.mapbox.mapboxsdk:mapbox-android-sdk:8.2.2"
Seem it is not connected to switch but the fact the value is passed by Expression and not Expression.literal(). E.g. using PropertyFactory.iconSize(Expression.get("")) doesn't work either.
@hrach We're currently using nearest neighbor texture lookups to achieve crisp icons. When the size property is set with an expression, we switch to linearly interpolated texture lookups because we can't anticipate all possible values. I've ticketed this in https://github.com/mapbox/mapbox-gl-js/issues/8730 with a possible solution.
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
@kkaefer will you reopen please?
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
will you reopen please?