/ @see dtCreateNavMeshData, #removeTile
543240
public long addTile(MeshData data, int flags, long lastRef) {
        // Make sure the data is in right format.
        MeshHeader header = data.header;

        // Make sure the location is free.
        if (getTileAt(header.x, header.y, header.layer) != null) {
            throw new RuntimeException("Tile already exists");
        }

        // Allocate a tile.
        MeshTile tile = null;
        if (lastRef == 0) {
            if (m_nextFree != null) {
                tile = m_nextFree;
                m_nextFree = tile.next;
                tile.next = null;
                m_tileCount++;
            }
        } else {
            // Try to relocate the tile to specific index with same salt.
            int tileIndex = decodePolyIdTile(lastRef);
            if (tileIndex >= m_maxTiles) {
                throw new RuntimeException("Tile index too high");
            }
            // Try to find the specific tile id from the free list.
            MeshTile target = m_tiles[tileIndex];
            MeshTile prev = null;
            tile = m_nextFree;
            while (tile != null && tile != target) {
                prev = tile;
                tile = tile.next;
            }
            // Could not find the correct location.
            if (tile != target) {
                throw new RuntimeException("Could not find tile");
            }
            // Remove from freelist
            if (prev == null) {
                m_nextFree = tile.next;
            } else {
                prev.next = tile.next;
            }

            // Restore salt.
            tile.salt = decodePolyIdSalt(lastRef);
        }

        // Make sure we could allocate a tile.
        if (tile == null) {
            throw new RuntimeException("Could not allocate a tile");
        }

        tile.data = data;
        tile.flags = flags;
        tile.links.clear();

        // Insert tile into the position lut.
        int h = computeTileHash(header.x, header.y, m_tileLutMask);
        tile.next = m_posLookup[h];
        m_posLookup[h] = tile;

        // Patch header pointers.

        // If there are no items in the bvtree, reset the tree pointer.
        if (tile.data.bvTree != null && tile.data.bvTree.length == 0) {
            tile.data.bvTree = null;
        }

        // Init tile.

        connectIntLinks(tile);
        // Base off-mesh connections to their starting polygons and connect connections inside the tile.
        baseOffMeshLinks(tile);
        connectExtOffMeshLinks(tile, tile, -1);

        // Connect with layers in current tile.
        List<MeshTile> neis = getTilesAt(header.x, header.y);
        for (int j = 0; j < neis.size(); ++j) {
            if (neis.get(j) == tile) {
                continue;
            }
            connectExtLinks(tile, neis.get(j), -1);
            connectExtLinks(neis.get(j), tile, -1);
            connectExtOffMeshLinks(tile, neis.get(j), -1);
            connectExtOffMeshLinks(neis.get(j), tile, -1);
        }

        // Connect with neighbour tiles.
        for (int i = 0; i < 8; ++i) {
            neis = getNeighbourTilesAt(header.x, header.y, i);
            for (int j = 0; j < neis.size(); ++j) {
                connectExtLinks(tile, neis.get(j), i);
                connectExtLinks(neis.get(j), tile, oppositeTile(i));
                connectExtOffMeshLinks(tile, neis.get(j), i);
                connectExtOffMeshLinks(neis.get(j), tile, oppositeTile(i));
            }
        }

        return getTileRef(tile);
    }
1276174
protected boolean renameTileSet (String oldName, String newName)
    {
        Integer tsid = _map.get(oldName);
        if (tsid != null) {
            _map.put(newName, tsid);
            // fudge our stored tileset ID so that we flush ourselves when
            // the rename tool requests that we commit the changes
            _storedTileSetID--;
            return true;

        } else {
            return false;
        }
    }
1059518
function(map) {
        // hide layer before removing
        if (this.visibility && this.mapObject) {
            this.setGMapVisibility(false);
        }
        // check to see if last Google layer in this map
        var cache = OpenLayers.Layer.Google.cache[map.id];
        if (cache) {
            if (cache.count <= 1) {
                this.removeGMapElements();
                delete OpenLayers.Layer.Google.cache[map.id];
            } else {
                // decrement the layer count
                --cache.count;
            }
        }
        // remove references to gmap elements
        delete this.termsOfUse;
        delete this.poweredBy;
        delete this.mapObject;
        delete this.dragObject;
        OpenLayers.Layer.EventPane.prototype.removeMap.apply(this, arguments);
    }
571747
public void removeMcToMCWMap(Object mc) {
        if (tc.isEntryEnabled()) {
            Tr.entry(this, tc, "removeMcToMCWMap");
        }
        mcToMCWMapWrite.lock();
        try {
            mcToMCWMap.remove(mc);
        } finally {
            mcToMCWMapWrite.unlock();
        }
        if (tc.isDebugEnabled()) {
            Tr.debug(this, tc, mcToMCWMap.size() + " connections remaining in mc to mcw table");
        }
        if (tc.isEntryEnabled()) {
            Tr.exit(this, tc, "removeMcToMCWMap");
        }
    }
798730
@Override
    public void renderTile(Graphic g, MapTile map, Tile tile, int x, int y)
    {
        final SpriteTiled sprite = map.getSheet(tile.getSheet());
        sprite.setLocation(x, y);
        sprite.setTile(tile.getNumber());
        sprite.render(g);
    }
1246545
public static int removeTileSources(final String aRegex) {
	        int n=0;
                for (int i=mTileSources.size()-1; i>=0; --i) {
                        if (mTileSources.get(i).name().matches(aRegex)) {
		                mTileSources.remove(i);
				++n;
		        }
                }
		return n;
	}
769512
public static void deleteTileScalingExtension(GeoPackageCore geoPackage) {

		TileScalingDao tileScalingDao = geoPackage.getTileScalingDao();
		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
		try {
			if (tileScalingDao.isTableExists()) {
				geoPackage.dropTable(tileScalingDao.getTableName());
			}
			if (extensionsDao.isTableExists()) {
				extensionsDao
						.deleteByExtension(TileTableScaling.EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Tile Scaling extension and table. GeoPackage: "
							+ geoPackage.getName(), e);
		}

	}
1234154
public int deleteByTableName(String tableName) throws SQLException {
		DeleteBuilder<FeatureTileLink, FeatureTileLinkKey> db = deleteBuilder();

		db.where().eq(FeatureTileLink.COLUMN_FEATURE_TABLE_NAME, tableName)
				.or().eq(FeatureTileLink.COLUMN_TILE_TABLE_NAME, tableName);

		PreparedDelete<FeatureTileLink> deleteQuery = db.prepare();
		int deleted = delete(deleteQuery);
		return deleted;
	}
662398
private void updateTile(Tile tile, Tile neighbor, Circuit circuit)
    {
        final Iterator<TileRef> iterator = getTiles(circuit).iterator();
        while (iterator.hasNext())
        {
            final TileRef newTile = iterator.next();
            if (mapGroup.getGroup(newTile).equals(mapGroup.getGroup(tile)))
            {
                map.setTile(map.createTile(newTile.getSheet(), newTile.getNumber(), neighbor.getX(), neighbor.getY()));
                break;
            }
        }
    }
446093
@Override
  public void remove( int offset, int length ) throws BadLocationException
  {
    super.remove( offset, length );
    processChangedLines( offset, 0 );
  }
25694
private void populateSyncCachedTiles(final MapTileList pList) {
		synchronized (mCachedTiles) {
			pList.ensureCapacity(mCachedTiles.size());
			pList.clear();
			for (final long index : mCachedTiles.keySet()) {
				pList.put(index);
			}
		}
	}
250148
public boolean delete() {

		boolean deleted = false;

		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
		try {
			if (tileScalingDao.isTableExists()) {
				deleted = tileScalingDao.deleteById(tableName) > 0;
			}
			if (extensionsDao.isTableExists()) {
				deleted = extensionsDao.deleteByExtension(EXTENSION_NAME,
						tableName) > 0 || deleted;
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete tile table scaling for GeoPackage: "
							+ geoPackage.getName() + ", Table: " + tableName, e);
		}

		return deleted;
	}
93352
function() {
        if (this.imgDiv)  {
            this.clear();
            this.imgDiv = null;
            this.frame = null;
        }
        // don't handle async requests any more
        this.asyncRequestId = null;
        OpenLayers.Tile.prototype.destroy.apply(this, arguments);
    }
313018
public void removeAllElements()
  {

    if (null == m_map)
      return;

    for (int i = 0; i < m_firstFree; i++)
    {
      m_map[i] = DTM.NULL;
    }

    m_firstFree = 0;
  }
33591
public void remove(I_CmsEditableGroupRow row) {

        int index = m_container.getComponentIndex(row);
        if (index >= 0) {
            m_container.removeComponent(row);
        }
        updatePlaceholder();
        updateButtonBars();
        updateGroupValidation();
    }
69255
@Override
  public void remove(final int x) {
    final short hb = BufferUtil.highbits(x);
    final int i = highLowContainer.getIndex(hb);
    if (i < 0) {
      return;
    }
    getMappeableRoaringArray().setContainerAtIndex(i,
        highLowContainer.getContainerAtIndex(i).remove(BufferUtil.lowbits(x)));
    if (highLowContainer.getContainerAtIndex(i).isEmpty()) {
      getMappeableRoaringArray().removeAtIndex(i);
    }
  }
640879
function(evt) {
        var tile = evt.object;
        tile.events.un({
            beforedraw: this.queueTileDraw,
            beforeload: this.manageTileCache,
            loadend: this.addToCache,
            unload: this.unloadTile,
            scope: this
        });
        OpenLayers.Util.removeItem(this.tileQueue[tile.layer.map.id], tile);
    }