mkmapview

Create multiple MKOverlays of polyline from locations coming via web-service

点点圈 提交于 2019-12-08 08:32:34
问题 My app is real-time tracker, where multiple users are logged in and updating their location by sending their co-ordinates to our web service which is then called back let's after every 2 minutes to show all the users on my MapView . Every time I get the locations of users from web service in connectionDidFinishLoading method, I am parsing, creating polyline through pointsArray and adding them to overlay : -(void) connectionDidFinishLoading: (NSURLConnection *) connection { userLatitudeArray =

MapView with local search

南笙酒味 提交于 2019-12-08 08:24:33
问题 I've a question about doing a local search in Apple maps which I have already implemented into my app. The app should show the user where are "supermarkets" around him. My mapView also shows the user's current location but I don't really know how I should do this with the results of the market-locations. Maybe Apple provides a solution/advice for this. Thanks in advance. The results (supermarkets) should be displayed as in this picture. UPDATE: The function works perfectly but is it also

making map coordinates(lan,& long)storing in sqlite database

一个人想着一个人 提交于 2019-12-08 06:40:03
问题 how to created an application that records a series of longitude and latitude values in a SQLite database and display them as a coloured track on a MapActivity. I need help. How can store the map coordinates in sqlite database and display like journey details in table .For example I have done one journey from mumbai to Pune .Then how can store the data into database that can available for future reference .when user click on journey name it should give all details 回答1: If you are new to

Create multiple MKOverlays of polyline from locations coming via web-service

落花浮王杯 提交于 2019-12-08 06:35:27
My app is real-time tracker, where multiple users are logged in and updating their location by sending their co-ordinates to our web service which is then called back let's after every 2 minutes to show all the users on my MapView . Every time I get the locations of users from web service in connectionDidFinishLoading method, I am parsing, creating polyline through pointsArray and adding them to overlay : -(void) connectionDidFinishLoading: (NSURLConnection *) connection { userLatitudeArray = [[NSMutableArray alloc]init]; userLongitudeArray = [[NSMutableArray alloc]init]; userIdArray = [

Adding MKOverlayPathRenderer as overlay to MKMapView gets exception

╄→尐↘猪︶ㄣ 提交于 2019-12-08 05:57:53
问题 Everything said in topic, so here is the code - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. _pathRenderer = [[MKOverlayPathRenderer alloc] init]; _pathRenderer.lineWidth = 8.0f; _pathRenderer.strokeColor = [UIColor redColor]; _pathRenderer.path = CGPathCreateMutable(); [_mapView addOverlay:_pathRenderer]; } At the last line it drops with exception: Terminating app due to uncaught exception 'NSInvalidArgumentException',

Rotating only the MapView's content

断了今生、忘了曾经 提交于 2019-12-08 05:42:06
问题 I am trying to rotate a map view in my app according the the user's current route. (I don't like to use the built in compasse because only 3GS uses it and it suffers too much interference from other machines, i.e. your own car.). the CGAffineTransformMakeRotation method will rotate the Whole Map View, so the Google Logo will not be in the lower right of the screen anymore. Also all Annotation Views will rotate and look weird on the App. Does anyone knows how to rotate just the content

How to pin point location in google map in XCode

假如想象 提交于 2019-12-08 05:22:39
问题 Hey guys, I'm building an iPhone app for my company and in one of the sections I want to create a tab bar item where it pin point the location of my company. So far I built a basic map view, but I haven't figured what would the code be for pin pointing the location of my company. hope someone can help, thanks 回答1: Did you try investigating MapCallouts from Apple Sample Code? http://developer.apple.com/library/ios/#samplecode/MapCallouts/Introduction/Intro.html 来源: https://stackoverflow.com

iOS User location keeps snapping back

我只是一个虾纸丫 提交于 2019-12-08 04:09:24
问题 I have a map that when a button is pushed, it displays the user's location and zooms in. However, once that button is pushed, you cannot scroll on the map, it keeps snapping back to the user's location. What do I need to add/change? Thanks. // Set action for when the refreh button is pressed -(IBAction)refreshMapView:(id)sender { [self refreshMap]; } // Set action for when the show user location button is pressed -(IBAction)getlocation { mapView.showsUserLocation = YES; [self.mapView

MKAnnotationView Subviews

家住魔仙堡 提交于 2019-12-08 04:05:41
问题 Currently, I am having an issue with my project in implementing a custom MKAnnotationView that has multiple custom UIImageViews. So these custom UIImageViews have a clear button on top of them to not have to add gesture recognizers. As you can see, it would be beneficial to actually tap the MKAnnotationView subviews and have some action happen. I implemented a protocol for the MKAnnotationView where each image subview within the MKAnnotationView makes a callback to the controller that is the

altering the mkmapview (removing annotations)

ⅰ亾dé卋堺 提交于 2019-12-08 03:56:34
问题 I have a weird crash occurred in my application First of all, I would get you a glance about the application, there is a map that contains many annotations and also I customized the callout of these annotation to be a view that contains buttons and many information, it contains a button that have an action to go to another tab in the application, it is called DisclosureButton I added a breakpoint exception to the project so I got where the app is crashed, you can see it above at line 173 As