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

make Resource a variant type #3374

Closed
Closed

Description

@jfirebaugh
class FileSource : private util::noncopyable {
public:
    virtual std::unique_ptr<FileRequest> requestSource(const std::string& url, Callback) = 0;
    virtual std::unique_ptr<FileRequest> requestSprite(const std::string& url, Callback) = 0;
    virtual std::unique_ptr<FileRequest> requestGlyphs(const std::string& template, const std::string& fontstack, const GlyphRange&, Callback) = 0;
    virtual std::unique_ptr<FileRequest> requestTile(const std::string& template, const TileID&, Callback) = 0;
    // etc
};

This is necessary for offline: the OfflineFileSource needs access to actual z/x/y tile coordinates. It shouldn't try to guess them from the URL because there's no way to do that with 100% reliability.

Activity

  1. self-assigned this
    on Dec 22, 2015
  2. changed the title [-]replace Resource::Kind with FileSource methods for each kind of resource[/-] [+]make Resource a variant type[/+] on Feb 11, 2016
  3. jfirebaugh commented on Feb 11, 2016

    @jfirebaugh
    ContributorAuthor

    Retitled: we should do this with a variant, not with a ton of virtual methods.

  4. removed their assignment
    on Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions