MSFTileUtils

Objective-C


@interface MSFTileUtils : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

Swift

class MSFTileUtils : NSObject

A helper class for mapping coordinates to tiles and back.

  • Calculates the map tile corresponding to specified point and zoom level.

    Declaration

    Objective-C

    + (MSFMapTile *)calculateMapTile:(MSFMapPos *)mapPos
                                zoom:(int)zoom
                                proj:(MSFProjection *)proj;

    Swift

    class func calculateMapTile(_ mapPos: MSFMapPos!, zoom: Int32, proj: MSFProjection!) -> MSFMapTile!

    Parameters

    mapPos

    Coordinates for the point.

    zoom

    Zoom level for the tile.

    proj

    The projection to use for tile and point.

    Return Value

    The corresponding map tile.

  • Calculates the map tile corresponding to specified point and zoom level. If the resulting tile is outside the valid range, it will be clipped.

    Declaration

    Objective-C

    + (MSFMapTile *)calculateClippedMapTile:(MSFMapPos *)mapPos
                                       zoom:(int)zoom
                                       proj:(MSFProjection *)proj;

    Swift

    class func calculateClippedMapTile(_ mapPos: MSFMapPos!, zoom: Int32, proj: MSFProjection!) -> MSFMapTile!

    Parameters

    mapPos

    Coordinates for the point.

    zoom

    Zoom level for the tile.

    proj

    The projection to use for tile and point.

    Return Value

    The corresponding map tile.

  • Calculates origin coordinates for the given map tile.

    Declaration

    Objective-C

    + (MSFMapPos *)calculateMapTileOrigin:(MSFMapTile *)mapTile
                                     proj:(MSFProjection *)proj;

    Swift

    class func calculateMapTileOrigin(_ mapTile: MSFMapTile!, proj: MSFProjection!) -> MSFMapPos!

    Parameters

    mapTile

    The map tile to use.

    proj

    The projection to use for origin.

    Return Value

    The corresponding tile origin.

  • Calculates bounds for the given map tile.

    Declaration

    Objective-C

    + (MSFMapBounds *)calculateMapTileBounds:(MSFMapTile *)mapTile
                                        proj:(MSFProjection *)proj;

    Swift

    class func calculateMapTileBounds(_ mapTile: MSFMapTile!, proj: MSFProjection!) -> MSFMapBounds!

    Parameters

    mapTile

    The map tile to use.

    proj

    The projection to use for bounds.

    Return Value

    The corresponding tile bounds.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()