Search Results

Search found 152 results on 7 pages for 'mapkit'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • MapKit internal calls causing crash

    - by Ronnie Liew
    I have a MKMapView in the view of a UIViewController. The app will crash randomly when the I pop the UIViewController off from the UINavigationController. In the dealloc method of the UIViewController, I have already assigned the MKMapView delegate to nil as below: - (void)dealloc { mapView.delegate = nil; [_mapView release]; _mapView = nil; [super dealloc]; } The crash log are also attached as follows: Crash log #1: Thread 0 Crashed: 0 libobjc.A.dylib 0x000026f6 objc_msgSend + 18 1 MapKit 0x0005676c -[MKUserLocationPositionAnimation animationDidStop:finished:] + 64 2 QuartzCore 0x00015a26 run_animation_callbacks(double, void*) + 282 3 QuartzCore 0x000158dc CA::timer_callback(__CFRunLoopTimer*, void*) + 100 4 CoreFoundation 0x00056bac CFRunLoopRunSpecific + 2112 5 CoreFoundation 0x00056356 CFRunLoopRunInMode + 42 6 GraphicsServices 0x00003b2c GSEventRunModal + 108 7 GraphicsServices 0x00003bd8 GSEventRun + 56 8 UIKit 0x00002768 -[UIApplication _run] + 384 9 UIKit 0x0000146c UIApplicationMain + 688 10 Refill 0x00002aea main (main.m:14) 11 Refill 0x00002a60 start + 44 Crash log#2 Thread 0 Crashed: 0 libobjc.A.dylib 0x000026f4 objc_msgSend + 16 1 MapKit 0x0005a20e -[MKUserLocationViewInternal userLocationViewAccuracyDidUpdate] + 42 2 MapKit 0x0005676c -[MKUserLocationPositionAnimation animationDidStop:finished:] + 64 3 QuartzCore 0x00015a26 run_animation_callbacks(double, void*) + 282 4 QuartzCore 0x000158dc CA::timer_callback(__CFRunLoopTimer*, void*) + 100 5 CoreFoundation 0x00056bac CFRunLoopRunSpecific + 2112 6 CoreFoundation 0x00056356 CFRunLoopRunInMode + 42 7 GraphicsServices 0x00003b2c GSEventRunModal + 108 8 GraphicsServices 0x00003bd8 GSEventRun + 56 9 UIKit 0x00002768 -[UIApplication _run] + 384 10 UIKit 0x0000146c UIApplicationMain + 688 11 Refill 0x00002aea main (main.m:14) 12 Refill 0x00002a60 start + 44 Seems like the MapKit is trying to update the MKMapView on the user location but the delegate has already been deallocated. What else I am missing here?

    Read the article

  • How to follow user location with MapKit

    - by Bloudermilk
    I'm using MapKit to display the user's location relative to pins around them. I'd like to be able to mimic the functionality that Maps provides via the crosshair button in the lower left-hand corner of the screen. I'm already aware that MapKit provides a CLLocation object with the user's location via MKUserLocation, I just wanted to seek advice on how I should keep focus on that location. My initial inclination was to use an NSTimer to center the map on that coordinate every 500ms or so. Is there a better way to do this? Is there something built in to MapKit that I'm missing that will accomplish this? Thanks so much, Brendan

    Read the article

  • Custom Map using iPhone MapKit

    - by DHamrick
    I am attempting to use MapKit to create a custom map (similar to this concept http://mapwow.com/) using an image instead of the google maps image. This is so we can include the gps functionality and the pins functionality. I have looked in the documentation and there does not appear to be a standard way of doing it. Is there a way to do this using MapKit or has someone found a way to achieve something similar?

    Read the article

  • getting error when using mapkit in xcode?

    - by Rahul Vyas
    'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MKMapView)' i am getting this error.am i missed something.i don't know from where to add MApkit.framework first i tried with target-getInfo and then from the bottom + sign added framework but that did not wrked.then i search in spotlight and added another framework.by adding this it removed previous error but gives the above one.what is the exact location of mapkit framework. i want to test it in simulator.

    Read the article

  • Are tile overlays possible with the iPhone's MapKit

    - by rickharrison
    I already have a tile source set up for use with the Google Maps JavaScript API. I am trying to translate this for use with the iPhone MapKit. I have correctly implemented the javascript zooming levels into mapkit. Whenever - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated is called, I snap the region to the nearest zoom level based on the same center point. Is it possible to implement a solution possibly with CATiledLayer to implement a tiling solution. Does the iPhone use the standard 256x256 tiles like google maps does natively? Any direction or help on this would be greatly appreciated. I would rather not waste a couple weeks trying to implement this if it's not possible.

    Read the article

  • Best practice to display POI in iPhone's MapKit?

    - by iamj4de
    Assuming I have a database of POI with their respective coordinates (longitude & latitude). What would be the "standard" way to display the POI as annotations around the user's current location? To elaborate: Given a zoom level, I guess I have to search through the database for all POI whose distance to the current location < a certain threshold, then create annotations for them. Or is there any smarter way? If the user zooms in/out, moves the map... I will need to redo the whole thing again? It seems that MapKit has a mechanism to cache/reuse annotations. Should I create a lot of them right away and let MapKit decides what to render when the visible region changes? I guess this would make the transition smoother, but also consumes more memory. What is your experience with this? Thanks.

    Read the article

  • Using Mapkit to create a local searchable Map

    - by Digital D
    Using MapKit as a base, I'm planning on adding a map to a project with 'local search' capabilities. I think 'local search' describes the feature I want to design into the map. Here is my vision. The map is displayed on the bottom half of a view. The user's current location is highlighted by default. When the user pushes the 'search' button annotation pins drop onto the map. The search is programmatically fixed to a certain item....for example supermarkets. So supermarkets in a 5 mile radius of the user's current location will populate the map. How would I add this local search feature to the already amazing MapKit? I've learned an incredible amount as a new developer in the last few months, and look forward to learning googles...correction googols more. Thanks in anticipation.

    Read the article

  • Determining a location's side of the road position with MapKit

    - by idStar
    Is there a way to use MapKit in iOS7 to not only get geocoding for an address, but determine what side of the road it is on? I'm not trying to build a full function navigation app, but similar to navigation apps that tell you things like "Your destination is in 100 feet on the right", I'd like to be able to obtain this information. Does MapKit give one a way to do this? Do I need to adopt routing privileges to access such, or is this just not available in the SDK period? If not available in the iOS7 SDK, knowing what options exist as services, would be a helpful pointer.

    Read the article

  • MapKit/Location Manager crashes app when unloading view

    - by AppGolfer
    I has a bug where my application crashed "EXC_BAD_ACCESS" when I hit the back key on my navigation bar and the view unloaded that had a MapKit (mapView) and used the Location Manager. Tried for days to fix the bug and finally came up with a fix for anyone that comes across this problem: Add this code to your dealloc (void)dealloc { mapView.delegate = nil; locationManager.delegate = nil; [mapView release]; [locationManager release];

    Read the article

  • MapKit Annotations and User location

    - by teddafan
    Hi all, I followed this tutorial to make my first app: http://icodeblog.com/2009/12/21/introduction-to-mapkit-in-iphone-os-3-0/ I would really like to know how to sort the annotations in the Table in order of distance to the user (the nearest annotation is the first one on the table) How is it possible to do that? I understand that I must use the CLLocation to find the user's location but then I have no idea. Could any one help me? Cheers, Thank you in advance for your much appreciated help, teddafan

    Read the article

  • iPhone MapKit - Go "Around the World" ?

    - by Chris
    I have an App that is using MapKit. I am dropping pins and everything else, but when I zoom out to view the entire world, it does not let me go past the the middle of the Pacific Ocean. If I am viewing California and want to go to China, I have to scroll all the way East to view it. Is there a setting that I need to turn on, or is this just the way it is? I do note that this is how the actual Maps App works, so I might presume that this setting cannot be changed...

    Read the article

  • Toubleshooting mapkit performance

    - by brettr
    I'm plotting over 500 points on a map using mapkit. Zooming is a little jittery compared to the native google map app. I've discovered what is causing the slowness. I'm adding custom annotations so that I can later add different pin colors and buttons for detail views: - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(AddressNote *) annotation { MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentlocation"]; annView.pinColor = MKPinAnnotationColorGreen; annView.animatesDrop=TRUE; annView.canShowCallout = YES; annView.calloutOffset = CGPointMake(-5, 5); return annView; } If I comment out the above code, everything works fine. Very smooth with zooming in/out. Should I be adding annotations differently to boost performance?

    Read the article

  • iPhone Development - CLLocationManager vs. MapKit

    - by Mustafa
    If i want to show userLocation on the map, and at the same time record the user's location, is it a good idea to add an observer to userLocation.location and record the locations, OR should i still use CLLocationManager for recording user location and use mapView.showUserLocation to show the user's current location (blue indicator)? I want to show the default blue indicator supported by the MapKit API. Also, here's a rough sample code: - (void)viewDidLoad { ... locationManager = [[CLLocationManager alloc] init]; locationManager.desiredAccuracy = kCLLocationAccuracyBest; locationManager.distanceFilter = DISTANCE_FILTER_VALUE; locationManager.delegate = self; [locationManager startUpdatingLocation]; myMapView.showUserLocation = YES; [myMapView addObserver:self forKeyPath:@"userLocation.location" options:0 context:nil]; ... } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { // Record the location information // ... } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { NSLog(@"%s begins.", __FUNCTION__); // Make sure that the location returned has the desired accuracy if (newLocation.horizontalAccuracy <= manager.desiredAccuracy) return; // Record the location information // ... } Under the hood, i think MKMapView also uses CLLocationManager to get user's current location? So, will this create any problems because i believe both CLLocationManager and MapView will try to use same location services? Will there be any conflicts and lack of accurate/required or current data?

    Read the article

  • MapKit custom annotations being added to map, but are not visible on the map

    - by culov
    I learned a lot from the screencast at http://icodeblog.com/2009/12/21/introduction-to-mapkit-in-iphone-os-3-0/ , and ive been trying to incorporate the way he creates a custom annotation into my iphone app. He is hardcoding annotations and adding them individually to the map, whereas i want to add them from my data source. So i have an array of objects with a lat and a lng (ive checked that the values are within range and ought to be appearing on the map) that i iterate through and do [mapView addAnnotation:truck] once this process is completed, i check the number of annotations on the map with [[mapView annotations] count] and its equal to the number it ought to be, so all the annotations are getting added onto the mapView, but for some reason I cant see any annotations in the simulator. I've compared my code with his in all the pertinent places many times, but nothing seems to stand out as being incorrect. Ive also reviewed my code for the last several hours trying to find a point where I do something wrong, but nothing is coming to mind. The images are named just as they are assigned in the custom AnnotationView, the loadAnnotation function is done properly, etc... i dont know what it could be. so i suppose if i could have the answer to one question it would be, what are possible causes for a mapView to contain several annotations, but to not show any on the map? Thanks

    Read the article

  • Problems pulling data from NSMutableArray for MapKit?

    - by Graeme
    Hi, I have a class (DataImporter) which has the code to download an RSS feed. I also have a view and separate class (TableView) which displays the data in a UITableView and starts the parsing process, storing parsed information in an NSMutableArray (items). Now I wish to add a UIMapView which displays the items in the items NSMutableArray. I'm struggling to transfer the data into the new class (mapView) to show it in the map - and I preferably don't want to have to create a new class to download the data again for the map. Is there a way I can transfer the information from the NSMutableArray (items) to the mapView? Thanks. Code for viewDidLoad MapKit: Data *data = nil; NSString *ilocation = [data locations]; NSString *ilocation2 = @"New Zealand"; NSString *inewlString; inewlString = [ilocation stringByAppendingString:ilocation2]; NSLog(@"inewlString=%@",inewlString); if(forwardGeocoder == nil) { forwardGeocoder = [[BSForwardGeocoder alloc] initWithDelegate:self]; } // Forward geocode! [forwardGeocoder findLocation: inewlString]; Code for parsing data into NSMutable Array: - (void)beginParsing { NSLog(@"Parsing has begun"); //self.navigationItem.rightBarButtonItem.enabled = NO; // Allocate the array for song storage, or empty the results of previous parses if (incidents == nil) { NSLog(@"Grabbing array"); self.datas = [NSMutableArray array]; } else { [datas removeAllObjects]; [self.tableView reloadData]; } // Create the parser, set its delegate, and start it. self.parser = [[DataImporter alloc] init]; parser.delegate = self; [parser start]; }

    Read the article

  • iPhone MapKit problems: viewForAnnotation inconsistently setting pinColor?

    - by blackkettle
    Hi, I'm trying setup a map that displays different pin colors depending on the type/class of the location in question. I know this is a pretty common thing to do, but I'm having trouble getting the viewForAnnotation delegate to consistently update/set the pin color. I have a showThisLocation function that basically cycles through a list of AddressAnnotations and then based on the annotation class (bus stop, hospital, etc.) I set an if( myClass == 1){ [defaults setObject:@"1" forKey:@"currPinColor"]; [defaults synchronize]; NSLog(@"Should be %@!", [defaults objectForKey:@"currPinColor"]); } else if( myClass ==2 ){ [defaults setObject:@"2" forKey:@"currPinColor"]; [defaults synchronize]; NSLog(@"Should be %@!", [defaults objectForKey:@"currPinColor"]); } [_mapView addAnnotation:myCurrentAnnotation]; then my viewForAnnotation delegate looks like this, - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation { if( annotation == mapView.userLocation ){ return nil; } NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; MKPinAnnotationView *annView = nil; annView = (MKPinAnnotationView*)[mapView dequeueReusableAnnotationViewWithIdentifier:@"currentloc"]; if( annView == nil ){ annView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentloc"]; } annView.pinColor = [defaults integerForKey:@"currPinColor"]; NSLog(@"Pin color: %d", [defaults integerForKey:@"currPinColor"]); annView.animatesDrop=TRUE; annView.canShowCallout = YES; annView.calloutOffset = CGPointMake(-5, 5); return annView; } The problem is that, although the NSLog statements in the "if" block always confirm that the color has been set, the delegate sometimes but not always ends up with the correct color. I've also noticed that what generally happens is that the first search for a new location will set all pins to the last color in the "if" block, but search for the same location again will set the pins to the correct color. I suspect I am not supposed to usen NSUserDefaults in this way, but I also tried to create my own subclass for MKAnnotation which included an additional property "currentPinColor", and while this allowed me to set the "currentPinColor", when I tried to access the "currentPinColor from the delegate method, the compiler complained that it didn't know anything about "currentPinColor in connection with MKAnnotation. Fair enough I guess, but then I tried to revise the delegate method, - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation instead of the default - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation at which point the compiler complained that it didn't know anything about the protocol for MyCustomMKAnnotation in this delegate context. What is the proper way to set the delegate method and/or MyCustomMKAnnotation, or what is the appropriate way to achieve consistent pinColor settings. I'm just about out of ideas for things to try here.

    Read the article

  • iPhone Development: CoreLocation and MapKit

    - by Mustafa
    How bad is it to use Location Manager to retrieve the location information when MapView.showUserLocation is also TRUE? I have a situation where i want to show the blue dot to indicate the user's current location, and i want to record the user's current location after some time interval. Having said that, there may be situations where the user's current location is now being shown, but i still want to get the user's current location. I think i'll have to use the Location Manager in my controller class, but setting showUserLocation = YES would mean that i'll be draining more battery since two Location Managers are working at the same time? Is this assumption correct?

    Read the article

  • iPhone Mapkit Blue Dot / User Location Region Zoom Question

    - by user290031
    Hey All, Is is possible to set a region based on a current location in a mapview only one time. I want my iphone app to get the current location, zoom into that current location, and then allow the user to scroll around. However, because my setRegion code is in my didUpdateToLocation function, every time the current location is updated, so is the region, and I can't scroll around on the map. I tried putting this setRegion code in the viewDidLoad function, but the user's current location isn't initialized at this point, so it doesn't work right. Any ideas?

    Read the article

  • Drawing a route in mapkit in iphone sdk

    - by PRN
    Hello, I want to draw a route between 2 locations on the map.. something as a tour guide.When the tourist clicks another location i want to be able to draw the route as well as inform the distance from current location. I am aware of sites on the internet which tell how to draw polylines on map. But,one such example had a preloaded .csv file with various coordinates. Is there an alternate way to get the coordinates..as the location is selected dynamically.If no, how do i get the information for intermediate coordinates? Am a newbie. so please dont mind me asking this question. Thanks in advance.

    Read the article

  • iphone zoom to user location on mapkit

    - by satyam
    I'm using map kit and showing user's location using "showsUserLocation" I"m using following code to zoom to user's location, but not zooming. Its zooming to some location in Africa, though the user location on map is showing correct. MKCoordinateRegion newRegion; MKUserLocation* usrLocation = mapView.userLocation; newRegion.center.latitude = usrLocation.location.coordinate.latitude; newRegion.center.longitude = usrLocation.location.coordinate.longitude; newRegion.span.latitudeDelta = 20.0; newRegion.span.longitudeDelta = 28.0; [self.mapView setRegion:newRegion animated:YES]; Why is user's location correctly showing and not zooming properly. Can some one correct me please?

    Read the article

1 2 3 4 5 6 7  | Next Page >