2

I'm developing an iOS game with a Mapview, where I want to select an opponent from the multiple annotations on Map then I'll hit him. In the Map first user will select a range where he/she will find opponent and at that time some area(in particular angle) of map will fade in (pls see image), So the trouble which I have is I want to enable only those user/annotation which are in no-shaded area, this area will be an angle of 60 degrees, currently I'm using just an Imageview over the map to show the shaded area. How can I achieve this, Every suggestion would be appreciated. enter image description here

Eager Beaver
  • 949
  • 3
  • 11
  • 20

1 Answers1

0

Try this:

Convert all your Annotations lat, lat to x,y & find point inside the triangle. If so add those annotations.

determine whether point lies inside triangle

Community
  • 1
  • 1
ram.Iphone
  • 51
  • 4