From 407e7126d6250500456e505d890c4d6896a1e6c6 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Fri, 28 Jun 2013 04:28:05 +0200 Subject: [PATCH] moved to core --- .../oscim/gdx/emu/org/oscim/core/Tile.java | 104 ------------------ 1 file changed, 104 deletions(-) delete mode 100644 vtm-gdx-html/src/org/oscim/gdx/emu/org/oscim/core/Tile.java diff --git a/vtm-gdx-html/src/org/oscim/gdx/emu/org/oscim/core/Tile.java b/vtm-gdx-html/src/org/oscim/gdx/emu/org/oscim/core/Tile.java deleted file mode 100644 index b9a0d2b3..00000000 --- a/vtm-gdx-html/src/org/oscim/gdx/emu/org/oscim/core/Tile.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2010, 2011, 2012 mapsforge.org - * - * This program is free software: you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with - * this program. If not, see . - */ -package org.oscim.core; - -import org.oscim.layers.tile.TileLoader; - -/** - * A tile represents a rectangular part of the world map. All tiles can be - * identified by their X and Y number together with their zoom level. The actual - * area that a tile covers on a map depends on the underlying map projection. - */ -public class Tile { - public TileLoader loader; - - /** - * Width and height of a map tile in pixel. - */ - public static int SIZE = 256; - - /** - * The X number of this tile. - */ - public final int tileX; - - /** - * The Y number of this tile. - */ - public final int tileY; - - /** - * The Zoom level of this tile. - */ - public final byte zoomLevel; - - /** - * @param tileX - * the X number of the tile. - * @param tileY - * the Y number of the tile. - * @param zoomLevel - * the zoom level of the tile. - */ - public Tile(int tileX, int tileY, byte zoomLevel) { - this.tileX = tileX; - this.tileY = tileY; - this.zoomLevel = zoomLevel; - } - - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append("[X:"); - stringBuilder.append(this.tileX); - stringBuilder.append(", Y:"); - stringBuilder.append(this.tileY); - stringBuilder.append(", Z:"); - stringBuilder.append(this.zoomLevel); - stringBuilder.append("]"); - return stringBuilder.toString(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - - if (!(obj instanceof Tile)) - return false; - - Tile o = (Tile) obj; - - if (o.tileX == this.tileX && o.tileY == this.tileY - && o.zoomLevel == this.zoomLevel) - return true; - - return false; - } - - private int mHash = 0; - - @Override - public int hashCode() { - if (mHash == 0) { - int result = 7; - result = 31 * result + this.tileX; - result = 31 * result + this.tileY; - result = 31 * result + this.zoomLevel; - mHash = result; - } - return mHash; - } -}