Tabnine Logo
TileCode.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.geomajas.layer.tile.TileCode
constructor

Best Java code snippets using org.geomajas.layer.tile.TileCode.<init> (Showing top 10 results out of 315)

origin: org.geomajas/geomajas-api

/**
 * Create a clone from this object.
 *
 * @return cloned tile code
 */
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "CN_IDIOM_NO_SUPER_CALL",
    justification = "needed for GWT")
public TileCode clone() { // NOSONAR super.clone() not supported by GWT
  return new TileCode(tileLevel, x, y);
}
origin: org.geomajas.plugin/geomajas-layer-tms

  /**
   * @param relativeUrl just the part with level/x/y.extension
   * @return
   */
  public static TileCode parseTileCode(String relativeUrl) {
    TileCode tc = new TileCode();
    StringTokenizer tokenizer = new StringTokenizer(relativeUrl, "/");
    tc.setTileLevel(Integer.parseInt(tokenizer.nextToken()));
    tc.setX(Integer.parseInt(tokenizer.nextToken()));
    tc.setY(Integer.parseInt(tokenizer.nextToken().split("\\.")[0]));
    return tc;
  }
}
origin: org.geomajas/geomajas-gwt-client-impl

codes.add(new TileCode(currentTileLevel, x, y));
origin: org.geomajas.plugin/geomajas-plugin-wmsclient

  @Override
  public TileCode getTileCodeForLocation(ViewPort viewPort, WmsTileConfiguration tileConfig, Coordinate location,
      double scale) {
    double actualScale = viewPort.getZoomStrategy().checkScale(scale, ZoomOption.LEVEL_CLOSEST);
    int tileLevel = viewPort.getZoomStrategy().getZoomStepIndex(actualScale);
    double resolution = 1 / actualScale;
    double worldTileWidth = tileConfig.getTileWidth() * resolution;
    double worldTileHeight = tileConfig.getTileHeight() * resolution;

    Coordinate tileOrigin = tileConfig.getTileOrigin();
    int x = (int) Math.floor((location.getX() - tileOrigin.getX()) / worldTileWidth);
    int y = (int) Math.floor((location.getY() - tileOrigin.getY()) / worldTileHeight);

    return new TileCode(tileLevel, x, y);
  }
}
origin: org.geomajas.plugin/geomajas-plugin-wmsclient

codes.add(new TileCode(tileLevel, x, y));
origin: org.geomajas.plugin/geomajas-layer-openstreetmaps

image.setCode(new TileCode(tileLevel, i, j));
image.setUrl("http://tile.openstreetmap.org/" + tileLevel + "/" + i + "/" + j + ".png");
log.debug("adding OSM image {}", image);
origin: org.geomajas.plugin/geomajas-layer-googlemaps

image.setCode(new TileCode(zoomLevel, i, j));
image.setUrl(url);
log.debug("adding image {}", image);
origin: org.geomajas.plugin/geomajas-layer-google

image.setCode(new TileCode(zoomLevel, i, j));
image.setUrl(url);
log.debug("adding image {}", image);
origin: org.geomajas.plugin/geomajas-layer-tms

TileCode tileCode = new TileCode(tileLevel, i, j);
image.setCode(tileCode);
image.setUrl(formatUrl(urlBuilder.buildUrl(tileCode, getTmsTargetUrl())));
origin: org.geomajas.plugin/geomajas-client-gwt2-plugin-print-tilebasedlayer

private RasterTile toRasterTile(Tile tile) {
  RasterTile rTile = new RasterTile(tile.getBounds(), tile.getCode().toString());
  rTile.setCode(new TileCode(tile.getCode().getTileLevel(), tile.getCode().getX(), tile.getCode().getY()));
  rTile.setUrl(tile.getUrl());
  return rTile;
}
org.geomajas.layer.tileTileCode<init>

Javadoc

Default constructor.

Popular methods of TileCode

  • getX
    Get the X-ordinate at the given level: X=[0, (2^tileLevel) - 1].
  • getY
    Get the Y-ordinate at the given level: Y=[0, (2^tileLevel) - 1].
  • getTileLevel
    Get the tiling depth level. Where 0 means the top level. Make sure this is always a positive integer
  • toString
    Return the values as a readable text: TileLevel-X-Y.
  • clone
    Create a clone from this object.
  • setTileLevel
    set the tiling depth level. Where 0 means the top level. Make sure this is always a positive integer
  • setX
    The X-ordinate at the given level: X=[0, (2^tileLevel) - 1].
  • setY
    The Y-ordinate at the given level: Y=[0, (2^tileLevel) - 1].

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Best IntelliJ 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