-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
const std::string text = std::string(id) + " - " + TileData::StateToString(state); | ||
fontBuffer.addText(text.c_str(), 50, 200, 5); | ||
|
||
if (modified > 0 && expires > 0) { | ||
const std::string modifiedText = "modified: " + util::rfc1123(modified); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we find a shorter representation of the date, e.g. "Y-m-d H:i:s" and imply GMT?
Neat 👍 |
Cool, this should be useful. |
As on GL JS, we should probably look into splitting this out separately from tile borders/labels and collision boxes. Things are getting crowded and turning one on means turning all on, which sometimes gets in the way. |
Maybe we should have something like |
3395d5a
to
e37218e
Compare
@incanus @tmpsantos good idea. I've added The example below better illustrates the new behavior for |
❤️ |
e37218e
to
3acfa72
Compare
Text collision debug is now a flag |
3acfa72
to
8bf2215
Compare
} | ||
|
||
inline bool getCollisionDebug() const { | ||
return collisionDebug; | ||
inline void toggleDebug() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename toggleDebug
to reflect what it actually does? It's not really toggling rather than cycling through the options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point @kkaefer 👍 In that sense MapDebugMode
should be also called MapDebugOptions
instead. I'll update the code accordingly.
f2bb1de
to
7b034f4
Compare
Added aliases for std::chrono typedefs (eg. 'Seconds' for std::chrono::seconds). These aliases are used together with templated helper functions to replace time_t with std::chrono::seconds for most cases, in particular for 'modified' and 'expires' values in Response.
Map debug options are now cycled up to all debug options enabled, then back to none.
7b034f4
to
92856f3
Compare
Restored (but deprecated) a method removed in #3100 to avoid a major version bump.
Besides tile identification and status, I believe it would be a nice feat to have the associated tile timestamp information.
By timestamp I refer to the time point used together with expiry date to calculate if the cached tile data is still valid.
/cc @mapbox/gl