congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MapDataStore.boundingBox
Code IndexAdd Tabnine to your IDE (free)

How to use
boundingBox
method
in
org.mapsforge.map.datastore.MapDataStore

Best Java code snippets using org.mapsforge.map.datastore.MapDataStore.boundingBox (Showing top 9 results out of 315)

origin: mapsforge/mapsforge

/**
 * adds another mapDataStore
 *
 * @param mapDataStore      the mapDataStore to add
 * @param useStartZoomLevel if true, use the start zoom level of this mapDataStore as the start zoom level
 * @param useStartPosition  if true, use the start position of this mapDataStore as the start position
 */
public void addMapDataStore(MapDataStore mapDataStore, boolean useStartZoomLevel, boolean useStartPosition) {
  if (this.mapDatabases.contains(mapDataStore)) {
    throw new IllegalArgumentException("Duplicate map database");
  }
  this.mapDatabases.add(mapDataStore);
  if (useStartZoomLevel) {
    this.startZoomLevel = mapDataStore.startZoomLevel();
  }
  if (useStartPosition) {
    this.startPosition = mapDataStore.startPosition();
  }
  if (null == this.boundingBox) {
    this.boundingBox = mapDataStore.boundingBox();
  } else {
    this.boundingBox = this.boundingBox.extendBoundingBox(mapDataStore.boundingBox());
  }
}
origin: mapsforge/mapsforge

Rectangle insideArea = this.mapDataStore.boundingBox().getPositionRelativeToTile(rendererJob.tile);
if (!rendererJob.hasAlpha) {
  renderContext.canvasRasterer.fillOutsideAreas(renderContext.renderTheme.getMapBackgroundOutside(), insideArea);
origin: mapsforge/mapsforge

Rectangle insideArea = this.mapDataStore.boundingBox().getPositionRelativeToTile(rendererJob.tile);
if (!rendererJob.hasAlpha) {
  renderContext.canvasRasterer.fillOutsideAreas(renderContext.renderTheme.getMapBackgroundOutside(), insideArea);
origin: cpesch/RouteConverter

private BoundingBox getMapBoundingBox() {
  Collection<Layer> values = mapsToLayers.values();
  if (!values.isEmpty()) {
    Layer layer = values.iterator().next();
    if (layer instanceof TileRendererLayer) {
      TileRendererLayer tileRendererLayer = (TileRendererLayer) layer;
      return toBoundingBox(tileRendererLayer.getMapDataStore().boundingBox());
    }
  }
  return null;
}
origin: org.mapsforge/mapsforge-map

/**
 * adds another mapDataStore
 *
 * @param mapDataStore      the mapDataStore to add
 * @param useStartZoomLevel if true, use the start zoom level of this mapDataStore as the start zoom level
 * @param useStartPosition  if true, use the start position of this mapDataStore as the start position
 */
public void addMapDataStore(MapDataStore mapDataStore, boolean useStartZoomLevel, boolean useStartPosition) {
  if (this.mapDatabases.contains(mapDataStore)) {
    throw new IllegalArgumentException("Duplicate map database");
  }
  this.mapDatabases.add(mapDataStore);
  if (useStartZoomLevel) {
    this.startZoomLevel = mapDataStore.startZoomLevel();
  }
  if (useStartPosition) {
    this.startPosition = mapDataStore.startPosition();
  }
  if (null == this.boundingBox) {
    this.boundingBox = mapDataStore.boundingBox();
  } else {
    this.boundingBox = this.boundingBox.extendBoundingBox(mapDataStore.boundingBox());
  }
}
origin: mapsforge/mapsforge

@Override
protected MapPosition getInitialPosition() {
  int tileSize = this.mapView.getModel().displayModel.getTileSize();
  byte zoomLevel = LatLongUtils.zoomForBounds(new Dimension(tileSize * 4, tileSize * 4), getMapFile().boundingBox(), tileSize);
  return new MapPosition(getMapFile().boundingBox().getCenterPoint(), zoomLevel);
}
origin: mapsforge/mapsforge

@Override
protected MapPosition getInitialPosition() {
  int tileSize = this.mapView.getModel().displayModel.getTileSize();
  byte zoomLevel = LatLongUtils.zoomForBounds(new Dimension(tileSize * 4, tileSize * 4), getMapFile().boundingBox(), tileSize);
  return new MapPosition(getMapFile().boundingBox().getCenterPoint(), zoomLevel);
}
origin: cyclestreets/android

public void setMapFile(final String mapFile) {
 if ((mapFile == null) || (mapFile.equals(mapFile_)))
   return;
 mapFile_ = mapFile;
 if (mapDatabase_ != null)
  mapDatabase_.close();
 if (theme_ != null)
  theme_.decrementRefCount();
 mapDatabase_ = new MapFile(new File(mapFile));
 InMemoryTileCache tileCache = new InMemoryTileCache(2);
 mapGenerator_ = new DatabaseRenderer(
     mapDatabase_,
     AndroidGraphicFactory.INSTANCE,
     tileCache,
     new TileBasedLabelStore(tileCache.getCapacityFirstLevel()),
     true,
     true,
     null
 );
 mapBounds_ = mapDatabase_.boundingBox();
 final GraphicFactory gf = AndroidGraphicFactory.INSTANCE;
 final XmlRenderTheme theme = InternalRenderTheme.OSMARENDER;
 theme_ = new RenderThemeFuture(gf, theme, displayModel_);
 new Thread(theme_).start();
 zoomBounds_ = -1;
}
origin: org.mapsforge/mapsforge-map

Rectangle insideArea = this.mapDataStore.boundingBox().getPositionRelativeToTile(rendererJob.tile);
if (!rendererJob.hasAlpha) {
  renderContext.canvasRasterer.fillOutsideAreas(renderContext.renderTheme.getMapBackgroundOutside(), insideArea);
org.mapsforge.map.datastoreMapDataStoreboundingBox

Javadoc

Returns the area for which data is supplied.

Popular methods of MapDataStore

  • close
  • extract
    Extracts substring of preferred language from multilingual string. Example multilingual string: "Bas
  • readLabels
    Reads data for an area defined by the tile in the upper left and the tile in the lower right corner.
  • startPosition
    Gets the initial map position.
  • startZoomLevel
    Gets the initial zoom level.
  • getDataTimestamp
    Returns the timestamp of the data used to render a specific tile.
  • readMapData
    Reads data for an area defined by the tile in the upper left and the tile in the lower right corner.
  • readPoiData
    Reads POI data for an area defined by the tile in the upper left and the tile in the lower right cor
  • supportsTile
    Returns true if MapDatabase contains tile.

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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