summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLRasterDEMSource.mm
blob: 27614b9ef404b30a48784c6332b55bb27d304820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#import "MGLRasterDEMSource.h"

#import "MGLRasterTileSource_Private.h"
#import "NSURL+MGLAdditions.h"

#import <mbgl/style/sources/raster_dem_source.hpp>

@implementation MGLRasterDEMSource

- (std::unique_ptr<mbgl::style::RasterSource>)pendingSourceWithIdentifier:(NSString *)identifier configurationURL:(NSURL *)configurationURL tileSize:(CGFloat)tileSize {
    NSString *configurationURLString = configurationURL.mgl_URLByStandardizingScheme.absoluteString;
    return std::make_unique<mbgl::style::RasterDEMSource>(identifier.UTF8String,
                                                          configurationURLString.UTF8String,
                                                          uint16_t(round(tileSize)));
}

@end