You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use dynamic icon for each cluster item , so I have special icon url and load marker icon from url . I user following code :
override fun onBeforeClusterItemRendered(item: T, markerOptions: MarkerOptions?) {
super.onBeforeClusterItemRendered(item, markerOptions)
try {
var url = URL("https://cdn3.iconfinder.com/data/icons/places/100/map_pin_big_1-128.png")
//I use static url, to ensure that url is not null, it should be (item as MyItem).iconURL. got same result anyway
Glide.with(context)
.asBitmap()
.load(url)
.into(object : CustomTarget<Bitmap>() {
override fun onLoadCleared(placeholder: Drawable?) {
}
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
markerOptions?.icon(BitmapDescriptorFactory.fromBitmap(resource))
}
})
} catch (ex: Exception) {
Log.e("map", ex.toString())
}
}
some icons still default in my case, after zoom in zoom out icon changes sometimes. The problem is that this code is not works for every cluster item , after zoom changed cluster icon is changed too, it may render my custom icon and may use default.
The text was updated successfully, but these errors were encountered:
I use dynamic icon for each cluster item , so I have special icon url and load marker icon from url . I user following code :
some icons still default in my case, after zoom in zoom out icon changes sometimes. The problem is that this code is not works for every cluster item , after zoom changed cluster icon is changed too, it may render my custom icon and may use default.
The text was updated successfully, but these errors were encountered: