method
calcPosition(camera:geometry:screenArea:tilt:bearing:size:)
public func calcPosition(
camera: BaseCamera,
geometry: Geometry,
screenArea: Padding? = nil,
tilt: Tilt? = nil,
bearing: Bearing? = nil,
size: ScreenSize? = nil
) -> CameraPosition
camera
Camera used to calculate the position.
geometry
Geometric object to fit into the screen area specified by the screen_area parameter.
screenArea
Screen area to embed geometry. If not set, camera padding is used for calculation.
tilt
Tilt
bearing
Bearing
size
View area size. If not specified, the ICamera::size() value is used.
calcPosition(camera:objects:screenArea:tilt:bearing:size:)
public func calcPosition(
camera: BaseCamera,
objects: [SimpleMapObject],
screenArea: Padding? = nil,
tilt: Tilt? = nil,
bearing: Bearing? = nil,
size: ScreenSize? = nil
) -> CameraPosition
camera
Camera used to calculate the position.
objects
Map objects to be embedded in the screen area specified by the screen_area parameter.
screenArea
Screen area to embed geometry. If not set, camera padding is used for calculation.
tilt
Tilt
bearing
Bearing
size
Size of the view area. If not specified, the value of ICamera::size() is used.
createRasterTileDataSource(context:sublayerName:urlTemplate:)
public func createRasterTileDataSource(
context: Context,
sublayerName: String,
urlTemplate: String
) -> Source
context
Context.
sublayerName
Name to be used when generating objects. This name must be specified in the styles in the filter condition of the raster type layer for the db_sublayer attribute. Example: [“match”, [“get”, “db_sublayer”], [“NAME”], true, false] For details, see the specification: https://docs.2gis.com/en/mapgl/stylespecification
urlTemplate
URL template for the tile request, must contain substring {x}, {y} and {z}, which when substituted with numeric values form a valid URL to which a request for tile data will be sent.
createRawMyLocationController()
public func createRawMyLocationController() -> MyLocationController
createSmoothMyLocationController()
public func createSmoothMyLocationController() -> MyLocationController
createStyleZoomToTiltRelation(points:)
public func createStyleZoomToTiltRelation(
points: [StyleZoom: Tilt]
) -> StyleZoomToTiltRelation
Dependence of the camera tilt angle on the style zoom level, if the dependence could not be created - throw an exception.
getHttpCacheManager(context:)
public func getHttpCacheManager(
context: Context
) -> HttpCacheManager?
getInstructionManeuver(extraInstructionInfo:)
public func getInstructionManeuver(
extraInstructionInfo: ExtraInstructionInfo
) -> InstructionManeuver
getLanesControlImages(laneSign:maxCount:ignoreActiveManeuver:)
public func getLanesControlImages(
laneSign: RouteLaneSign,
maxCount: UInt32,
ignoreActiveManeuver: Bool
) -> [LanesControlImage]
getLocaleManager(context:)
public func getLocaleManager(
context: Context
) -> LocaleManager
getPackageManager(context:)
public func getPackageManager(
context: Context
) -> PackageManager
getRoadMacroGraph(context:)
public func getRoadMacroGraph(
context: Context
) -> RoadMacroGraph
getSystemMemoryManager(context:)
public func getSystemMemoryManager(
context: Context
) -> SystemMemoryManager
getTerritoriesAlongRouteProvider(context:)
public func getTerritoriesAlongRouteProvider(
context: Context
) -> TerritoriesAlongRouteProvider
getTerritoryManager(context:)
public func getTerritoryManager(
context: Context
) -> TerritoryManager
getVoiceManager(context:)
public func getVoiceManager(
context: Context
) -> VoiceManager
parseGeoJson(geoJsonData:)
public func parseGeoJson(
geoJsonData: String
) -> [GeometryMapObject]
parseGeoJsonFile(fsPath:)
public func parseGeoJsonFile(
fsPath: String
) -> [GeometryMapObject]
projectionZToStyleZ(projectionZ:latitude:)
public func projectionZToStyleZ(
projectionZ: Zoom,
latitude: Latitude
) -> StyleZoom
remainingRouteGeometry(fullRouteGeometry:currentRoutePoint:)
public func remainingRouteGeometry(
fullRouteGeometry: GeoPointRouteAttribute,
currentRoutePoint: RoutePoint
) -> GeoPointRouteAttribute
fullRouteGeometry
Full geometry of the entire route.
currentRoutePoint
Current position on the route.
Geometry of the rest of the route.
routeMatchesTruckPassZonePasses(truckPassZoneIds:passZonePasses:)
public func routeMatchesTruckPassZonePasses(
truckPassZoneIds: TruckPassZoneIdRouteLongAttribute,
passZonePasses: [TruckPassZonePass]
) -> Bool
truckPassZoneIds
Route attribute with truck pass zone identifiers.
passZonePasses
Passes for passing through truck pass zones.
Signifies whether there are enough passes to pass a route.
styleZToProjectionZ(styleZ:latitude:)
public func styleZToProjectionZ(
styleZ: StyleZoom,
latitude: Latitude
) -> Zoom
toMapGeometry(geometry:)
public func toMapGeometry(
geometry: GeoPointRouteAttribute
) -> Geometry
zoomOutToFit(camera:geometry:size:)
public func zoomOutToFit(
camera: BaseCamera,
geometry: Geometry,
size: ScreenSize? = nil
) -> CameraPosition
camera
Camera used to calculate the position.
geometry
Geometric object to fit into the screen area specified by the camera's padding.
size
View area size. If not specified, the ICamera::size() value is used.
zoomOutToFit(camera:objects:size:)
public func zoomOutToFit(
camera: BaseCamera,
objects: [SimpleMapObject],
size: ScreenSize? = nil
) -> CameraPosition
camera
Camera used to calculate the position.
objects
Map objects to fit into the screen area specified by the camera padding.
size
View area size. If not specified, the ICamera::size() value is used.