mapbox / mapbox-android-demo

Google Play demo app for the Mapbox Maps SDK for Android
https://play.google.com/store/apps/details?id=com.mapbox.mapboxandroiddemo
BSD 2-Clause "Simplified" License
720 stars 493 forks source link

Add custom icon to SymbolOptions #1407

Open miladsalimiiii opened 3 years ago

miladsalimiiii commented 3 years ago

For adding icon image to symbols we use this :

.withIconImage(MAKI_ICON_HARBOR)

in

            symbolLayerIconFeatureList.add(
                SymbolOptions()
                    .withLatLng(point.latitude?.let { point.longitude?.let { latitude ->
                        LatLng(it,
                            latitude
                        )
                    } })
                    .withIconImage(MAKI_ICON_HARBOR)
                    .withIconSize(2.0f)
            )

.withIconImage()argument is String like MAKI_ICON_HARBOR .

How can we see all icon options in string and how can we add our drawable as iconImage in .withIconImage() ?