BitmapDescriptor似乎改变了地图标记图像的分辨率(BitmapDescriptor seems to change resolution of map marker image)

系统教程 行业动态 更新时间:2024-06-14 16:58:30
BitmapDescriptor似乎改变了地图标记图像的分辨率(BitmapDescriptor seems to change resolution of map marker image)

我有一个我在地图上显示的自定义地图标记,但是当我绘制它们时,标记看起来很模糊,就像在查看原始分辨率时更改了分辨率

这是原作

我不同的颜色

这是他们在地图上绘制它们时的样子

正如你所看到的那样,边缘看起来与原始像素相比都是像素化的,并且我使用的图像尺寸似乎并不重要。

使用BitmapDescriptorFactory.fromResource(R.drawable.blue)真的会降低图像的质量吗?

如何在Google即时中让它们看起来像这样高质量

我需要使用一些特殊的图像尺寸来使它们看起来更好或者更好吗?

这就是我绘制地图的方式

mGoogleMap.addMarker(new MarkerOptions().position(point).icon(BitmapDescriptorFactory.fromResource(R.drawable.blue)));

I have a custom map marker that I show on the map, but when I plot them the markers look blurry like the resolution was changed when looking at the original

this is the original

and I different colors of that

this is how they look when I plot them on the map

as you can see the edges looks all pixelated compared to the original one and it does not seem to matter what size image I use either.

Does using BitmapDescriptorFactory.fromResource(R.drawable.blue) really degrade the quality of the image?

how can I get them to look high quality like this in Google Now

are there some special image dimensions I need to use to get them to look better or something?

This is how I plot to the map

mGoogleMap.addMarker(new MarkerOptions().position(point).icon(BitmapDescriptorFactory.fromResource(R.drawable.blue)));

最满意答案

这里的问题可以如下

您可能正在使用适用于mdpi或hdpi的drawable,并且您正在使用xhdpi屏幕。

尝试为所有drawables文件夹添加drawables,然后看到标记,我遇到了类似的问题,这有帮助。 或者使用nodpi文件夹,它将防止图像缩放。

The problem here can the following

You might be using the drawable which is good for mdpi or hdpi and you are using xhdpi screen.

Try adding drawables for all the drawables folder and then see the marker, i have faced the similar issue and this helped. Or use nodpi folder it will prevent images from getting scaled.

更多推荐

本文发布于:2023-04-15 03:25:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/619eb758e9035d0bd1ac7259f92b0c69.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标记   图像   分辨率   地图   改变了

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!