-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add language parameter to offline tileset descriptor creation functio…
…ns - SSDK-622
- Loading branch information
Showing
3 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 18 additions & 4 deletions
22
Sources/MapboxSearch/InternalAPI/CoreSearchEngineStatics.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
import Foundation | ||
|
||
enum CoreSearchEngineStatics { | ||
static func createTilesetDescriptor(dataset: String, version: String) -> MapboxCommon.TilesetDescriptor { | ||
CoreSearchEngine.createTilesetDescriptor(forDataset: dataset, version: version) | ||
static func createTilesetDescriptor(dataset: String, version: String, language: String? = nil) -> MapboxCommon | ||
.TilesetDescriptor { | ||
let identifier: String | ||
if let language { | ||
identifier = dataset + "|" + language | ||
} else { | ||
identifier = dataset | ||
} | ||
return CoreSearchEngine.createTilesetDescriptor(forDataset: identifier, version: version) | ||
} | ||
|
||
static func createPlacesTilesetDescriptor(dataset: String, version: String) -> MapboxCommon.TilesetDescriptor { | ||
CoreSearchEngine.createPlacesTilesetDescriptor(forDataset: dataset, version: version) | ||
static func createPlacesTilesetDescriptor(dataset: String, version: String, language: String? = nil) -> MapboxCommon | ||
.TilesetDescriptor { | ||
let identifier: String | ||
if let language { | ||
identifier = dataset + "|" + language | ||
} else { | ||
identifier = dataset | ||
} | ||
return CoreSearchEngine.createPlacesTilesetDescriptor(forDataset: identifier, version: version) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters