objective c - How to get particular Marker id in Google Map iOS SDK -


i working on google map ios sdk. here create multiple markers in separate location co-ordinates.

now need add identifier such tag markers perform action particular marker.

if tag or other identifier option not available in google map ios sdk, please suggest me how archive it.

thanks in advance.

what inherit gmsmarker , add whatever data need this, guess best , easiest option have.

@interface atgooglemapsselectivemarker : gmsmarker  @property (nonatomic) int markerid; @property (nonatomic) int order; @property (strong, nonatomic) nsobject* referenceobject; @property (nonatomic) bool selected;  @end 

edit:

i thought clear i'll continue on how data... when create markers , add them map, create atgooglemapsselectivemarker , add map after fill need, register class want delegate implements gmsmapviewdelegate , implement method

- (bool)mapview:(gmsmapview *)mapview didtapmarker:(gmsmarker *)marker {     // here sure marker object of type atgooglemapsselectivemarker won't harm double check    if ([marker iskindofclass:[atgooglemapsselectivemarker class]]) {        atgooglemapsselectivemarker* parsedmarker = (atgooglemapsselectivemarker*)marker;        nslog(@"%d", parsedmarker.markerid);    }      return yes; } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -