Mapbox-gl-native: Support adding SDF icons in addImage

Created on 24 Aug 2017  路  5Comments  路  Source: mapbox/mapbox-gl-native

Android GL JS parity

Most helpful comment

Before enabling the sdf flag in Style.addImage:

device-2018-06-20-133259

After enabling the sdf flag in Style.addImage + enabling icon-color tinting:

device-2018-06-20-133844

All 5 comments

7300 makes use of an existing API to make mbgl interpret an image as an SDF image when adding it to the style. Is there anything left to do here in mbgl?

@1ec5 @lbud would this be an appropriate place to mention that there is no Android solution for this as of yet? As in, as far as I can tell, there's no way to add SDF icons via addImage in the Android SDK. Or should that be ticketed separately?

Before enabling the sdf flag in Style.addImage:

device-2018-06-20-133259

After enabling the sdf flag in Style.addImage + enabling icon-color tinting:

device-2018-06-20-133844

Hi,

Did you use a SDF image ?

How did you add the SDF image ?
I am trying to do exactly what you are doing without sucess. In fact I dont kown how to create a SDF image.

Thanks for help

Before enabling the sdf flag in Style.addImage:

device-2018-06-20-133259

After enabling the sdf flag in Style.addImage + enabling icon-color tinting:

device-2018-06-20-133844

@curvenut icons created through Android studio or copied from material spec are sdf compatible. In Android terms, vector drawables are sdf compatible.

Was this page helpful?
0 / 5 - 0 ratings