ios - How can I change annotation title on Apple Maps Route -


i've created route b mkmapitem, can't change title of annotation on map. code:

cllocation *locationrestaurante = [[cllocation alloc] initwithlatitude:[[[listarestaurante objectatindex:0] objectforkey:@"latitude"] floatvalue] longitude:[[[listarestaurante objectatindex:0] objectforkey:@"longitude"] floatvalue]];          mkplacemark *place = [[mkplacemark alloc] initwithcoordinate:locationrestaurante.coordinate addressdictionary:nil];          mkmapitem *mapitem = [[mkmapitem alloc]initwithplacemark:place];          nsdictionary *options = @{mklaunchoptionsdirectionsmodekey:mklaunchoptionsdirectionsmodedriving};          [mapitem openinmapswithlaunchoptions:options]; 

it opens fine... there's 1 problem: can't change annotation name:

unknown location

mapitem.name = @"place name"; 

mkmapitem class reference


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -