Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread Display Modes
Old Jan 31, 2013, 12:39 PM   #1
macrumors member
Join Date: Mar 2012
Show mapview in zoomed in mode the very first time

I am trying to load the mapview in zoomed in mode on first time. I save a record with my current location in zoomed in mode.Close it.Open a new record, give the mapview a new location(2 blocks from my current location).Save it. So i have 2 records now. I open the first record, and it shows me an annotation in world view mode. I open the second record and it shows me that location which i saved for 2nd record in zoomed in mode. I close the 2nd one ,go back and now open the first record and it shows location in zoomed in mode. So how do i get to open the mapview in zoomed in mode the very first time?
If you need more info,please ask.Thanks.
- (void)setDraggablePinOnMap:(CLLocationCoordinate2D)currentCoordinates
 	NSLog(@"458 the current lat is %f", currentCoordinates.latitude);
	NSLog(@"459 the current long val is %f", currentCoordinates.longitude);
 	[self.nwMapView setMapType:MKMapTypeSatellite];

	[self.nwMapView setScrollEnabled:YES];
	MKCoordinateRegion extentsRegion = MKCoordinateRegionMakeWithDistance(currentCoordinates, 80, 80);
	extentsRegion.span.longitudeDelta = 0.002f;
	extentsRegion.span.latitudeDelta = 0.002f;
	[self.nwMapView setRegion:extentsRegion animated:NO];
	ITMAnnotation *annotation = [[ITMAnnotation alloc] initWithCoordinate:currentCoordinates addressDictionary:nil];
	annotation.title = @"Drag to Move Pin";
	annotation.subtitle = [NSString	stringWithFormat:@"%f %f", annotation.coordinate.latitude, annotation.coordinate.longitude];
	NSLog(@"subtitle change at 314");
	[self.nwMapView addAnnotation:annotation];
	self.tempMapView = self.nwMapView;

Last edited by RookieAppler; Jan 31, 2013 at 01:00 PM. Reason: Updated some code
RookieAppler is offline   0 Reply With Quote
Old Jan 31, 2013, 02:56 PM   #2
dejo's Avatar
Join Date: Sep 2004
Location: The Centennial State
Is setDraggablePinOnMap: the only place you are calling your mapView's setRegion:animated:? How/where is this method triggered? Also, what is your mapView's userTrackingMode?
My iOS Apps: a.k.a., DreamStream, Flag Holidays
I support the MacRumors Blood Drive!
dejo is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

first time, ios, mkmapview, world, zoom

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Help with XCode Mapview Annotation Ruoz iPhone/iPad Programming 1 Mar 13, 2014 01:36 PM
Show both slideshow and video at same time? ReallyBigFeet Mac Applications and Mac App Store 2 Jun 8, 2013 04:52 PM
Zoom to a Region in MapView RagingGoat iPhone/iPad Programming 1 May 3, 2013 10:47 AM
Show battery time Moshe1010 MacBook Air 1 Aug 8, 2012 03:55 PM
Get image data for pins on a MapView without blocking main thread problem pan17 iPhone/iPad Programming 4 Jul 25, 2012 07:26 PM

Forum Jump

All times are GMT -5. The time now is 02:39 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC