apple-maps

Open maps with specific address iOS 7

回眸只為那壹抹淺笑 提交于 2019-12-03 23:32:49
I am trying to make my application open the apple maps application and have the address be pulled up. I tried this : - (IBAction)openInMaps:(id)sender { NSString *addressString = @"http://maps.apple.com/?q=1 Infinite Loop, Cupertino, CA"; NSURL *url = [NSURL URLWithString:addressString]; [[UIApplication sharedApplication] openURL:url]; } and this : - (IBAction)openInMaps:(id)sender { NSString *addressString = @"http://maps.apple.com/?q=1_Infinite_Loop,_Cupertino,_CA"; NSURL *url = [NSURL URLWithString:addressString]; [[UIApplication sharedApplication] openURL:url]; } But the button just acts

How do I specify the zoom level when using an MKUserTrackingBarButtonItem?

前提是你 提交于 2019-12-03 10:22:47
I am using a MKUserTrackingBarButtonItem button to allow the user to automatically track their location on a map. The problem is that when they tap this button, it is zoomed too far out. I want it to start at a specified zoom level (i.e. span). How can I achieve this? When the user taps the button to change to MKUserTrackingModeFollow , it seems to use the same zoom level that the user last manually changed to (i.e. using gestures on the map). Attempting to specify a different zoom level via setRegion or setVisibleMapRect does not affect what zoom level will be used when the mode is changed to

Search nearby in iOS Maps

自作多情 提交于 2019-12-03 09:07:21
I am trying to build a simple application using MapKit that will automatically search for a specific place when the app launches and drop pin(s) on the map at the locations(s). I am seeing all sorts of ways to load locations (lat/lon, etc), but nothing that lets me search for a specific business name, restaurant name, etc. I am expecting to work with Apple Maps. However, if Google Maps would be a better solve than so be it. Any help would be appreciated. Thanks iOS >= 6.1 provides MKLocalSearch , MKLocalSearchRequest to search for natural language points of interest. Sample

Calculate distance between 2 point on maps for iOS [closed]

孤街醉人 提交于 2019-12-03 08:28:10
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . Is it possible to calculate the distance between 2 close points on iOS using Apple map framework or Google framework? For example, i want to get the distance between this 2 blu point with the highest accuracy possible. Using google maps or apple maps can i get the 2 coordinate with a lot of digit? how can i calculate the distance in centimeters or millimeters? Try this - let coordinate0 =

How to open a apple maps application with directions from my ios application

一世执手 提交于 2019-12-03 07:36:31
My aim is to open a map application from ios application with directions, I am able to open maps application but it is not showing directions, i have written the code as follows NSString *mystr=[[NSString alloc] initWithFormat:@"http://maps.apple.com/maps?saddr=Current+Location&daddr=Newyork"]; NSURL *myurl=[[NSURL alloc] initWithString:mystr]; [[UIApplication sharedApplication] openURL:myurl]; Can any one please help me how figure out how to pass parameters to this url and any other? If you mean taking the user to the maps application based on two points, then you can do it like this: Create

Wrong Geolocation with React Native and iOS simulator

为君一笑 提交于 2019-12-01 09:03:37
I am working with react-native-maps and using the react-native api for geolocation. When I am using location through the api what comes back on the simulator shows me in San Francisco not in Denver, CO where I am located. Is there a reason as to why my location would not show where I am at? my function that runs the location // Get current users locaiton on load componentDidMount() { navigator.geolocation.getCurrentPosition((position) => { console.log(position); let newLat = parseFloat(position.coords.latitude); console.log("newLat", newLat); let newLng = parseFloat(position.coords.longitude);

Open Apple Maps programmatically

人走茶凉 提交于 2019-11-30 15:47:35
问题 I want to open the Apple Maps App in my own Swift App, but I have only zipcode, city & street. I have NO Coordinates. I researched a lot, but there were only ways with using coordination information. 回答1: You can just pass your address information as URL parameters in the URL with which you open the maps app. Say you wanted the maps app to open centered on The White House. UIApplication.sharedApplication().openURL(NSURL(string: "http://maps.apple.com/?address=1600,PennsylvaniaAve.,20500")!)

Open Apple Maps programmatically

元气小坏坏 提交于 2019-11-30 14:44:36
I want to open the Apple Maps App in my own Swift App, but I have only zipcode, city & street. I have NO Coordinates. I researched a lot, but there were only ways with using coordination information. You can just pass your address information as URL parameters in the URL with which you open the maps app. Say you wanted the maps app to open centered on The White House. UIApplication.sharedApplication().openURL(NSURL(string: "http://maps.apple.com/?address=1600,PennsylvaniaAve.,20500")!) The Maps app opens with the ugly query string in the search field but it shows the right location. Note that

custom annotation apple mapkit

青春壹個敷衍的年華 提交于 2019-11-29 17:08:44
I am trying to assign two custom annotations, one called "arsenal.png" and one called "chelsea.png" Using apple mapkit framework, xcode 7. Need assistance with code to achieve the customized markers. here is my implementation file: // TrucksViewController.m #import "TrucksViewController.h" #import "Annotation.h" @interface TrucksViewController () @end //Wimbledon Coordinates #define WIMB_LATITUDE 51.434783; #define WIMB_LONGITUDE -0.213428; //Stadium Coordinates #define ARSENAL_LATITUDE 51.556899; #define ARSENAL_LONGITUDE -0.106483; #define CHELSEA_LATITUDE 51.481314; #define CHELSEA

Repeating pin annotation on map

戏子无情 提交于 2019-11-29 12:09:59
I have just started learning Swift. Question: When I touch on map to place the pin annotation and drag my finger it creates repeating line of annotation. import UIKit import MapKit import CoreLocation class ViewController: UIViewController, CLLocationManagerDelegate, MKMapViewDelegate { @IBOutlet weak var map: MKMapView! var manager:CLLocationManager! override func viewDidLoad() { super.viewDidLoad() //Manager for current location manager = CLLocationManager() manager.delegate = self manager.desiredAccuracy = kCLLocationAccuracyBest manager.requestWhenInUseAuthorization() manager