Load collisions for each tile. Previous collisions will be removed.

@param mapCollision The map tile collision owner.
493046
private void loadTilesCollisions(MapTileCollision mapCollision)
    {
        for (int v = 0; v < map.getInTileHeight(); v++)
        {
            for (int h = 0; h < map.getInTileWidth(); h++)
            {
                final Tile tile = map.getTile(h, v);
                if (tile != null)
                {
                    loadTileCollisions(mapCollision, tile);
                }
            }
        }
    }
1184681
protected void handleCollision(CmsPositionBean p1, CmsPositionBean p2) {

        CmsPositionBean positionToChange = p1;
        if (p1.getTop() <= p2.getTop()) {
            positionToChange = p2;
        }
        positionToChange.setTop(positionToChange.getTop() + 25);
    }
575044
private void update(Collision collision,
                        double x,
                        double y,
                        int width,
                        int height,
                        Map<Collision, Rectangle> cacheRectRender)
    {
        if (boxs.containsKey(collision))
        {
            final Rectangle rectangle = boxs.get(collision);
            rectangle.set(x, y, width, height);
            cacheRectRender.get(collision).set(x, y, width, height);
        }
        else
        {
            final Rectangle rectangle = new Rectangle(x, y, width, height);
            cacheColls.add(collision);
            cacheRect.add(rectangle);
            cacheRectRender.put(collision, new Rectangle(x, y, width, height));
            boxs.put(collision, rectangle);
        }
    }
1007264
private void reloadMarker() {
        // initialized
        if (mCurrentBackgroundMarkerLoaderTask == null) {
            // start background load
            double zoom = this.mMapView.getZoomLevelDouble();
            BoundingBox world = this.mMapView.getBoundingBox();

            reloadMarker(world, zoom);
        } else {
            // background load is already active. Remember that at least one scroll/zoom was missing
			mMissedMapZoomScrollUpdates++;
		}
    }
1285399
private static <K,V> void combineMaps(Map<K,V> m1, Map<K,V> m2)
    {
    	for (Map.Entry<K,V> me : m2.entrySet()) {
            K key = me.getKey();
            /* Int. subset has precedence, but let's guess most of
             * the time there are no collisions:
             */
            V old = m1.put(key, me.getValue());
            // Oops, got value! Let's put it back
            if (old != null) {
                m1.put(key, old);
            }
        }
    }
944918
function(done) {
    var self = this;
    this.fire('updated');
    this.fire('loading');
    var map = this.options.map;

    this.getTiles(function(urls, err) {
      if(urls) {
        self.tilejson = urls;
        self.setUrl(self.tilejson.tiles[0]);
        // manage interaction
        self._reloadInteraction();
        self.ok && self.ok();
        done && done();
      } else {
        self.error && self.error(err);
        done && done();
      }
    });
  }
1046399
private void update(CollisionCategory category)
    {
        final CollisionResult result = results.get(category.getName());

        if (result != null
            && (result.getX() != null || result.getY() != null)
            && Boolean.TRUE.equals(enabledAxis.get(category.getAxis())))
        {
            onCollided(result, category);
        }
    }
857996
private void updateTile(Collection<Tile> resolved, Collection<Tile> toResolve, Tile tile, int ox, int oy)
    {
        final int tx = tile.getInTileX();
        final int ty = tile.getInTileY();

        final Tile neighbor = map.getTile(tx + ox, ty + oy);
        if (neighbor != null)
        {
            updateNeigbor(resolved, toResolve, tile, neighbor, ox, oy);
        }
    }
804996
private void onCollided(CollisionResult result, CollisionCategory category)
    {
        for (final TileCollidableListener listener : listeners)
        {
            listener.notifyTileCollided(result, category);
        }
    }
420977
@Override
    protected void createTileCaches() {
        this.tileCaches.add(AndroidUtil.createTileCache(this, getPersistableId(),
                this.mapView.getModel().displayModel.getTileSize(), this.getScreenRatio(),
                this.mapView.getModel().frameBufferModel.getOverdrawFactor()));
    }
671941
public Collision<T> set (Collision<T> collision) {
		this.point.set(collision.point);
		this.normal.set(collision.normal);
		return this;
	}
652290
function(){

            var isX
                ,hash
                ,tr1
                ,tr2
                ,bound
                ,list
                ,len
                ,i
                ,j
                ,c
                // determine which axis is the last we need to check
                ,collisionFlag = 1 << (dof.z + 1) << (dof.y + 1) << (dof.x + 1)
                ,encounters = this.encounters
                ,enclen = 0
                ,candidates = this.candidates
                ;

            Physics.util.clearArray( encounters );
            Physics.util.clearArray( candidates );

            for ( var xyz = 0; xyz < maxDof; ++xyz ){

                // is the x coord
                isX = (xyz === 0);
                // get the interval list for this axis
                list = this.intervalLists[ xyz ];

                // for each interval bound
                for ( i = 0, len = list.length; i < len; i++ ){

                    bound = list[ i ];
                    tr1 = bound.tracker;

                    if ( bound.type ){

                        // is a max

                        j = enclen;

                        for ( j = enclen - 1; j >= 0; j-- ){

                            tr2 = encounters[ j ];

                            // if they are the same tracked interval
                            if ( tr2 === tr1 ){

                                // remove the interval from the encounters list
                                // faster than .splice()
                                if ( j < enclen - 1 ) {

                                    encounters[ j ] = encounters.pop();

                                } else {

                                    // encountered a max right after a min... no overlap
                                    encounters.pop();
                                }

                                enclen--;

                            } else {

                                // check if we have flagged this pair before
                                // if it's the x axis, create a pair
                                c = this.getPair( tr1, tr2, isX );

                                if ( c && c.flag < collisionFlag ){

                                    // if it's greater than the axis index, set the flag
                                    // to = 0.
                                    // if not, increment the flag by one.
                                    c.flag = c.flag << (xyz + 1);

                                    // c.flag will equal collisionFlag
                                    // if we've incremented the flag
                                    // enough that all axes are overlapping
                                    if ( c.flag === collisionFlag ){

                                        // overlaps on all axes.
                                        // add it to possible collision
                                        // candidates list for narrow phase

                                        candidates.push( c );
                                    }
                                }
                            }
                        }

                    } else {

                        // is a min
                        // just add this minimum to the encounters list
                        enclen = encounters.push( tr1 );
                    }
                }
            }

            return candidates;
        }
823973
private void onCachesCollected() {
      if (isTraceEnabled()) {
         log().tracef("[%s] All caches collected: %s", xid, cacheNames);
      }
      int size = cacheNames.size();
      if (size == 0) {
         //it can happen if all caches either commit or thrown an exception
         sendReply();
         return;
      }

      List<CompletableFuture<Void>> futures = new ArrayList<>(size);
      for (ByteString cacheName : cacheNames) {
         try {
            futures.add(completeCache(cacheName));
         } catch (Throwable t) {
            hasErrors = true;
         }
      }
      CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).thenRun(this::sendReply);
   }
1075555
private void renderCollision(Graphic g, TileCollision tile, int x, int y)
    {
        for (final CollisionFormula collision : tile.getCollisionFormulas())
        {
            final ImageBuffer buffer = collisionCache.get(collision);
            if (buffer != null)
            {
                g.drawImage(buffer, x, y);
            }
        }
    }
758263
public void removeLayerFromCache(LayerImpl layer) {
		if (layer.getId() != layerId) {
			throw new IllegalStateException();
		}
		LayerCacheImpl layerCache = layerCacheRef.get();
		if (layerCache != null) {
			layerCache.remove(layer.getKey(), layer);
		}
	}
533759
def grab_collisions(self, coords):
        
        collisions = []
        top_left = self.pixels_to_tiles(coords)
        collisions.append(self.tiles[top_left.Y][top_left.X])

        #Check to see if we are perfectly aligned with a tile
        tile_width = int(self.spritesheet[0].width)
        tile_height = int(self.spritesheet[0].width)
        x_aligned = int((coords.X)) & (tile_width - 1)
        y_aligned = int((coords.Y)) & (tile_height - 1)

        if x_aligned > 0:
            #Append the top right tile touching the rectangle
            if self.is_valid_tile(top_left.X + 1, top_left.Y):
                collisions.append(self.tiles[top_left.Y][top_left.X + 1])

        if y_aligned > 0:
            #Append the bottom left tile touching the rectangle
            if self.is_valid_tile(top_left.X, top_left.Y + 1):
                collisions.append(self.tiles[top_left.Y + 1][top_left.X])

            if x_aligned > 0:
                if self.is_valid_tile(top_left.X + 1, top_left.Y + 1):
                    collisions.append(self.tiles[top_left.Y + 1][top_left.X + 1])

        return collisions
714150
private void reloadMarker(BoundingBox latLonArea, double zoom) {
        Log.d(TAG,"reloadMarker " + latLonArea + ", zoom " + zoom);
        this.mCurrentBackgroundMarkerLoaderTask = new BackgroundMarkerLoaderTask();
        this.mCurrentBackgroundMarkerLoaderTask.execute(
                latLonArea.getLatSouth(), latLonArea.getLatNorth(),
                latLonArea.getLonEast(), latLonArea.getLonWest(), zoom);
    }