0

I am currently trying to create an offline map on LWUIT. But I have encountered some problems that I don't know how to solve or if it is even possible allowed in 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. That is why the OutOfMemoryException shows up if I try to create the Image to use it as a label. 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

arthurbc
  • 95
  • 7

1 Answers1

1

Its not possible in MIDP and not practical even in modern smartphones since individual application RAM is limited.

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.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • Thanks Shai for the answer. So now I have new problem which is the tiling of the images. Is there a feature in LWUIT that I can use for this function? I have tried looking for it but I haven't found anything. And do you have some ideas that you can share with me on how to do this? Your answer will be much appreciated. Thanks. – arthurbc Mar 25 '12 at 22:41
  • That means creating a mapping component from scratch. Style does have a tile background type but its not what you need since a Map is far more elaborate. I understand there is an open source Map application in LWUIT but I don't know where it is or whether the license is appropriate for you. – Shai Almog Mar 27 '12 at 18:39