0
在Android中,我們可以得到標記的名稱,因爲這輕按特定標記如何獲得標題名稱
How to perform map marker click in HERE MAP (android)
但在iOS中使用
for (NMALink* item in _resultsArray) // NMAPlaceLink
{
if ([item isKindOfClass:[NMAPlaceLink class]])
{
[self addMarkerAtPlace:(NMAPlaceLink*)item];
}
}
Mutltipe標記正在添加地圖
- (void)addMarkerAtPlace:(NMAPlaceLink*)placeLin
{
NMAImage* img = [NMAImage imageWithUIImage:[UIImage imageNamed:@「」]];
NMAMapMarker *_mapMarker =
[[NMAMapMarker alloc] initWithGeoCoordinates:[placeLink position] icon:img];
[self.mapView addMapObject:_mapMarker];
}
點擊特定標記
-(void)mapView:(NMAMapView *)mapView didSelectObjects:(NSArray *)objects {
NMAMapMarker *mapMarker = objects.firstObject // Unable yo get Title name from objects
}