mapkit

Could geocodeAddressDictionary in iOS 9 be implemented different from iOS 8

∥☆過路亽.° 提交于 2019-12-11 09:52:41
问题 I am looping through a set of addresses and performing a geocode on each one. for aClient in passedPossible { let geocoder = CLGeocoder() let checkAddress = [ CNPostalAddressStreetKey:aClient[CNPostalAddressStreetKey]!, CNPostalAddressCityKey:aClient[CNPostalAddressCityKey]!, CNPostalAddressPostalCodeKey:aClient[CNPostalAddressPostalCodeKey]!, CNPostalAddressCountryKey:"Australia" ] geocoder.geocodeAddressDictionary(checkAddress, completionHandler: { (placemarks, error) -> Void in // Etc do

How to get the Images related to a Location search in ios

白昼怎懂夜的黑 提交于 2019-12-11 09:36:24
问题 I am creating an iPad MasterDetail application based on map search. MasterViewController performs a search on the keyword and passes results to the TableView and DetailView and provides a map with the selected item from the MasterView . I want to add the images related to the searched location in a subview when I select the annotation . 回答1: Here is the way that I,ve solved the problem. NSString *nearBySearch = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place

how to make the pin show bigger in Google map?

我只是一个虾纸丫 提交于 2019-12-11 08:35:24
问题 any property can set the pin in google map bigger? from what i know, MKPinAnnotationView class only provided few properties but not any related to set custom pin size. Pls help if have any idea. Thanks in advance 回答1: As MKPinAnnotationView is a subclass of UIView I believe you can explicitly set its frame. As an alternative you can apply CGAffineTransform to your view to scale it appropriately. pinView.transform = CGAffineTransformMakeScale(2.0, 2.0); 回答2: Just change the size of the frame

MKLocalSearchRequest for all businesses

我只是一个虾纸丫 提交于 2019-12-11 07:54:42
问题 Another newbie iOS developer. I've got my code working to show local businesses by using request.naturalLanguageQuery = "Restaurants", but I want to return all businesses. I can't figure out what the wildcard character is. Seems like it would be so simple. Any help would be greatly appreciated. var latitude:CLLocationDegrees = 40.7056258 var longitude:CLLocationDegrees = -73.97968 var latDelta:CLLocationDegrees = 0.01 var longDelta:CLLocationDegrees = 0.01 var span:MKCoordinateSpan =

kCLAuthorizationStatusNotDetermined occurred when tested with iOS 6.1 simulator

天大地大妈咪最大 提交于 2019-12-11 07:39:24
问题 all. Recently I am stuck with this error. Here is my codes if([CLLocationManager locationServicesEnabled]){ NSLog(@"Location Services Enabled"); // Switch through the possible location // authorization states switch([CLLocationManager authorizationStatus]){ case kCLAuthorizationStatusAuthorized: NSLog(@"We have access to location services"); [self loadAnnotations]; MKCoordinateSpan span = MKCoordinateSpanMake(0.04, 0.04); MKCoordinateRegion region = MKCoordinateRegionMake(locationManager

Why my user location is always in center?

安稳与你 提交于 2019-12-11 07:23:02
问题 i have a map in my app,i set the center user location when map is open. I have used this code: map.delegate=Self; ...... -(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation { MKCoordinateRegion mapRegion; mapRegion.center = self.mapView.userLocation.coordinate; mapRegion.span = MKCoordinateSpanMake(0.5, 0.5); //Zoom distance [self.mapView setRegion:mapRegion animated: YES]; } But when i move map it came back to user location. How can i move free into my

iOS Swift3 - Convert coordinate

 ̄綄美尐妖づ 提交于 2019-12-11 07:19:38
问题 I'm trying to create annotations on the MapKit from a geoJSON file, but the problem is that the coordinates provided by the geoJSON file don't match the coordinate system that MapKit uses. Question : How do I convert read the geoJSON file and convert the coordinates from `` to WGS84S ? Here is an example of what the geoJSON file looks like: {"name":"MAPADDRESSPOINT","type":"FeatureCollection" ,"crs":{"type":"name","properties":{"name":"EPSG:3008"}} ,"features":[ {"type":"Feature","geometry":{

My annotations doesn't show the Sub Title in the PIN

…衆ロ難τιáo~ 提交于 2019-12-11 07:14:26
问题 in the implementations class charged of displaying PINS, i have reserved two variables (title and sub title), in this example, only the word USA (the title) is displayed when i click on the PIN. CLLocationCoordinate2D location2D = (CLLocationCoordinate2D){ .latitude = latitudeOfUserLocation, .longitude = longitudeOfUserLocation }; ManageAnnotations *annotation=[[ManageAnnotations alloc]initWithTitle:@"USA" adresseDuTheme:@"Colorado" coordinate:location2D];//only USA is displayed annotation

How to Pass Variables and Objects from a Subclass via a Segue in Swift 3.0

浪子不回头ぞ 提交于 2019-12-11 07:02:50
问题 Here is my setup: ViewController -> SecondViewControoler Three Goals: Add image to custom annotation (see code below) I have a subclass named "Capital", I would like to add the image in #1 and then create additional variables to hold values that will be passed to a new SecondViewController that includes (2) labels and a Picker View: for example label1 = "text1", label2 = "text2", and then grab a string from an array that contains multiple objects (i.e. the title for each row of the Picker)

Blurry UILabel text in accessory view of MKAnnotationView

落爺英雄遲暮 提交于 2019-12-11 06:56:35
问题 I'm trying to add a UILabel to an MKAnnotationView as a leftCalloutAccessoryView right after a pin got selected for the first time in the MKMapView. Adding the label is not a problem: The callout gets selected and opens, and this is when I add the label to the callout view. The callout gets automatically expanded to the left with a slide animation, and the new label including 2 lines is shown. Unfortunately I need to add the label after the Pin got selected because I need certain information