mapkit

iPhone Mapkit adding custom image and pins to annotations

自闭症网瘾萝莉.ら 提交于 2019-12-18 18:04:32
问题 I am trying to change the pin colour from the default red to a custom image but whatever I am trying just isn't working. I have downloaded the sample code from this website: http://icodeblog.com/2009/12/21/introduction-to-mapkit-in-iphone-os-3-0/ The code works on it's own but when I import the annotation classes into my code, they do not work and I have no idea why. I have also tried a number of different methods from other sites but I can't even get the pin colour to change. My project has

How do I make a pin annotation callout in Swift?

℡╲_俬逩灬. 提交于 2019-12-18 17:27:58
问题 I tried to make the callout work but that didn't happen as I did something wrong in my prepare for segue. I want to know how to be able to make a pin annotation callout to another view? 回答1: The process of segueing to another scene when the button in the callout is tapped is like so: Set the delegate of the map view to be the view controller. You can do this either in Interface Builder's "Connections Inspector" or programmatically. You want to specify that the view controller conforms to

How do I make a pin annotation callout in Swift?

主宰稳场 提交于 2019-12-18 17:27:37
问题 I tried to make the callout work but that didn't happen as I did something wrong in my prepare for segue. I want to know how to be able to make a pin annotation callout to another view? 回答1: The process of segueing to another scene when the button in the callout is tapped is like so: Set the delegate of the map view to be the view controller. You can do this either in Interface Builder's "Connections Inspector" or programmatically. You want to specify that the view controller conforms to

Get Location From Center of Screen Swift MapKit

ぃ、小莉子 提交于 2019-12-18 13:34:52
问题 I'm new on Swift Programming, and I'm trying to build an app that I can get the coordinates of the center of the view with MapKit and Swift 2. I already can get the current location, but I need if I move on the map, the location set to the new point which will be the center of the screen. Can you help me with this please?. Regards, 回答1: You can use the regionDidChangeAnimated delegate method and call mapView.centerCoordinate. It will look like the following: func mapView(mapView: MKMapView,

iOS Swift MapKit making an annotation draggable by the user?

↘锁芯ラ 提交于 2019-12-18 12:55:29
问题 How do I make it possible, using MapKit in Swift, for the user to drag an annotation from one position to another within the map? I have set the annotation view to be draggable, when my map view delegate creates the annotation view, like this: func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { var v : MKAnnotationView! = nil if annotation is MyAnnotation { let ident = "bike" v = mapView.dequeueReusableAnnotationView(withIdentifier:ident) if v == nil {

Map Location names in drop down list

旧巷老猫 提交于 2019-12-18 12:42:30
问题 My App Has to integrate search location names using text box. Is Map kit has any method to implement this kind of a functionality ? This below image displays what i exactly need 回答1: No , there is not any method of MapKit to implement this type of property.. For That You have to implement Your own Code, i.e. use of UISearchbarCantroller or Simple UISearchbar. For Search results you can use Google Place Autocomplete api. You can Use this GooglePlacesAutocomplete Example. In iOS >= 6.1 provides

How set Custom Annotation markers ( animated rings around a point) on GMSMapView

廉价感情. 提交于 2019-12-18 11:33:45
问题 Using Google maps iOS SDK I have implemented a mapView in that i have created markers as follows // Creates a marker in the center of the map. GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(-33.86, 151.20); marker.title = @"Sydney"; marker.snippet = @"Australia"; marker.icon = [UIImage imageNamed:@"point1.png"]; marker.map = mapView_; But i need to Display animated images ie some sequence of images to display, animated rings around a point, instead

iPhone: Detecting Tap in MKMapView

我只是一个虾纸丫 提交于 2019-12-18 10:35:31
问题 How do I detect a single tap on an instance of MKMapView ? Do I have to subclass MKMapView and then override the touchesEnded method? Thanks, -Chris 回答1: Hope this will help : How to intercept touches events on a MKMapView or UIWebView objects? 回答2: If you're just looking to get notified of tap gestures without affecting any of the other touch behavior of the map, you'll want to use a UITapGestureRecognizer . It's super simple, just put in some code like this. UITapGestureRecognizer* tapRec =

Issue with Map Annotation and MKMapView in iOS 4.2?

99封情书 提交于 2019-12-18 08:58:18
问题 I have a map view with pins that when the user selects a pin it goes to a detail screen for that pin. I also have a table view that when the user selects an item it goes to the same type detail view. Here's the problem ... It seems to work fine in everything from 3.1.3 to 4.1. That is the detail view matches with the pin. But I have a user who just upgraded to iOS 4.2 and says that under 4.1 it worked fine, but in 4.2 the pin selection takes him to the detail for a different pin. But in the

iOS MKMapShapshotter completion block is not always being called

一个人想着一个人 提交于 2019-12-18 07:46:19
问题 I am trying to use the new iOS7 MKMapSnapshotter to generate a static map image. Whenever my app needs a map, I call the following: MKMapSnapshotter *snapshotter = [[[MKMapSnapshotter alloc] initWithOptions:theOptions] autorelease]; dispatch_queue_t aQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0); DebugLog(@"Snapshotter allocated %@ and run on queue %@", snapshotter, aQueue); [snapshotter startWithQueue:aQueue completionHandler:^(MKMapSnapshot *snapshot, NSError