Skip to content

Commit

Permalink
Added the ability to set x y and z of a merc tile after initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
flippmoke committed Feb 14, 2016
1 parent f6bb066 commit 5a167e7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/vector_tile_merc_tile.hpp
Expand Up @@ -43,16 +43,34 @@ class merc_tile : public tile
{
return x_;
}

void x(std::uint32_t x)
{
x_ = x;
extent_ = merc_extent(tile_size_, x_, y_, z_);
}

std::uint32_t y() const
{
return y_;
}

void y(std::uint32_t y)
{
y_ = y;
extent_ = merc_extent(tile_size_, x_, y_, z_);
}

std::uint32_t z() const
{
return z_;
}

void z(std::uint32_t z)
{
z_ = z;
extent_ = merc_extent(tile_size_, x_, y_, z_);
}
};

typedef std::shared_ptr<merc_tile> merc_tile_ptr;
Expand Down
2 changes: 1 addition & 1 deletion src/vector_tile_tile.hpp
Expand Up @@ -26,7 +26,7 @@ class tile_layer;

class tile
{
private:
protected:
std::string buffer_;
std::set<std::string> painted_layers_;
std::set<std::string> empty_layers_;
Expand Down

0 comments on commit 5a167e7

Please sign in to comment.