moagrius/TileView — pull request #30 by corsc (2013-09-24 04:36:10+00:00)
Title: Different Tile Selection Algorithms

I have implemented a couple of different options in regard to which tile set is selected.
There are now 3 different options:

1) The previous (and default)
This method sets "switch points" after which the next highest set is selected.
For example with 2 tile sets at 100% and 25% and a zoom of 30% the selected set will be 100%

2) "Find Closest"
This method will find the closest match by rounding up or down.
For example with 2 tile sets at 100% and 25% and a zoom of 30% the selected set will be 25%.
For example with 2 tile sets at 100% and 25% and a zoom of 80% the selected set will be 100%.

3) "By Range"
This method is the most work to use but it in theory gives you the most control.
For each TileSet you define a min and max value (aka range) and selector attempts to find a range that contains the current zoom.
For example with 2 tile sets at 100% (range: 0.5f, Float.MAX_VALUE) and 25% (Float.MIN_VALUE, 0.5f) the switching point will be exactly 50%.

```java
this.mMapView.setTileSelectionMethod(DetailManager.METHOD_RANGES);
this.mMapView.addDetailLevel(0.25f, "tiles/G1_025_%col%_%row%.jpg", null, 256, 256, Float.MIN_VALUE, 0.5f); //$NON-NLS-1$
this.mMapView.addDetailLevel(1.00f, "tiles/G1_100_%col%_%row%.jpg", null, 256, 256, 0.5f, Float.MAX_VALUE); //$NON-NLS-1$
````

I am sorry for any incorrect formatting or other extraneous code changes (mostly my eclispe auto-formatting/clean up). If you have a particular style or something I can follow, I can ammend my comments)