Results 1 to 3 of 3
  1. #1
    RDReavis is offline Member
    Join Date
    Jan 2010
    Posts
    3
    Rep Power
    0

    Default Plotting Map Tiles

    Hello,

    I'm pretty inexperienced when it comes to Java GUI stuff, so bear with me.

    I'm working on a program that can plot topographic/aerial maps. The maps are split into jpg tile chunks. I'm not sure how to plot the tiles and join them seamlessly in the GUI. I'm looking for functionality like Google Earth, where you can drag the map, and any tiles that are off the screen will be loaded and displayed as the user drags the map. Can I get a push in the right direction?

    Thanks!
    Richard D. Reavis

  2. #2
    Cassidy is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    It sounds like you want to break up a large image into chunks and draw a section of it on the screen.
    This is easiest if all of the map tiles are of the same size. Then you can store that size somewhere and put all of the tiles in a matrix. Then if the upper-left of your screen is (x,y) the tile you want is at the matrix location (x/tileWidth, y/tileHeight). Similarly simple maths for figuring where exactly to draw it and how to loop over the screen.

    Depending on the size of your map, it's up to you to decide whether to load all tiles into the matrix as Images first or to load them as String directions to an image file that can be loaded once they're actually on screen.

  3. #3
    RDReavis is offline Member
    Join Date
    Jan 2010
    Posts
    3
    Rep Power
    0

    Default

    Thanks for the response. After much reevaluation of my requirements, I think this project has transitioned into the 3D domain. I'll be sure to post any questions in the appropriate forums.

    Thanks!

Similar Threads

  1. Adding Tiles
    By Rubics in forum Java Applets
    Replies: 1
    Last Post: 08-03-2009, 04:25 AM
  2. [SOLVED] Tiles in Java server faces
    By mvg in forum JavaServer Faces (JSF)
    Replies: 1
    Last Post: 03-31-2009, 06:09 AM
  3. [SOLVED] Navigate from a tiles to another page
    By hannehomuth in forum JavaServer Faces (JSF)
    Replies: 1
    Last Post: 09-04-2008, 04:56 PM
  4. struts tiles
    By sasikumarm in forum Web Frameworks
    Replies: 0
    Last Post: 03-27-2008, 02:36 PM
  5. Tiles in JSF
    By Heather in forum SWT / JFace
    Replies: 2
    Last Post: 06-30-2007, 03:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •