mapkit

Display spiderfy leaflet annotation MKMapView

眉间皱痕 提交于 2019-12-06 16:28:09
问题 I want to show 100 map points using MKMapView on same lat longs. Please see the link. Same thing i want in iphone. 回答1: If you want to use 100's of annotation then below is the tutorial which will help you. http://www.raywenderlich.com/21365/introduction-to-mapkit-in-ios-6-tutorial In this tutorial if you check the below method it will resolve your issue. (void)plotCrimePositions:(NSData *)responseData { for (id<MKAnnotation> annotation in _mapView.annotations) { [_mapView removeAnnotation

Show custom contact information

帅比萌擦擦* 提交于 2019-12-06 16:05:57
So I have an MKMapView and I have a pin on it with a disclosure button. I want the user to be able to tap the disclosure button and the navigation controller to push a new view controller. But I want that new view controller to look like the contacts viewController that comes standard in the contacts app. I need it to display custom contact information because the contact will not be in the users contacts. I have been playing around with ABPerson, but I can't figure it out. I want that contact page to look exactly like the standard page. This is what I've been playing with:

MapView with local search

ぃ、小莉子 提交于 2019-12-06 15:51:33
I've a question about doing a local search in Apple maps which I have already implemented into my app. The app should show the user where are "supermarkets" around him. My mapView also shows the user's current location but I don't really know how I should do this with the results of the market-locations. Maybe Apple provides a solution/advice for this. Thanks in advance. The results (supermarkets) should be displayed as in this picture. UPDATE: The function works perfectly but is it also possible to make these pins clickable to show an info-sheet about this location as in the pictures below?

How to change non selected annotation pin images on mapkit with Swift

喜夏-厌秋 提交于 2019-12-06 14:53:10
I have a map and on this map I have 10 custom annotation pins. All pins have same custom image. When i click on a pin, i need to change all other 9 annotation's images. its possible to change clicked pin's image but i need to keep as it is and i need to change all other pins images. I tried to get all annotations with Map mapView.annotations and tried to find selected annotation and change others images but couldnt manage it. And idea how to do it? Thanks in advice Conform to MKMapViewDelegate protocol and then: func mapView(mapView: MKMapView!, didSelectAnnotationView view: MKAnnotationView!)

MapView: Use MKUserTrackingBarButtonItem to toggle map tracking state

筅森魡賤 提交于 2019-12-06 14:47:46
问题 I have added a MKUserTrackingBarButtonItem to my toolbar. But, clicking it does nothing. So, I assumed I need to use addTarget like a normal UIBarButtonItem but that doesn't work either. How can I attach a method to that button so that I can change setUserTrackingMode:animated: ? MKUserTrackingBarButtonItem *trackingItem = [[[MKUserTrackingBarButtonItem alloc] initWithMapView:mapView] autorelease]; UISegmentedControl *segmentedControl = [[[UISegmentedControl alloc] initWithItems:[NSArray

MapKit based app crashing when loading from plist

纵饮孤独 提交于 2019-12-06 14:47:36
问题 I'm writing a program which uses MapKit to display a map which will load custom annotations from a plist file. Each annotation is a dictionary item in the root array, with a title, subtitle, latitude, and longitude. When I hard-coded in the annotations for test purposes, the program worked beautifully. But with the addition of the MapDemoAnnotation class and my attempt to read in the property list, the program crashes upon launch. Here is my annotation implementation: #import

Removing Annotation using the Annotations Coordinates

让人想犯罪 __ 提交于 2019-12-06 14:39:32
问题 I am using Firebase to get annotations on to mapView. This is done through the following: func getMarkers() { dbRef.observe(.value, with: { (snapshot) in for buildings in snapshot.children { let buildingsObject = Buildings (snapshot: buildings as! FIRDataSnapshot) let latDouble = Double(buildingsObject.latitude!) let lonDouble = Double(buildingsObject.longitude!) self.telephoneNumber = buildingsObject.number let annotation = myAnnotationView.init(title: buildingsObject.content!, coordinate:

Reverse Geocoding/MapKit on OSX?

♀尐吖头ヾ 提交于 2019-12-06 14:09:08
the iPhone SDK provides with MapKit a simple solution for maps und reverse geocoding without any additional costs. Does anyone know if there is a similar Framework for Cocoa on OSX? I know that google maps is capable of that but as far as I know and understand I have to pay while using google maps in a commercial application? Thanks for your answers twickl You won't have to pay as long as you don't use the quota. The api documentation is here : http://code.google.com/apis/maps/documentation/geocoding/ If you plan to use it reasonably, this will remain free (no api key is required anymore by

Show current position annotation by default

僤鯓⒐⒋嵵緔 提交于 2019-12-06 13:41:49
I have an current location annotation (blue dot) showing in mapkit. Annotation shows after taping the blue dot, how can I have the annotation showing by default?, when I start the view? whit out tapping the pin. - (void)mapView:(MKMapView *)mv didAddAnnotationViews:(NSArray *)views { for(MKAnnotationView *annotationView in views) { if(annotationView.annotation == mv.userLocation) { self.mapView.userLocation.title= @"Current"; self.mapView.userLocation.subtitle= @"Location"; MKCoordinateRegion region; MKCoordinateSpan span; span.latitudeDelta=0.002; span.longitudeDelta=0.002;

how can I center my map on the annotation view only when it is close to the edge of the screen?

梦想与她 提交于 2019-12-06 12:54:23
问题 In my swift application I'm using MapKit and I'm adding some annotations to the map. Currently, thanks to this question: Trying to get the span size in meters for an iOS MKCoordinateSpan I managed to create a functionality that centers my map on the annotation when user presses it. This is the code for it: let span = mapView.region.span let centerView = mapView.region.center let loc1 = CLLocation(latitude: centerView.latitude - span.latitudeDelta * 0.5, longitude: centerView.longitude) let