mapkit

Mapkit, how to detect annotations have loaded

江枫思渺然 提交于 2020-01-11 06:30:29
问题 I want the annotations callout to popup when the pin has finished it's drop animation. Currently I am able to simulate it with the following method: - (void)showCallOut { [myMapView selectAnnotation:[myMapView.annotations objectAtIndex:0] animated:YES]; } In my viewDidLoad is where my annotation is created [myMapView addAnnotation:annotation]; The problem is that you simply can't callout [self showCallOut]; after that because at run time it responds before MapKit has "acknowledged" the

Getting surrounding zip codes from a location using Apple Map Kit

99封情书 提交于 2020-01-10 06:12:46
问题 I'm getting started on Map Kit for my job and I have a IOS project I am working on where it involves Map Kit, I know how to search for a location and pin point it but my issues is that part of my project involves getting the next 10-15 zip codes of the surrounding areas of my central location and receive the cities that are in each zip code, i really don't know how to implement it and I need help. an explanation or a snippet of code would be much appreciated. 回答1: Zip codes like this aren't

“Cannot assign to value: 'i' is a 'let' constant” error

♀尐吖头ヾ 提交于 2020-01-07 08:28:49
问题 I am updating my project to Swift 3. Most all has gone well, but I cannot figure the below out. I believe I have found how to correct the first of the two errors, but cannot figure out the second one "i = i + 1" as I am getting the error "Cannot assign to value: 'i' is a 'let' constant" I hired someone to do the coordinates on my app, so this is why I am not so accustomed to these types of errors. I have created 200 polygon regions and the below this is meant to take the users current

Centering MKMapView on spot N-pixels below pin

为君一笑 提交于 2020-01-07 08:08:09
问题 Want to center MKMapView on a point N-pixels below a given pin ( which may or may not be visible in the current MapRect ). I've been trying to solve this using various plays with -(CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view to no success. Anyone been down this road ( no pun intended )? 回答1: The easiest technique is to just shift the map down, say 40% from where the coordinate would be, taking advantage of the span of the region of the MKMapView . If

Centering MKMapView on spot N-pixels below pin

ε祈祈猫儿з 提交于 2020-01-07 08:08:07
问题 Want to center MKMapView on a point N-pixels below a given pin ( which may or may not be visible in the current MapRect ). I've been trying to solve this using various plays with -(CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view to no success. Anyone been down this road ( no pun intended )? 回答1: The easiest technique is to just shift the map down, say 40% from where the coordinate would be, taking advantage of the span of the region of the MKMapView . If

Loading current geolocation on UIWebView

≡放荡痞女 提交于 2020-01-07 04:33:31
问题 Is there a way where I can get the current geographic location of the user (In my case, Bengluru, India), so that I can call Google Static Map API and load the static map image on the UIWebView of the ViewController.xib For example, http://maps.googleapis.com/maps/api/staticmap?center=-OBTAINED_LOCATION-&zoom=14&size=512x512&maptype=roadmap&sensor=false Here OBTAINED_LOCATION should be the one that indicates current geographic location of the user. 回答1: User Following Code: First access

Navigation and MapKit makes app crash

徘徊边缘 提交于 2020-01-07 04:23:06
问题 I have an application which used top bar navigation and a MapView. On the map view I have placed some annotations and when selecting an annotation, pressing the disclosure button to go into a subview and then going back to the MapView using the back button my application crashes. It does not give me any errors. Can anyone help me figure out why my application keeps crashing? I have made a short video showing this mysterious crash (because I'm afraid that I do not explain it very well) The

Launching the iPhone native Maps app with current location

烂漫一生 提交于 2020-01-06 20:14:32
问题 I've seen a lot of code samples here on how to launch the Maps app but none of them actually launch the native app, they all launch Google's website on Safari instead (http://maps.google.com...). I've seen an app before, can't recall the name, that launched the iPhone maps application itself and on the address bar of the apps it has a string that looked like "hotel loc:XX.XXXX, XX.XXXX" which would select the current location on the map based on the coordinates provided on the address and pin

loading custom image on mkmaps

馋奶兔 提交于 2020-01-06 04:45:09
问题 I want to develop a mall navigator however i am unsure where to start. I want to create something similar to this screenshot - http://navigationapps.com/wp-content/uploads/2010/10/point-inside-2.png . I believe its a custom loaded map with a pin tracker on it however how can i do this? (are there any tutorials/examples i could look at?). Furthermore, assuming that the mall has a clear signal, how accurate will the tracking be - within how many meters?). Would appreciate some help on this.

Callout opening wrong view after zoom in iOS7

ε祈祈猫儿з 提交于 2020-01-05 10:38:07
问题 Everything is working fine in my app except for one thing: after zooming in and zooming back out, to see the whole map, some callouts open the wrong detailview. I don't know if I'm missing some code or else. Using Xcode 5.1.1 for iOS7. This is what I've got at the moment: Annotation.h #import <Foundation/Foundation.h> #import <MapKit/MapKit.h> @interface Annotation: NSObject <MKAnnotation> @property (nonatomic, assign) CLLocationCoordinate2D coordinate; @property (nonatomic, copy) NSString