Note that there are some explanatory texts on larger screens.

plurals
  1. POMapKit custom annotations being added to map, but are not visible on the map
    primarykey
    data
    text
    <p>I have an interface with a mapView and UITableView. Data is loaded from a server, and the annotations are created and added to the map with</p> <p><code>[mapView addAnnotation:truck]</code></p> <p>the tableview is then populated using the array thats retured from </p> <p><code>[mapView annotations]</code></p> <p>once this process is completed, i check the number of annotations on the map with <code>[[mapView annotations] count]</code> called whenever i click on a cell in the table and its equal to the number it ought to be, so all the annotations are getting added onto the mapView, but for some reason I cant see any annotations in the simulator.</p> <p>The images are named just as they are assigned in the custom AnnotationView, the loadAnnotation function is done properly, etc... i dont know what it could be but ive looked at the associate between the image file and wheres its loaded a hundred times to find a discrepancy, but it all looks fine. </p> <p>One interesting point is that when i print and coordinate value after clicking on the cell (remember this data comes straight from <code>[mapView annotations]</code>, it looks good... but for whatever reason the annotation view isnt being displayed.</p> <p>so i suppose if i could have the answer to one question it would be, what are possible causes for a mapView to contain several annotations, but to not show any on the map?</p> <p>Thanks</p> <p><strong>EDITED WITH IMPORTANT ADDITIONAL INFO</strong></p> <p>There appears to be a disconnect between what is being displayed on my map in the simulator and what im seeing in the mapView object. For example, when i select a row in the tableView, I am calling:</p> <p><code>[mapView setRegion:MKCoordinateRegionMake([annotation coordinate], MKCoordinateSpanMake(.01, .01)) animated:YES];</code></p> <p>and this has no effect on the map in the simulator. I have checked that the coordinate being passed is actually a valid coordinate, but it doesnt seem to matter because the map is being unresponsive. I thought it could be something wrong with my .xib, but its all connected properly. delegate is the outlet and mapView as a referencing outlet.</p> <p>Does anyone now understand what may be happening?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload