Tabnine Logo
TileLayer
Code IndexAdd Tabnine to your IDE (free)

How to use
TileLayer
in
com.mapbox.mapboxsdk.tileprovider.tilesource

Best Java code snippets using com.mapbox.mapboxsdk.tileprovider.tilesource.TileLayer (Showing top 10 results out of 315)

origin: posm/OpenMapKitAndroid

@Override
public BoundingBox getBoundingBox() {
  TileLayer tileLayer = mTileSource.get();
  return (tileLayer != null ? tileLayer.getBoundingBox() : null);
}
origin: posm/OpenMapKitAndroid

@Override
public String getCacheKey() {
  TileLayer tileLayer = mTileSource.get();
  return (tileLayer != null) ? tileLayer.getCacheKey() : "";
}
origin: posm/OpenMapKitAndroid

@Override
public LatLng getCenterCoordinate() {
  TileLayer tileLayer = mTileSource.get();
  return (tileLayer != null ? tileLayer.getCenterCoordinate() : null);
}
origin: posm/OpenMapKitAndroid

@Override
public float getMinimumZoomLevel() {
  TileLayer tileLayer = mTileSource.get();
  return (tileLayer != null ? tileLayer.getMinimumZoomLevel() : MINIMUM_ZOOMLEVEL);
}
origin: posm/OpenMapKitAndroid

@Override
public int getTileSizePixels() {
  TileLayer tileLayer = mTileSource.get();
  return (tileLayer != null) ? tileLayer.getTileSizePixels() : 0;
}
origin: posm/OpenMapKitAndroid

@Override
public float getMaximumZoomLevel() {
  TileLayer tileLayer = mTileSource.get();
  return (tileLayer != null ? tileLayer.getMaximumZoomLevel() : MAXIMUM_ZOOMLEVEL);
}
origin: posm/OpenMapKitAndroid

@Override
public void setTileSource(final ITileLayer tileSource) {
  if (mTileSource.get() != null) {
    mTileSource.get().detach();
  }
  // We are only interested in TileLayer tile sources
  if (tileSource instanceof TileLayer) {
    mTileSource.set((TileLayer) tileSource);
  } else {
    // Otherwise shut down the tile downloader
    mTileSource.set(null);
  }
}
origin: posm/OpenMapKitAndroid

@Override
public float getCenterZoom() {
  TileLayer tileLayer = mTileSource.get();
  return (tileLayer != null ? tileLayer.getCenterZoom()
      : (getMaximumZoomLevel() + getMinimumZoomLevel()) / 2);
}
origin: posm/OpenMapKitAndroid

    @Override
    public Drawable loadTile(final MapTileRequestState aState) throws CantContinueException {
      final MapTile tile = aState.getMapTile();
//            Log.d(TAG, "loadTile() with tile = '" + tile + "'");
      if (mTileCache != null && mTileCache.get().containsTileInDiskCache(tile)) {
//                Log.d(TAG, "tile found in Disk Cache, so returning it. tile = '" + tile + "'");
        return mTileCache.get().getMapTileFromDisk(tile);
      }
      TileLayer tileLayer = mTileSource.get();
      Drawable result =
          (tileLayer != null) ? tileLayer.getDrawableFromTile(MapTileDownloader.this,
              tile, hdpi) : null;
//            Log.d(TAG, "tileLayer.getDrawable() returning result = '" + result + "'");
      return result;
    }
  }
origin: posm/OpenMapKitAndroid

private void selectOnlineBasemap() {
  //create OSM tile layer
  String defaultTilePID = mapActivity.getString(R.string.defaultTileLayerPID);
  String defaultTileURL = mapActivity.getString(R.string.defaultTileLayerURL);
  String defaultTileName = mapActivity.getString(R.string.defaultTileLayerName);
  String defaultTileAttribution = mapActivity.getString(R.string.defaultTileLayerAttribution);
  WebSourceTileLayer ws = new WebSourceTileLayer(defaultTilePID, defaultTileURL);
  ws.setName(defaultTileName).setAttribution(defaultTileAttribution);
  setSelectedBasemap(ONLINE);
  //add OSM tile layer to map
  mapView.setTileSource(ws);
}
com.mapbox.mapboxsdk.tileprovider.tilesourceTileLayer

Most used methods

  • detach
  • getBoundingBox
  • getCacheKey
  • getCenterCoordinate
  • getCenterZoom
  • getDrawableFromTile
  • getMaximumZoomLevel
  • getMinimumZoomLevel
  • getTileSizePixels
  • setAttribution
    Sets the layer's attribution string.
  • setURL
    Sets the layer's tile URL template string.
  • setURL

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Menu (java.awt)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now