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.
Try this:
Convert all your Annotations lat, lat to x,y & find point inside the triangle. If so add those annotations.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.