Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Tiling of a Big Image

I have very big Map Image and i want to show on UIImageView. I want something like google Map App does "tiling of the big images".

— asked November 12th 2010 by jitendra bhumiwal
  • big
  • image
  • tiled
  • tiling
0 Comments

1 Answer

  • Is this technically a question, Jitendra? ;)

    I can only guess at how I would approach this, as I haven't ever done it before.

    I think a scrollView is probably the most appropriate view. I'd start by simply laying them out so that all tiles are placed on the view, to get a baseline on how it performs.

    Then I would experiment with formulas to calculate the total grid size, and the top left hand coordinate of each tile (or even do it dynamically with positive and negative top and left values), and initially show 9 tiles (the one in the centre of the view, and the 8 tiles around that central one), and then listen for events (focus or click) to add and remove (or show and hide) tiles as the user moves around the grid.

    Really this would take a bit of trial and error, and an organised strategy to compare the results. However, it's an interesting conundrum, and I hope you will report back with news of your solution! :)

    Good luck!

    — answered November 13th 2010 by Paul Dowsett
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.