diff options
Diffstat (limited to 'include/mbgl/map')
-rw-r--r-- | include/mbgl/map/map.hpp | 11 | ||||
-rw-r--r-- | include/mbgl/map/map_options.hpp | 49 |
2 files changed, 8 insertions, 52 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index b4f60a19ba..be8bf45142 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -12,6 +12,7 @@ #include <mbgl/map/camera.hpp> #include <mbgl/util/geometry.hpp> #include <mbgl/map/projection_mode.hpp> +#include <mbgl/storage/resource_options.hpp> #include <cstdint> #include <string> @@ -21,7 +22,6 @@ namespace mbgl { -class FileSource; class Scheduler; class RendererFrontend; @@ -36,9 +36,9 @@ public: MapObserver&, Size size, float pixelRatio, - FileSource&, Scheduler&, - const MapOptions&); + const MapOptions&, + const ResourceOptions&); ~Map(); // Register a callback that will get called (on the render thread) when all resources have @@ -137,9 +137,12 @@ public: bool isFullyLoaded() const; void dumpDebugLogs() const; -private: +protected: class Impl; const std::unique_ptr<Impl> impl; + + // For testing only. + Map(std::unique_ptr<Impl>); }; } // namespace mbgl diff --git a/include/mbgl/map/map_options.hpp b/include/mbgl/map/map_options.hpp index 13772332a8..f2297484a3 100644 --- a/include/mbgl/map/map_options.hpp +++ b/include/mbgl/map/map_options.hpp @@ -3,14 +3,13 @@ #include <mbgl/map/mode.hpp> #include <memory> -#include <string> namespace mbgl { /** * @brief Holds values for Map options. */ -class MapOptions { +class MapOptions final { public: /** * @brief Constructs a MapOptions object with default values. @@ -69,52 +68,6 @@ public: ViewportMode viewportMode() const; /** - * @brief Sets the cache path. - * - * @param path Cache path. - * @return reference to MapOptions for chaining options together. - */ - MapOptions& withCachePath(std::string path); - - /** - * @brief Gets the previously set (or default) cache path. - * - * @return cache path - */ - const std::string& cachePath() const; - - /** - * @brief Sets the asset path, which is the root directory from where - * the asset:// scheme gets resolved in a style. - * - * @param path Asset path. - * @return reference to MapOptions for chaining options together. - */ - MapOptions& withAssetRoot(std::string path); - - /** - * @brief Gets the previously set (or default) asset path. - * - * @return asset path - */ - const std::string& assetRoot() const; - - /** - * @brief Sets the maximum cache size. - * - * @param size Cache maximum size in bytes. - * @return reference to MapOptions for chaining options together. - */ - MapOptions& withMaximumCacheSize(uint64_t size); - - /** - * @brief Gets the previously set (or default) maximum allowed cache size. - * - * @return maximum allowed cache database size in bytes. - */ - uint64_t maximumCacheSize() const; - - /** * @brief Specify whether to enable cross-source symbol collision detection * or not. By default, it is set to true. * |