GroundOverlay就像android中的javascript
我正在尝试创建一个类似于 Google 提供的 Web API 中可用的地面覆盖层。
上遇到了这些
我在 StackOverflow does-android-maps-support-ground-overlay
android-google-maps-groundoverlay
我已经实现了这两个进行了一些调整,但两者的问题都是相同的。当区域很大而无法覆盖时,尤其是在高级别放大时,我会收到 VMBudget 错误和应用程序崩溃。
我在缩放叠加位图时尝试了所有调整,例如回收和使用 BitmapOptions,但没有成功。
唯一的问题是 16 MB VM 预算被证明不足以在运行时缩放,在我的情况下,最大缩放时需要超过 3500 像素的图像,并且由于 draw() 覆盖几乎每毫秒都会调用它,因此它会耗尽资源。
我需要一个可以将图像裁剪为屏幕尺寸的解决方案。
I am trying to create a ground overlay similar as those available in web APIs provided by Google.
I came across these on StackOverflow
does-android-maps-support-ground-overlay
android-google-maps-groundoverlay
I have implemented both of them with a bit of tweaking, but problem is same with both of them. When area is large to cover especially when zoomed in at high levels I get VMBudget error and application crashes.
I have tried all the tuning while scaling bitmaps for the overlay, like recycling and using BitmapOptions, but no success.
The sole issue is 16 MB VM Budget proves to be insufficient for the scaling at runtime more than 3500px image is required at max zoom in my case and since draw() overlay calls almost every ms its eating up.
I need a solution which can crop image to the screen size.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我进行了搜索并实施了我所知道的一切。但我认为解决这个问题的唯一方法是
OSM Droid
http://code.google.com/p/osmdroid/wiki/FAQ
用户使用 API 的图块功能并获得所需的结果
Well, I searched and I implemented everything I know. But I think the only way out of this,
OSM Droid
http://code.google.com/p/osmdroid/wiki/FAQ
User tiles feature of the API and attain the required result