我必须在图像上找到我的位置。 http://www.mallorcaresidencia.com/layout/map_230_0.png
触摸北区,点击中心,点击南方等,找到位置特定区域,然后生成事件。
if (((touchLocation.x <219 && touchLocation.y>19) && (touchLocation.x <221 && touchLocation.y<97)) || ((touchLocation.x <143 && touchLocation.y<78) && (touchLocation.x >129 && touchLocation.y<58))) {
cellimgmap.image = [UIImage imageNamed:@"map_north.png"];
}else if (((touchLocation.x >218 && touchLocation.y<94) && (touchLocation.x <270 && touchLocation.y>165)) || ((touchLocation.x <298 && touchLocation.y>111) && (touchLocation.x >257 && touchLocation.y>84))) {
cellimgmap.image = [UIImage imageNamed:@"map_northeast.png"];
}else if (((touchLocation.x >131 && touchLocation.y>55) && (touchLocation.x <135 && touchLocation.y<111)) || (touchLocation.x <102 && touchLocation.y<135) || ((touchLocation.x <69 && touchLocation.y<150) && (touchLocation.x >42 && touchLocation.y<133))) {
cellimgmap.image = [UIImage imageNamed:@"map_westnorthwest.png"];
}