mkmapview

Objective-C add MKOverlay to map view animated fade in

我只是一个虾纸丫 提交于 2019-12-11 18:06:53
问题 I've been trying to add an MKOverlay to a map with animation. I'm trying to make it fade in when it's added and fade out when it's removed. Could this be done by created a custom overlay class or overlay view class? 回答1: On iOS 7 you could achieve this even with the new MKOverlayRenderer . It has an alpha property which you could animate by setting up a timer to repeatedly change its value and call setNeedsDisplayInMapRect:zoomScale: . 回答2: This is trickier in iOS 7 and above since the

can't Find location within milesof using stackmob as backend

孤街醉人 提交于 2019-12-11 17:58:51
问题 I am trying to find the locations, but I am getting a empty array returned. It succeeded, but got nothing back. In the object brower, i can say there are values in the "location". I have saved several locations using my current location. Will this work? - (void)geoQuery { MKCoordinateRegion region; region = MKCoordinateRegionMakeWithDistance(locationController.locationManager.location.coordinate, 5000, 5000); [self.mapView setRegion:region animated:YES]; SMQuery *query = [[SMQuery alloc]

How to get the title and subtitle for a pin when we are implementing the MKAnnotation?

天涯浪子 提交于 2019-12-11 16:28:02
问题 I have implemented the MKAnnotation as below. I will put a lot of pins and the information for each of those pins are stored in an array. Each member of this array is an object whose properties will give the values for the title and subtitle of the pin. Each object corresponds to a pin. But how can I display these values for the pin when I click a pin?? @interface UserAnnotation : NSObject <MKAnnotation> { CLLocationCoordinate2D coordinate; NSString *title; NSString *subtitle; NSString *city;

Save and Load MapAnnotation pins using NSMutableArray

会有一股神秘感。 提交于 2019-12-11 13:38:55
问题 I need help with my MapAnnotation codes. I want to save map pins so that the user can come back to the map and see the ones he/she has placed. However this code does not show the pins when the view loads. Code for adding and saving pins: - (void)addPinToMap:(UIGestureRecognizer *)gestureRecognizer { if (gestureRecognizer.state != UIGestureRecognizerStateBegan) return; CGPoint touchPoint = [gestureRecognizer locationInView:self.mapView]; CLLocationCoordinate2D touchMapCoordinate = [self

MKAnnotationView image changing issue

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 12:30:05
问题 I've got an MKMapView loaded with plenty of custom annotation (800 circa). When I drag on the map and I return to an annotation, it's image has changed with another one. For me it's seems like a cache issue. Pin before dragging Pin after dragging SuperClass header #import <Foundation/Foundation.h> #import <MapKit/MapKit.h> @interface MapAnnotation : NSObject <MKAnnotation> @property (nonatomic, copy) NSString *title; @property NSString * pinImageName; @property (nonatomic)

Displaying MKMapView Without Internet Access

浪尽此生 提交于 2019-12-11 12:25:14
问题 Ey guys, I was wondering if it was at all possible to display an MKMapView without an active internet connection, and if so, how would I go about doing that? Thanks in advance! 回答1: mhm, Jasconius, i'm not sure you are right, the MKMapView uses google on-line services, as you can read on the apple help: Important: The MapKit framework uses Google services to provide map data. Use of this class and the associated interfaces binds you to the Google Maps/Google Earth API terms of service. You

Swift - adding a button to my MKPointAnnotation

不想你离开。 提交于 2019-12-11 12:00:00
问题 On Swift 1.2 : I'd like to add a button to my annotations on the map. First tap on pin shows user's id, and this is working, but then, by pressing the button, I want to send the user to a detail view controller. you can have an idea of what I'm looking for here and here tried to apply those solutions, but I think I'm missing something. This is another example of what I'm seeking this is my class declaration: import UIKit import MapKit import CoreLocation import Parse class MapViewController:

How can I add records fetched asynchronously from json to the array only when all records are fetched in Swift?

匆匆过客 提交于 2019-12-11 11:49:42
问题 I'm working on a market cluster for apple maps (here is the plugin https://github.com/ribl/FBAnnotationClusteringSwift ) and I want to display all records on my map at once - for that I need to download all the records from remote webservice, add it to json (I've already done that) and then add all fetched points to an array. My code looks like this: let clusteringManager = FBClusteringManager() var array:[FBAnnotation] = [] func loadInitialData() { RestApiManager.sharedInstance.getRequests {

How to get the values by clicking specific annotations in iOS?

纵然是瞬间 提交于 2019-12-11 11:16:41
问题 I am having a map view and 2 text boxes in my app. Both the text boxes display the latitude and longitude. I have plotted or mapped few annotations in my map view, and when each annotation is clicked, the callout is displayed with the corresponding latitude and longitude value. I just want to display those latitude and longitude value in my text boxes. I tried the following code, latitude_value.text=myAnnotation.title; longitude_value.text=myAnnotation.subtitle; latitude_value and longitude

what is the difference between latitude, longitude and their delat values

十年热恋 提交于 2019-12-11 10:08:56
问题 I'm new to the MKMapView (iPhone). I want to add several annotations to the map of Copenhagen (Denmark). I have the latitude and longitude values of different locations of the city. But I don't know how to get the longitudeDelta and latitudeDelta of these locations. I'm using the Google Map API's to calculate the latitude and longitude values (By web services) of each location in the city map. I need help on how to calculate delta values Thanks 回答1: I'm not certain from your question what