Places
Navmii SDK provides a set of classes responsible for representation of addresses an places of interest (POIs). The most basic classes to represent geographical entities are NMCity, NMState and NMCountry. NMCity contains the following information on a city:
name
transliterated name
city class (a NSInteger taking values from -1 to 15 and representing the size of the city)
if the city is a capital
NSLog(@"city name - %@", city.name);
NSLog(@"transliterated city name - %@, city.transliteratedName");
NSLog(@"city class - %d", (int)city.cityClass);
NSLog(@"is capital - %d", (int)city.isCapital);You can retrieve a state's
code
name
from NMState.
NSLog(@"state name %@", state.name);
NSLog(@"state code %@", state.code);And from NMCountry you can fetch:
ISO 3 Code
name
extended info
Extended info for a NMCountry is a NMCountryInfoExtended instance containing in its turn the following information:
country's speed units
country's distance units
country's driving side
NSLog(@"country ISO 3 code - %@", country.iso3Code);
NSLog(@"country name - %@", country.name);
NSLog(@"country speed units - %d", country.extendedInfo.speedUnits);
NSLog(@"country distance units - %d", country.extendedInfo.distanceUnits);
NSLog(@"country driving side - %d", country.extendedInfo.drivingSide);ADDRESSES
The NMCity, NMState and NMCountry classes are aggregated into NMAddress class. The NMAddress also provides:
county name
administrative hierarchy
street name
route number
house number
NSLog(@"county name - %@", address.country.name);
NSLog(@"state name - %@", address.state.name);
NSLog(@"county name - %@", address.county);
NSLog(@"city name - %@", address.state.name);
NSLog(@"administrative hierarchy - %@", address.adminHierarchy);
NSLog(@"street name - %@", address.street);
NSLog(@"route number - %@", address.routeNumber);
NSLog(@"house number - %@", address.houseNumber);PLACES OF INTEREST
When working with Navmii SDK search services you will also meet NMPlace instances. They represent places of interest (POIs). A NMPlace instance can provide you with the following info:
POI's name
place type
geographical location
POI's address
a BOOL value indicating if the address is approximated
POI data
POI data for a particular place is a NMPoiData instance containing a NSInteger indicating the place's primary category number and a NSArray with numbers of all categories associated with the place.
NSLog(@"place name - %@", place.name);
NSLog(@"place type - %d", place.type);
NSLog(@"coordinates - %f lat, %f lon", place.coordinates.latitude, place.coordinates.longitude);
NSLog(@"address - %@, %@", place.address.street, place.address.houseNumber);
NSLog(@"is adress approximated - %d", place.isAddressApproximated);
NSLog(@"POI category - %d", place.poiData.primaryCategory);
//logs out all categories associated with the POI
for (NSNumber *category in place.poiData.categories) {
NSLog("POI belongs to category %d", [category intValue]);
}