GPXTileServer
enum GPXTileServer : Int
Configuration for supported tile servers.
Maps displayed in the application are sets of small square images caled tiles. There are different servers that provide these tiles.
A tile server is defined by an internal id (for instance .openStreetMap), a name string for displaying on the interface and a URL template.
-
Apple tile server
Declaration
Swift
case apple
-
Apple satellite tile server
Declaration
Swift
case appleSatellite
-
Open Street Map tile server
Declaration
Swift
case openStreetMap
-
CartoDB tile server
Declaration
Swift
case cartoDB
-
CartoDB tile server (2x tiles)
Declaration
Swift
case cartoDBRetina
-
OpenTopoMap tile server
Declaration
Swift
case openTopoMap
-
OpenSeaMap tile server
Declaration
Swift
case openSeaMap
-
String that describes the selected tile server.
Declaration
Swift
var name: String { get }
-
URL template of current tile server (it is of the form http://{s}.map.tile.server/{z}/{x}/{y}.png
Declaration
Swift
var templateUrl: String { get }
-
In the
templateUrl
the {s} means subdomain, typically the subdomains available are a,b and c Check the subdomains available for your server.Set an empty array (
[]
) in case you don’t use{s}
in yourtemplateUrl
.Subdomains is useful to distribute the tile request download among the diferent servers and displaying them faster as result.
Declaration
Swift
var subdomains: [String] { get }
-
Maximum zoom level the tile server supports Tile servers provide files till a certain level of zoom that ranges from 0 to maximumZ. If map zooms more than the limit level, tiles won’t be requested.
Typically the value is around 19,20 or 21.
Use negative to avoid setting a limit.
Declaration
Swift
var maximumZ: Int { get }
-
Minimum zoom supported by the tile server
This limits the tiles requested based on current zoom level. No tiles will be requested for zooms levels lower that this.
Needs to be 0 or larger.
Declaration
Swift
var minimumZ: Int { get }
-
Does the tile overlay replace the map? Generally all the tiles provided replace the AppleMaps. However there are some
Declaration
Swift
var canReplaceMapContent: Bool { get }
-
tile size of the third-party tile.
1x tiles are 256x256 2x/retina tiles are 512x512
Declaration
Swift
var tileSize: Int { get }
-
Declaration
Swift
var needForceDarkMode: Bool { get }
-
Returns the number of tile servers currently defined
Declaration
Swift
static var count: Int { get }