谷歌地图低分辨率和模糊在PhoneGap 2.5 [英] Google Maps low-res and blurry in PhoneGap 2.5

查看:200
本文介绍了谷歌地图低分辨率和模糊在PhoneGap 2.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用Google Maps API的PhoneGap应用程式。我创建了高分辨率版本的一些我的图形显示在更高分辨率的屏幕上,看起来很不错,但地图砖本身是非常低分辨率和模糊。我们的移动网站上的地图图块,由基本上相同的代码构建,是更锐利,更好的看。 (请参阅此处进行全尺寸比较。)

I'm developing a PhoneGap app that uses the Google Maps API. I've created high-res versions of a number of my graphics for display on higher resolution screens, which look very nice, but the map tiles themselves are very low-resolution and blurry. The map tiles on our mobile website, which is built from essentially the same code, are much sharper and better looking. (See here for a full-sized comparison.)

我的视口标记为:

<meta id="viewport" name="viewport" 
    content="width=device-width, initial-scale=1.0, user-scalable=no" />

如何让地图图块在我的应用程序中显示更好?

How can I make the map tiles look better in my app?

推荐答案

对于年龄相同的问题奋斗,并且它似乎是一个DPI缩放问题在PhoneGap使用的WebView组件启用硬件加速时启用默认自Android 4.0。

Been struggling with the same issue for age and it seems to be a DPI scaling issue in the WebView component used by Phonegap when having hardware acceleration enabled, which is turned on by default since Android 4.0.

您可以通过在AndroidManifest.xml中的标记中添加android:hardwareAccelerated =false来强制停用硬件加速,但是yoru应用程序的其余部分可能会更加缓慢,特别是如果你有大量的HTML / CSS元素。

You can force the hardware acceleration to be disabled by adding android:hardwareAccelerated="false" to the tag in your AndroidManifest.xml and the map will be sharp again, but the rest of yoru app might be more sluggish, especially if you have heavy HTML/CSS elements.

另一个解决方案是设置在你的索引.html使视口使用本机屏幕DPI,但是所有的应用程序看起来很小。

Another solution is to set in the of your index.html to make the viewport use the native screen DPI, but then all your app will look tiny.

不幸的是,我还没有找到任何令人满意的解决方案,没有更多关于网络上的问题的信息。

So unfortunately I haven't found any satisfactory solution yet, and there's not much more information about the issue around the web.

这篇关于谷歌地图低分辨率和模糊在PhoneGap 2.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆