title: Google Maps API Android - Tile provider's tiles resolution
body: <p>I'm using custom TileProviders in my Android app to display offline maps and OpenStreetMap maps. It works, but there is a problem with the tiles resolution, which is quite bad. The files have a size of 256x256, and setting the width/height of my TileProvider to 128 doesn't change anything.</p>
  
  <p>Here is some piece of code :</p>
  
  <pre><code>public class GenericUrlTileProvider extends UrlTileProvider {
  
      // ---------------------------------------------------------------------------------------
      // Private attributes :
  
      private String _baseUrl;
      // ---------------------------------------------------------------------------------------
  
  
  
      // ---------------------------------------------------------------------------------------
      // Constructor :
      public GenericUrlTileProvider(int width, int height, String url) {
  
          super(width, height);
  
          this._baseUrl = url;
      }
  
      @Override
      public URL getTileUrl(int x, int y, int zoom) {
  
          try {
              return new URL(_baseUrl.replace("{z}", "" + zoom).replace("{x}", "" + x).replace("{y}", "" + y));
          }
          catch (MalformedURLException e) { e.printStackTrace(); }
  
          return null;
      }
      // ---------------------------------------------------------------------------------------
  }
  </code></pre>
  
  <p>Does anyone know how to fix this to support high resolution devices ?</p>
  
  <p>Thanks</p>