今天有人问,一个marker同时加载本地图片和网络图片。应该怎么处理。最后是这样: public void setMarker(final double wd, final double jd, final int mid, String url) {view = getLayoutInflater().inflate(R.layout.zdyview, null);final ImageView ivHead = view.findViewById(R.id.iv_head);final ImageView defaultImg = view.findViewById(R.id.defaultImg);final TextView textView = view.findViewById(R.id.tv);defaultImg.setImageResource(R.drawable.icon_location_map);textView.setText("nnnnnnnnnnnn");Glide.with(mContext).load(url).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(new SimpleTarget<Drawable>() {@Overridepublic void onResourceReady(Drawable resource, Transition<? super Drawable> transition) {ivHead.setImageDrawable(resource);amap.addMarker(new MarkerOptions().position(new LatLng(39.902297, 116.383697)).period(1)//添加markerID.draggable(false).icon(BitmapDescriptorFactory.fromView(view)));}});}
详细解决方案
高德地图 使用Glide加载网络图片作为 marker
热度:5 发布时间:2024-01-25 00:11:38.0
相关解决方案
- eclispe开发 rcp marker 大神 获取Eclipse 视图行号
- illegal lob length marker 54485 IMP-00098: INTERNAL ERROR: impgst2,该如何解决
- ,pde文件导入失败,Character set marker unknown
- android marker zoom with 地图
- 在GPS上启动Google Map Marker,但可拖动-填写表格
- Android图片加载框架Fresco,Glide,Picasso对比分析
- Glide 4.0+设置 圆角和高斯模糊(BlurTransformation),直接拿到项目中用
- Kotlin Unresolved reference: Glide 解决方法
- cannot resolve symbol ‘Glide’问题
- python读取bam文件OSError: no BGZF EOF marker; file may be truncated
- Android 开发 框架系列 glide-transformations 图片处理基本使用
- Glide 圆角图片
- 基于flash-marker.js的 openlayers 闪烁点的实现方式
- 为了性能,Glide 做了哪些优化?
- 百度地图:Caused by: java.lang.IllegalArgumentException: marker's icon can not be null
- 「 Adams 」调试ERROR: The reference marker of an extrusion, revolution, or shell must belong to...
- Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition
- 深度学习入门源代码下载使用mnist数据集出现错误EOFError Compressed file ended before the end-of-stream marker was reached
- jpeg Exif file format Marker APP1 分析
- jpeg Exif file format? Marker APP1 简介
- Glide 4.0 Https 兼容
- Matisse 预览图片黑屏,Glide 内存溢出
- java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/Stri
- Glide OOM问题解决方法汇总
- Glide 3.7如何实现圆形Transformation
- aruco marker 的使用
- android Glide 4.0图片加载失败
- Glide 4源码分析(一)
- Glide:load resource failed https://……size 600*600
- 记录一次Glide加载网络图片失败class com.bumptech.glide.load.engine.GlideException: Failed to load resource(真正终结篇)