CartoType iOS API 8.8-13-g03c6f7017
for development in Swift and Objective C for iOS and Mac OS
|
#import <CartoTypeBase.h>
Instance Methods | |
(id) | - init |
(id) | - initWithType: |
(id) | - initWithTypeAndSubType:subType: |
(id) | - initWithSubType: |
(void) | - reverseOneWayDirection |
(void) | - setVehicleAccess: |
(id) | - initWithRawValue: |
(uint32_t) | - rawValue |
Properties | |
CartoTypeFeatureDiscriminator | discriminator |
bool | route |
bool | tunnel |
bool | bridge |
int | level |
CartoTypeFeatureType | type |
bool | oneWay |
bool | oneWayForward |
bool | oneWayBackward |
bool | driveOnLeft |
bool | driveOnRight |
bool | roundabout |
bool | toll |
bool | wrongWay |
int | speedLimit |
int | gradient |
bool | pedestrianAccess |
bool | cycleAccess |
bool | motorVehicleAccess |
bool | emergencyVehicleAccess |
bool | otherAccessRestricted |
bool | isPrivate |
int | subType |
Feature information for a map object, represented internally as a 32-bit value.
Every map object has a feature info value. Feature info values fall into two categories: route and non-route.
Route values have a feature type in the range 0...31 (FeatureTypeMotorway...FeatureTypeUnknownRoute); it is used as the index into the speed and bonus arrays in a route profile. Route values have other information relevant to routing including the speed limit and access restrictions.
Non-route values have a feature type in the range 32...32767. Non-route feature types, apart from the special values FeatureTypeUnknownNonRoute (32) and FeatureTypeInvalid (32767), may be expressed as three-letter mnemonics, which can be constructed using the FeatureTypeCode function. Non-route values have an 11-bit sub-type that may be used for fine distinctions such as settlement rank or boundary type.
Both route and non-route values have a level in the range -8...7, where 0 represents ground level. The level is used as one of the criteria determining drawing order.
- (id) init |
Creates a feature info object of type UnknownNonRoute.
- (id) initWithRawValue: | (uint32_t) | aValue |
Creates a feature info object from a raw value. For internal use only.
- (id) initWithSubType: | (int) | aSubType |
Creates a non-route feature info object of type UnknownNonRoute and a given sub-type. The sub-type is clamped to the range 0...2047.
- (id) initWithType: | (CartoTypeFeatureType) | aFeatureType |
Creates a feature info object from a feature type.
- (id) initWithTypeAndSubType: | (CartoTypeFeatureType) | aFeatureType | |
subType: | (int) | aSubType | |
Creates a feature info object with a given type and sub-type. The sub-type is clamped to the range 0...2047, and is ignored if aType is a route type, because routes do not have sub-types.
- (uint32_t) rawValue |
Returns the raw value. For internal use only.
- (void) reverseOneWayDirection |
Reverses the one-way direction if this is a one-way route.
- (void) setVehicleAccess: | (bool) | aValue |
Sets or clears the vehicle access flags. Throws an exception if this is not a route.
|
readwritenonatomicassign |
True if this is a route that is a bridge. Only route objects can made into bridges.
|
readwritenonatomicassign |
True if this is a route and cycle access is allowed.
|
readwritenonatomicassign |
The feature discriminator.
|
readwritenonatomicassign |
True if this is a two-way route and the rule of the road is to drive on the left. The rule of the road cannot be set for non-route objects.
|
readwritenonatomicassign |
Returns true if this is a two-way route and the rule of the road is to drive on the right. The rule of the road cannot be set for non-route objects.
|
readwritenonatomicassign |
True if this is a route and emergency vehicle access is allowed.
|
readwritenonatomicassign |
The gradient as a number in the range 0...7. Values 0...3 are uphill and 4...7 are downhill. Gradients are stored only in route arcs and not usually in other map objects. This property cannot be set for non-route objects.
|
readwritenonatomicassign |
True if this is a route and no normal access is allowed.
|
readwritenonatomicassign |
The level, which is in the range -8 ... 7.
|
readwritenonatomicassign |
True if this is a route and motor vehicle access is allowed. This property cannot be set for non-route objects.
|
readwritenonatomicassign |
True if this is a one-way route. Non-route objects cannot be set as one-way.
|
readwritenonatomicassign |
True if this is a one-way route in the direction opposite to the one in which the route is stored.
|
readwritenonatomicassign |
True if this is a one-way route in the direction in which the route is stored.
|
readwritenonatomicassign |
True if this is a route and there are access restrictions other than those specified by the standard flags. This property cannot be set for non-route objects.
|
readwritenonatomicassign |
True if this is a route and pedestrian access is allowed. This property cannot be set for non-route objects.
|
readwritenonatomicassign |
True if this is a route that is part of a roundabout. This property cannot be set for non-route objects.
|
readwritenonatomicassign |
True if this is a route.
|
readwritenonatomicassign |
The speed limit in kph. A value of zero indicates that no speed limit is known. This property cannot be set for non-route objects.
|
readwritenonatomicassign |
The sub-type. Always 0 if this is a route. This property cannot be set for route objects.
|
readwritenonatomicassign |
True if this is a toll route. This property cannot be set for non-route objects.
|
readwritenonatomicassign |
True if this is a route that is a tunnel. Only route objects can made into tunnels.
|
readwritenonatomicassign |
The feature type. Route objects can only be set to route types, and non-route objects to non-route types.
|
readwritenonatomicassign |
True if this is a route with a one-way direction opposite to the order of its points. This property cannot be set for non-route objects.