Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
Hello!
I have a mapview with some annotations. Those annotations are generated from an xml file and everything is working fine. My problem is that those points to be displayed on the map are changing over time and I want to offer the user the posibility to update them. So I added a button and this button calls the method "updateIt". In this method I remove all the annotations on the map and calls the locationmanager etc again. The annotations are displayed allright but the USERLOCATION does not appear on the map after the update...? I calculate the closest position to the userlocation and defines the map (region etc) anfter tzhis calculation. I also have written myMap.showsuserposition = YES; but nothing is working.

Any tips on this issue???
 
I also have written myMap.showsuserposition = YES; but nothing is working.

Any tips on this issue???
Yes: don't make up properties. There is no such thing as showsuserposition. Or even showsUserPosition. Check the MKMapView documentation to find the correct property name.
 
Yes: don't make up properties. There is no such thing as showsuserposition. Or even showsUserPosition. Check the MKMapView documentation to find the correct property name.

ok, sorry my mistake. I did mean this property and did not have the code in front of me while writing the question.

"showsUserLocation

A Boolean value indicating whether the map may display the user location.

@property (nonatomic) BOOL showsUserLocation

Discussion

This property does not indicate whether the user’s position is actually visible on the map, only whether the map view is allowed to display it. To determine whether the user’s position is visible, use the userLocationVisible property. The default value of this property is NO.

Setting this property to YES causes the map view to use the Core Location framework to find the current location. As long as this property is YES, the map view continues to track the user’s location and update it periodically.
Availability
* Available in iPhone OS 3.0 and later.

See Also
* @property userLocationVisible

Declared In
MKMapView.h"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.