GLMapVectorImageFactory
Objective-C
@interface GLMapVectorImageFactory : NSObjectSwift
class GLMapVectorImageFactory : NSObjectGLMapVectorImageFactory is used to render images from SVG files. The image factory caches rendered images for future use.
- 
                  
                  Unavailable It’s a singleton object. Use [GLMapVectorImageFactory sharedFactory]Default -init is disabled. DeclarationObjective-C - (instancetype _Nonnull)init;
- 
                  
                  Disables disk caching if set to YES. The default value isNO.DeclarationObjective-C @property BOOL disableCaching;Swift var disableCaching: Bool { get set }
- 
                  
                  Returns the singleton factory object. DeclarationObjective-C @property (class, nonatomic, readonly) GLMapVectorImageFactory *_Nonnull sharedFactory;Swift class var shared: GLMapVectorImageFactory { get }
- 
                  
                  If not nil, the GLMapVectorImageFactory will try to get image data using this block. If no data is returned, it will fallback to direct file reading. DeclarationObjective-C @property (strong) GLMapResourceBlock _Nonnull resourceBlock;Swift var resourceBlock: GLMapResourceBlock { get set }
- 
                  
                  If the timestamp is changed, the image will be updated. DeclarationObjective-C @property (strong) GLMapTimestampBlock _Nonnull timestampBlock;Swift var timestampBlock: GLMapTimestampBlock { get set }
- 
                  
                  Removes all memory cached images. DeclarationObjective-C - (void)clearCaches;Swift func clearCaches()
- 
                  
                  Deletes all cached image files. DeclarationObjective-C - (void)deleteCachedFiles;Swift func deleteCachedFiles()
- 
                  
                  Renders UIImagefrom an SVG file.DeclarationObjective-C - (nullable PlatformImage *)imageFromSvg:(nonnull NSString *)imagePath;Swift func image(fromSvg imagePath: String) -> NSImage?ParametersimagePathThe path to the SVG file. Return ValueReturns the rendered image. 
- 
                  
                  Renders UIImagefrom an SVG file.DeclarationObjective-C - (nullable PlatformImage *)imageFromSvg:(nonnull NSString *)imagePath withScale:(double)scale;Swift func image(fromSvg imagePath: String, withScale scale: Double) -> NSImage?ParametersimagePathThe path to the SVG file. scaleThe scale applied during rendering. 1.0 - original image size. Return ValueReturns the rendered image. 
- 
                  
                  Renders UIImagefrom an SVG file.DeclarationObjective-C - (nullable PlatformImage *)imageFromSvg:(nonnull NSString *)imagePath withScale:(double)scale andTintColor:(GLMapColor)tintColor;Swift func image(fromSvg imagePath: String, withScale scale: Double, andTintColor tintColor: GLMapColor) -> NSImage?ParametersimagePathThe path to the SVG file. scaleThe scale applied during rendering. 1.0 - original image size. tintColorThe tint color applied to the image. Pass 0when no tint is required.Return ValueReturns the rendered image. 
- 
                  
                  Renders UIImagefrom an SVG file.DeclarationObjective-C - (nullable PlatformImage *)imageFromSvg:(nonnull NSString *)imagePath withSize:(CGSize)size andTintColor:(GLMapColor)tintColor;Swift func image(fromSvg imagePath: String, with size: CGSize, andTintColor tintColor: GLMapColor) -> NSImage?ParametersimagePathThe path to the SVG file. sizeThe target image size. tintColorThe tint color applied to the image. Pass 0when no tint is required.Return ValueReturns the rendered image. 
- 
                  
                  Renders UIImagefrom an SVG file.DeclarationObjective-C - (nullable PlatformImage *)imageFromSvg:(nonnull NSString *)imagePath withSize:(CGSize)size isInCenter:(BOOL)isInCenter andTintColor:(GLMapColor)tintColor;Swift func image(fromSvg imagePath: String, with size: CGSize, isInCenter: Bool, andTintColor tintColor: GLMapColor) -> NSImage?ParametersimagePathThe path to the SVG file. sizeThe target image size. isInCenterImage placement inside the canvas. tintColorThe tint color applied to the image. Pass 0when no tint is required.Return ValueReturns the rendered image. 
- 
                  
                  Renders UIImagefrom an SVG file.DeclarationObjective-C - (nullable PlatformImage *)imageFromSvg:(nonnull NSString *)imagePath transform:(GLMapVectorImageTransform *_Nullable) transform;Swift func image(fromSvg imagePath: String, transform: GLMapVectorImageTransform?) -> NSImage?ParametersimagePathThe path to the SVG file. transformThe transform to apply. Return ValueReturns the rendered image. 
- 
                  
                  Returns the cached image for a key. DeclarationObjective-C - (nullable PlatformImage *)cachedImageWithKey:(nonnull NSString *)key timestamp:(double)timestamp;Swift func cachedImage(withKey key: String, timestamp: Double) -> NSImage?ParameterskeyThe key of the cached image. timestampThe timestamp to check modifications. Return ValueThe cached image or nil if no image is cached for the key or the timestamps are not equal. 
- 
                  
                  Caches an image. DeclarationObjective-C - (void)cacheImage:(nonnull PlatformImage *)img withKey:(nonnull NSString *)key timestamp:(double)timestamp;Swift func cacheImage(_ img: NSImage, withKey key: String, timestamp: Double)ParametersimgThe image to cache. keyThe key of the image. timestampThe timestamp of the image. If NaN, the image will be cached only in memory. 
- 
                  
                  Deletes a cached image. DeclarationObjective-C - (void)deleteCached:(nonnull NSString *)key;Swift func deleteCached(_ key: String)ParameterskeyThe key of the image. 
 Install in Dash
Install in Dash