mkmapview

Why am I crashing after MKMapView is freed if I'm no longer using it?

I have a MKMapView. Sometimes after my view controller is dismissed, I'll get a EXC_BAD_ACCESS. I turned on NSSZombies and it looks like the MKMapView's delegate — my view controller! — is being called, despite both the MKMapView and UIViewController subclass being freed. I've checked, and my memory management is correct. What's going ...

How can I reduce the number of annotations on a map?

I'm coding a map view with around 900 annotations. Having this many annotations on a map make the performance suffer, so I'd like to reduce it to about 300 at a time. The annotations are representing shops in a country, so they tend to cluster a lot around major cities, then in small groups of 2 or 3 in smaller towns. I want to reduce th...

I don't know to work with calloutAccessoryControlTapped:(UIControl *)control

Hello user, in my project are two classes (mapViewcontroller and listViewcontroller) and on the mapView are a lot of pins that the user can pull. If he pulled one i have to save the data of the pins and manage it to the other class. so my question what i have to implement in the following method to save the title and subtitle of the pin...

member variable setting back

Hello i have a problem, i have a app with two views (one mapView with pins) and one View with textfields with datas of the pushed pin. If i click on a pin it works very good, but if i go back and click another pin, there are allways the datas of the first pin i clicked? - (void) mapView:(MKMapView *)mapView annotationView:(MKAnnotation...

[iPhone] Select tablecell when touching embedded view

I have a custom tablecell with an embedded MapView showing a small area. When the user selects the cell, I want to push a new view with a larger mapview and some more information, like distance from where you are, option of what map-type etc. If I leave a small margin around my mapview, the user can click in that margin to select the ce...

MKMapView: How to set the region span based on the Accuracy?

Im implementing a map application on iPhone. I want the map to zoom in on the user's current location. I'd like to zoom closer based on the accuracy (emulating how the Maps app works). Im implementing this method: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLo...

How to move a MKAnnotation without adding/removing it from the map?

Is it possible to move the coordinate of a MKAnnotation without adding and removing the annotation from the map? ...

iPhone: Attempt to Switch Views Produces EXC_BAD_ACCESS on the Third Switch Only

Hello users, I have implemented an app that shows a map with a lot of pins on it. If you push one pin you get on a second view that shows the data behind the pin. A button takes you back to the map. My problem is that by the third touch on a pin the program crashes with a EXC_BAD_ACCESS in this method: - (void) switchViews { if...

MKAnnotationView disappearing on swipe and double-tap zoom

I have subclassed MKAnnotationView to create an annotation that basically draws a circle around a point on a map view through override of drawRect. The circle draws fine in the following situations (in the simulator): On initial load of the map view On swipe, but only when swipe motion is stopped before touch ends (so that map doesn't...

How to search MKMapView with UISearchBar ?

I have an application that needs to have a similar search feature like the Apple "Maps" application (included with iPhone/iPod Touch). The feature in question should not be a hard thing to do, but I'm really clueless about how to input a Street Address in the search bar, and then obtaining coordinates for that address or something that ...

MKMapView will not accept an annotation

This is hard to explain so bear with me ... I'm using an example that I know works. It's the MapMe chapter from the Apress More iPhone dev book. I'm using the same code but I've created a MapViewController class to contain all the map code and am inserting the view from the nib as a subview of my MainViewController view. With me? My pr...

MKMapView, Google Maps API and traffic information

Hi folks, By the time you finish reading this question, it will become obvious to you that I'm pretty new to this development. But I've got a quick question here. I think I (unfortunately, sorta) know the answer, but I figured I'd ask, anyway: I'm working on an app in which I'd like to display traffic data from Google Maps into a map. ...

show pins around 100kilometers

Hello People, i am implementing an app, that show customers and my userLocation on a map. But now i have a problem, because there are a lot of costumers and the map is very uncomfortable. How can i only see pins on a map or in a list, that are around 100 kilometers away from me? I hope someone could help me? Greetings Marco ...

MKMapView and CLLocationManager

I want to use a MKMapView to display the user current location using the default breathing blue pin and I want to record the user movement at the same time. Is there any way that I could use the GPS manager (not sure if this is a CLLocationManager) the MKMapView uses when we enabled it to show user location? I know that I can create my...

Latitude, Longtitude from mapView.userLocation

Hello community, i have the following code to get the userLocation on my app: mapView.showsUserLocation=TRUE; mapView.userLocation.title=@"Aktuelle Position"; that is in the viewDidLoad(); but how can i get latitude and longtitude in from userLocation in the following method?? - (void)locationManager:(CLLocationManager *)manage...

Accessing the "selected" property of custom MKAnnotationView ?

I'm trying to use the "selected" property in MKAnnotationView ( discussed here ), this is for the user to be able to delete a selected annotation... The following piece of code should find the selected pin in MKMapView and remove it: CSMapAnnotation *a; for(a in [mapView annotations]) { if([a selected]) //Warning: 'CSMapAnnotatio...

Clean solution to know which MKAnnotation has been tapped?

Ok, so you typically have some object X you want to be annotated inside a MKMapView. You do this way: DDAnnotation *annotation = [[DDAnnotation alloc] initWithCoordinate: poi.geoLocation.coordinate title: @"My Annotation"]; [_mapView addAnnotation: annotation]; Then you create the annotation view inside - (MKAnnotationView *)mapView...

iPhone: How to Get Location as in the App "Qype"

Hello, I've discovered today the app "Qype" and now I'd like to know how I can build a function to locate myself like in quype. For those who dont know this app: It's an app that shows you Cafés, Bars, Restaurants etc. near you. When I'm starting Qype there's a question: "Qype want to locate your position. Do you want to allow it?" Ar...

Rotating only the MapView's content

Hello. I am trying to rotate a map view in my app according the the user's current route. (I don't like to use the built in compasse because only 3GS uses it and it suffers too much interference from other machines, i.e. your own car.). the CGAffineTransformMakeRotation method will rotate the Whole Map View, so the Google Logo will not ...

Custon MKPinAnnotationColor

Hi, I have searched a bit on google, but didn't really found an answer to my question. I want to create a pin with a different color, e.g. yellow or orange. How should I do this? It seems that it's not possible to create one sending a UIColor to it. Should I design them myself and somehow change the pin to an own image? Best regards, ...