Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion ios/RCTMGL-v10/RCTMGLVectorSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import MapboxMaps
@objc
class RCTMGLVectorSource : RCTMGLTileSource {

@objc var attribution: String?
@objc var maxZoomLevel: NSNumber?
@objc var minZoomLevel: NSNumber?
@objc var tileUrlTemplates: [String] = []
@objc var tms: Bool = false

override func sourceType() -> Source.Type {
return VectorSource.self
Expand All @@ -17,7 +21,18 @@ class RCTMGLVectorSource : RCTMGLTileSource {
} else {
result.tiles = tileUrlTemplates
}

if let attribution = attribution {
result.attribution = attribution
}
if let maxZoomLevel = maxZoomLevel {
result.maxzoom = maxZoomLevel.doubleValue
}
if let minZoomLevel = minZoomLevel {
result.minzoom = minZoomLevel.doubleValue
}
if tms {
result.scheme = .tms
}
return result
}

Expand Down