简体   繁体   English

在LWUIT中创建离线地图应用程序

[英]Creating offline map application in LWUIT

I am currently trying to create an offline map on LWUIT. 我目前正在尝试在LWUIT上创建离线地图。 But I have encountered some problems that I don't know how to solve or if it is even possible allowed in LWUIT. 但是我遇到了一些我不知道如何解决的问题,或者甚至可能在LWUIT中允许。 I am trying to use an image as a map, it has a file size of 300KB, but the problem is that it has a dimension of 2728x3323 which is way over the screen size of a mobile phone. 我正在尝试使用图像作为地图,它的文件大小为300KB,但是问题是它的大小为2728x3323,超出了手机的屏幕大小。 That is why the OutOfMemoryException shows up if I try to create the Image to use it as a label. 这就是为什么如果我尝试创建Image来将其用作标签,则会显示OutOfMemoryException的原因。 Is it possible to do panning on that image? 是否可以在该图像上平移? If it is, can someone teach me or show me how it can be done? 如果是的话,有人可以教我或告诉我如何做吗? It is ok even if there is no zooming feature. 即使没有缩放功能也可以。 I just want to see the whole image through panning. 我只想通过平移查看整个图像。 I also want to ask how to draw an image on top of it because I want to draw some lines and markers on the image programmatically. 我还想问一下如何在图像上方绘制图像,因为我想以编程方式在图像上绘制一些线条和标记。 Any help would be so much appreciated. 任何帮助将不胜感激。

Thanks 谢谢

Its not possible in MIDP and not practical even in modern smartphones since individual application RAM is limited. 由于单个应用程序RAM受限制,因此它在MIDP中是不可能的,即使在现代智能手机中也不可行。

Mapping applications (even google maps on the browser) fetch much smaller images and tile them, this allows them to load multiple small images which are MUCH cheaper than a single large image. 映射应用程序(甚至浏览器上的google maps)会获取小得多的图像并将它们平铺,这使它们可以加载多个小图像,这些图像比单个大图像便宜得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM