mapkit

How to Pass Data from View Controllers?

谁说胖子不能爱 提交于 2020-01-05 03:37:51
问题 I want to pass a latitude data and longitude data to another controller called DestinationViewController. DestinationViewController contains a map view, so as user transitions to a new view, they will see a flyover map based on the location(latitude and longitude) data in the first view. Now there is a few problems which I will explain along the way. FIRST VIEW import UIKit import MapKit import CoreLocation class SliderViewController: UIViewController, MKMapViewDelegate,

How to Pass Data from View Controllers?

断了今生、忘了曾经 提交于 2020-01-05 03:37:07
问题 I want to pass a latitude data and longitude data to another controller called DestinationViewController. DestinationViewController contains a map view, so as user transitions to a new view, they will see a flyover map based on the location(latitude and longitude) data in the first view. Now there is a few problems which I will explain along the way. FIRST VIEW import UIKit import MapKit import CoreLocation class SliderViewController: UIViewController, MKMapViewDelegate,

Plotting Route with Multiple Points in iOS

不打扰是莪最后的温柔 提交于 2020-01-04 11:41:10
问题 I am trying to display a route with multiple points in the provided Maps application. I have figured out how to display a route between two points following this post. I am building a list of multiple points following these directions. From what I understand, opening a maps.google.com (in iOS) will open the maps application (or Safari if Maps is not available). The result is the Maps application is still only showing a route between the start and destination. The points added with mrad

Shortest route between multiple points in mapkit for iphone app

时光毁灭记忆、已成空白 提交于 2020-01-04 11:39:06
问题 In my application suppose user selects 4 cities to vist with S as starting city and D as destination city then is there any API or webservice for this . Here the users visits the city one time only and the output should be the shortest path between A and D by covering all the cities. If somebody has any other idea it is also welcomed. Thanks and Regards Mrugen 回答1: Mapquest has recently really taken the lead in terms of navigation and geocoding APIs. FAR better than Google's offering, IMO.

Getting Strange Output in Reverse Geo coder in iphone dev

∥☆過路亽.° 提交于 2020-01-04 05:58:33
问题 I am working on map kit and i have task to change location in mapkit using UILongPressGestureRecognizer class, i always successfully get latitude and longitude but i couldn't get location some time. I am doing like this. UILongPressGestureRecognizer *lpgr = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)]; lpgr.minimumPressDuration = 2.0; //user must press for 2 seconds [mapView addGestureRecognizer:lpgr]; [lpgr release]; - (void)handleGesture:

mapkit addAnnotations crashes

戏子无情 提交于 2020-01-04 05:45:11
问题 I have a UITabBarController and a "Map" tab on it. The Map tab is associated with my custom UIViewController and it has a MKMapView on it. When I'm currently selecting another tab, and when I do tap on the Map tab, iPhone4 with iOS4.3.1 crashes with a crash log like this: What can I do to prevent this crash? What's wrong with my code? 0 MapKit 0x3501fc20 _contains(objc_object*, MKQuadTrieNode*) + 16 1 MapKit 0x3501fc00 -[MKQuadTrie contains:] + 12 2 MapKit 0x3501f9f2 -

image markers on MKMapView

落花浮王杯 提交于 2020-01-03 17:10:27
问题 Need to use own imaged markers instead built-in pins. I have several questions. 1. Is it legally? I have a doubt because there is no standard support for markers(pins) with own icon. How to make a marker with own icon right way? I found the post which actually describe how-to: http://www.arlingtondev.com/thoughts/?p=81. I am a newbie, but it looks like a "crutch", which i do not want to use in my clean code. Could you advise better way? I had a lot of problems while integrate that method and

image markers on MKMapView

人走茶凉 提交于 2020-01-03 17:10:18
问题 Need to use own imaged markers instead built-in pins. I have several questions. 1. Is it legally? I have a doubt because there is no standard support for markers(pins) with own icon. How to make a marker with own icon right way? I found the post which actually describe how-to: http://www.arlingtondev.com/thoughts/?p=81. I am a newbie, but it looks like a "crutch", which i do not want to use in my clean code. Could you advise better way? I had a lot of problems while integrate that method and

is there any way of allowing zooming MKMapView only to a specific region, while disabling any other user interaction?

十年热恋 提交于 2020-01-03 16:00:13
问题 I have a swift app with a MapView. These are my settings on story board for the map: Also, in the code I'm doing: let regionRadius: CLLocationDistance = 10000 let initialLocation = CLLocation(latitude: latitude, longitude: longitude) centerMapOnLocation(initialLocation, map: cell.mapView, radius: regionRadius) cell.mapView.scrollEnabled = false cell.mapView.rotateEnabled = false My method centerMapOnLocation centers the map initially on a specific location: func centerMapOnLocation(location:

Looking for business name information from coordinates using CLLocation and/or Mapkit

ぃ、小莉子 提交于 2020-01-03 06:21:05
问题 I'm trying to use coordinates returned using CLLocationManager to see if they are a close match for any local business - if I happened to be standing in a Starbucks for example, I would want my app to suggest that based on my coordinates I was standing in Starbucks. If I was 20 metres outside Starbucks, but it was the closest address to where I was standing, I would want it to suggest 'Starbucks'. I can return CLPlacemarks no problem, but the information they contain does not contain the