mapkit

Delegate must respond to locationManager:didUpdateLocations swift eroor

有些话、适合烂在心里 提交于 2019-12-10 17:25:42
问题 Hy guys, I'm making an app in swift 3.0 but I ran across a problem pretty soon. I set up necessary functions to ask for permission to use a location but every time I run the app I get the same error... Viewcontroller.h import UIKit import MapKit class ViewController: UIViewController { let locationManager = CLLocationManager() override func viewDidLoad() { super.viewDidLoad() locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager

iOS Mapkit - Cache maps?

浪子不回头ぞ 提交于 2019-12-10 15:56:57
问题 I need maps of certain areas available when no internet connection is available. It would be like this: User loads app internet connection is available App downloads list of coordinates and places pins on the map User leaves their house and has no internet connection Pins and map remain readily available for user to interact with, even without internet connection How do I do this? 回答1: You probably won't use MKMapView and MapKit for that, but the Google Maps Static API that allows you to

MapKit Annotations not showing up on map

[亡魂溺海] 提交于 2019-12-10 15:17:51
问题 I'm having trouble getting the MKAnnotationViews show up on the map in MapKit. I'm using iOS 7, and have now searched the forums and the web for many hours, trying different samples and setups. Below I have the most basic setup possible (I think) to make it work. The app contains a single ViewController with a toolbar with a button on top, and the rest is the MapView. The button triggers the method zoomToUser:(UIBarButtonItem*)sender. Right-clicking and checking my outlets and delegates seem

Getting current location of map on touch in iphone mkmapview

杀马特。学长 韩版系。学妹 提交于 2019-12-10 14:56:06
问题 How can I get the location coordinates in mkmapview according to user touching a location on the map on their iphone? 回答1: Add TapGesture to you mapview and follow below code -(void)didTouchMap:(UITapGestureRecognizer*)tapGesure { CGPoint touchPoint = [tapGesure locationInView:selectLocationMapView]; CLLocationCoordinate2D coord= [selectLocationMapView convertPoint:touchPoint toCoordinateFromView:selectLocationMapView]; NSLog(@"lat %f",coord.latitude); NSLog(@"long %f",coord.longitude); } 来源:

All Annotation is not visible to user in MKMapView

我怕爱的太早我们不能终老 提交于 2019-12-10 14:13:01
问题 I am using MKMapView and have added a number of annotation pins to the map. All annotation belong to different country, so i do not able to set all annotation visible to user. Please do try using below latitude and longitude for annotation. First annotation Latitude: 23.029690 First annotation Longitude: 72.527359 Second annotation Latitude: 34.210855 Second annotation Longitude: -118.622636 Code for add annotation to mapview. CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake([

Choosing native Apple or Google Maps SDK for iOS app [closed]

徘徊边缘 提交于 2019-12-10 13:08:21
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . This is a less programmatic and more service related question. I used apple native maps API which integrated google maps service before iOS6 independent apple maps release. So now I am confused between selecting Apple & Google Map. After last year maps problem Apple seem to

MapKit Adding Raster Map via MKOverlay Weird Rendering Issue

╄→гoц情女王★ 提交于 2019-12-10 12:19:58
问题 I have added NOAA radar images to a weather app I have. I noticed that the image was not drawing correctly on the map after some testing. It seems the corners of the image were close to correct but when you move away from the corners it skews off. Below is the relevant code. Overlay: @implementation FMRadarOverlay - (id)initWithImage:(UIImage*)radarImage withLowerLeftCoordinate:(CLLocationCoordinate2D)lowerLeftCoordinate withUpperRightCoordinate:(CLLocationCoordinate2D)upperRightCoordinate{

Mapview not displaying Title or subtitle from pin annotation

醉酒当歌 提交于 2019-12-10 12:17:19
问题 App returns error when clicking the annotation pin. However it does not crash. It just does not show the title or subtitle. Error is (lldb) then list a string of numbers like 0x3516b5a0. plist example: <dict> <key>cellName</key> <string>Abingdon Lodge No. 48</string> <key>cellSubtitle</key> <string>Abingdon, VA</string> <key>address</key> <string>325 W Main Street Abingdon, Virginia 24210</string> <key>latitude</key> <real>36.708649</real> <key>longitude</key> <real>-81.981184</real> <key

Trying to display location data from Firebase to MapKit

不羁岁月 提交于 2019-12-10 11:58:36
问题 searched about this question a lot but couldn't find a simple answer. I want to be able to read location data from a Firebase database and display them on the MapKit as annotation. Can you help? Right now I can display annotations that are hard-coded but can't figure out how to read the database and then create a loop that displays all annotations on the map. This is the code for showing the annotations. I want to fill title, latitude, longitude with the relevant data from Firebase. The

Show custom contact information

允我心安 提交于 2019-12-10 11:42:19
问题 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