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 335 forks source link

build() method starts to return void instead of TileView #539

Open mwe8 opened 4 years ago

mwe8 commented 4 years ago
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  TileView tileView = new TileView.Builder(this)
    .setSize(3000, 3000)
    .defineZoomLevel("tile-%d-%d.png")
    .build();
  setContentView(tileView);
}

So, now how we can use it?

danramteke commented 4 years ago

This is what I do, @mwe8 :

this.tileView = findViewById(R.id.tileview)
TileView.Builder(this.tileView)
            .setSize(MAP_WIDTH, MAP_HEIGHT)
            .setTileSize(512)
            .defineZoomLevel("map-tiles/13_%d_%d.png")
            .addReadyListener(readyDelegate)
            .build()