abstract hardcoded URLs for now
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
#define kTileURL "http://localhost:3333/gl/tiles/plain/%d-%d-%d.vector.pbf"
|
||||
#define kSpriteURL "http://localhost:3333/gl/debug/img/sprite"
|
||||
|
||||
namespace llmr {
|
||||
|
||||
class Tile;
|
||||
|
||||
@@ -18,7 +18,7 @@ Map::Map(Settings& settings)
|
||||
|
||||
// TODO: Extract that information from the stylesheet instead of hard coding
|
||||
style.sprite = std::make_shared<Sprite>();
|
||||
style.sprite->load("http://localhost:3333/gl/debug/img/sprite");
|
||||
style.sprite->load(kSpriteURL);
|
||||
}
|
||||
|
||||
Map::~Map() {
|
||||
|
||||
@@ -65,7 +65,7 @@ void Tile::request() {
|
||||
state = Tile::loading;
|
||||
|
||||
// Create http request
|
||||
std::string url = util::sprintf("http://localhost:3333/gl/tiles/plain/%d-%d-%d.vector.pbf",
|
||||
std::string url = util::sprintf(kTileURL,
|
||||
id.z, id.x, id.y);
|
||||
|
||||
// Note: Somehow this feels slower than the change to request_http()
|
||||
|
||||
Reference in New Issue
Block a user