blob: 15ca2fc5587578e07ffbaac2f6544532db5feea0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#import "MGLRasterSource.h"
#import "MGLSource_Private.h"
#include <mbgl/style/sources/raster_source.hpp>
@implementation MGLRasterSource
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url tileSize:(CGFloat)tileSize {
if (self = [super initWithSourceIdentifier:sourceIdentifier]) {
_URL = url;
_tileSize = tileSize;
}
return self;
}
- (std::unique_ptr<mbgl::style::Source>)mbglSource {
auto source = std::make_unique<mbgl::style::RasterSource>(self.sourceIdentifier.UTF8String,
self.URL.absoluteString.UTF8String,
uint16_t(self.tileSize));
return std::move(source);
}
@end
|