我得到了 a 的结果,MKLocalSearch
它包括类似...
{
address = {
formattedAddressLine = (
"Marton Road",
Middlesbrough,
TS1,
England
);
structuredAddress = {
administrativeArea = England;
areaOfInterest = (
"Great Britain"
);
country = "United Kingdom";
countryCode = GB;
fullThoroughfare = "Marton Road";
geoId = (
);
locality = Middlesbrough;
postCode = TS1;
subAdministrativeArea = Middlesbrough;
thoroughfare = "Marton Road";
};
};
addressGeocodeAccuracy = 0;
business = (
{
UID = 9301704419119613323;
URL = "http://www.cineworld.co.uk";
attribution = (
{
attributionURLs = (
"yelp5.3:///biz/cineworld-middlesbrough",
"yelp4:///biz/cineworld-middlesbrough",
"yelp:///biz/cineworld-middlesbrough",
"http://yelp.com/biz/cineworld-middlesbrough"
);
sourceIdentifier = "com.yelp";
sourceVersion = 1;
}
);
canBeCorrectedByBusinessOwner = 1;
name = Cineworld;
source = (
{
"source_id" = "b2LOPag6ha6845__dgXehw";
"source_name" = yelp;
},
{
"source_id" = 6670;
"source_name" = tribune;
},
{
"source_id" = 2000000103009680;
"source_name" = "acxiom_intl";
},
{
"source_id" = "cineworld-middlesbrough";
"source_name" = "yelp_alias";
}
);
"star_rating" = (
0
);
telephone = "+448712002000";
}
);
center = {
lat = "54.57633773904653";
lng = "-1.228197113614671";
};
inputLanguage = en;
localSearchProviderID = 9902;
mapRegion = {
eastLng = "-1.224891596539819";
northLat = "54.57545000290778";
southLat = "54.5738619816233";
westLng = "-1.227631256834202";
};
name = Cineworld;
type = 57;
}
现在,当我将它添加到我的地图时......
id <MKAnnotation> annotation = mapItem.placemark;
[self.mapView addAnnotation:annotation];
它添加了一个图钉,当我点击它时会显示“Marton Road”,但我希望它显示“Cineworld”。
我发现很难找到任何有关将东西从其中取出MKMapItem
并放入其中的信息MKPlacemark
。
如果我尝试mapItem.name
在地标中使用,那么它们都会显示“美国”。
知道如何从中获得更多有用的信息吗?