moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 337 forks source link

Tiles are not showing #55

Closed srinivasttt closed 10 years ago

srinivasttt commented 10 years ago

Im using tileview for showing image and i have diffrent zoom level images in assests. Im calling ddDetailLevel with zom level and apth of corresponding and im adding tileview to layout but im not able to see tiles.

Please suggest this.

moagrius commented 10 years ago

I'm not clear on what you're asking exactly. If you're just looking for basic setup, you can check out the TileViewDemo, or look at the wiki.

HTH.

srinivasttt commented 10 years ago

Hi moagrius

i added different zoom levels like

mTileView.addDetailLevel(1.00000f, "edcontroller/tiles6%row%x%col%.png");

        mTileView.addDetailLevel(0.50000f, "edcontroller/tiles_5_%row%x%col%.png");

        mTileView.addDetailLevel(0.25000f, "edcontroller/tiles_4_%row%x%col%.png");

        mTileView.addDetailLevel(0.12500f, "edcontroller/tiles_3_%row%x%col%.png");

        mTileView.addDetailLevel(0.06250f, "edcontroller/tiles_2_%row%x%col%.png");

        mTileView.addDetailLevel(0.03125f, "edcontroller/tiles_1_%row%x%col%.png");

and im adding this to relative layout like

mRelativeLayout.addView(mTileView); but im not able to see tiles of image .how can i find out proble .

moagrius commented 10 years ago

I can't be sure by seeing just that limited code, but I'd check 2 things initially:

  1. Make sure you have your tiles in /assets/edcontroller/tile_5_0x0.png, etc
  2. I don't see dimensions specified for when you add the TileView to the RelativeLayout. Try this:
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
mRelativeLayout.addView(mTileView, lp);

If that doesn't work, does it work when you set the TileView as the content view, rather than as a child? Have you examine the Activities in TileViewDemo to see how they work?

srinivasttt commented 10 years ago

Thank u moagrius..

moagrius commented 10 years ago

YW :)