• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [iPhone] iterate through all the MKPolygons on my map view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] iterate through all the MKPolygons on my map view


  • Subject: Re: [iPhone] iterate through all the MKPolygons on my map view
  • From: Philip Vallone <email@hidden>
  • Date: Sat, 13 Nov 2010 09:18:24 -0500



Never mind -

> overlay.title

does the trick - duh


On Nov 13, 2010, at 8:51 AM, Philip Vallone wrote:

> Hi,
>
> I have added some MKPolygons to my map view. I want to loop through all my polygons and delete the one that has a certain title. My question is; how do I access the properties of the mkpolygon after the overlays have been added to the map view.
>
> This is how I am creating the MKPolygon
>
> MKPolygon* poly = [MKPolygon polygonWithCoordinates:points count:[myPoints count]];
> poly.title = @"someName";
> self.strokeColor = [[UIColor redColor] colorWithAlphaComponent:0.5];
> [mapView addOverlay:poly];
>
> In this loop, I am trying to access all the overlays, But I don't know how to access the MKPolygon. How do I iterate through all the MKPolygons on my map view?
>
> for (id <MKOverlay> overlay in mapView.overlays) {
>
>  //todo access polygons title property
>
> }
>
> Thanks
>
> Phil
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >[iPhone] iterate through all the MKPolygons on my map view (From: Philip Vallone <email@hidden>)

  • Prev by Date: Re: Default keyword selector type
  • Next by Date: Numbers and mutable sets and retain counts, oh my!
  • Previous by thread: [iPhone] iterate through all the MKPolygons on my map view
  • Next by thread: Numbers and mutable sets and retain counts, oh my!
  • Index(es):
    • Date
    • Thread