Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

make TileID more similar to -js's TileCoord #3529

Closed
ansis opened this issue Jan 13, 2016 · 3 comments
Closed

make TileID more similar to -js's TileCoord #3529

ansis opened this issue Jan 13, 2016 · 3 comments

Comments

@ansis
Copy link
Contributor

ansis commented Jan 13, 2016

  • x values are wrapped by worlds in -js but not in -native
  • w value doesn't make sense in -native
  • names are different
@jfirebaugh
Copy link
Contributor

Regarding tile wrapping, the changes I would like to see are:

  • Two different types: TileID (wrapped x coordinate; prefer this type unless you specifically need an unwrapped ID) and UnwrappedTileID (unwrapped x coordinate + w)
  • UnwrappedTileID has TileID wrap() const method; no other conversions are available
  • tileCover returns UnwrappedTileIDs
  • Remove Source::getLoadedTiles() and Source::getTiles()
  • Add Source::getCoveringUnwrappedTileIDs(), Source::getTile(const TileID&) and maybe Source::getTile(const UnwrappedTileID&)
  • Change TransformState::matrixFor parameter to UnwrappedTileID
  • Fix ripples from those changes

@jfirebaugh
Copy link
Contributor

The names TileCoordinate and UnwrappedTileCoordinate would be ok with me too, but we'll need to clear away the existing TileCoordinate type first.

@jfirebaugh
Copy link
Contributor

#3834

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants