SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
Presenta(on	
  On	
  
GPS,	
  Map-­‐kit,	
  Core-­‐Loca(on	
  and	
  
Region	
  Monitoring,	
  Geo-­‐fencing	
  	
  
Presented	
  By	
  
Syed	
  Mahboob	
  Nur	
  	
  
iOS	
  Developer	
  	
  
	
  
Blog:	
  
hEp://mahboobiosdeveloper.blogspot.com/	
  
Fb	
  Profile:	
  
hEps://www.facebook.com/mahboob.nur	
  
	
  
	
  
GPS	
  
	
  
The	
  Global	
  Posi(oning	
  System	
  (GPS)	
  is	
  a	
  satellite-­‐based	
  naviga(on	
  system	
  
made	
  up	
  of	
  a	
  network	
  of	
  24	
  satellites	
  placed	
  into	
  orbit	
  by	
  the	
  U.S.	
  
	
  Department	
  of	
  Defense.	
  GPS	
  was	
  originally	
  intended	
  for	
  military	
  applica(ons,	
  
but	
  in	
  the	
  1980s,	
  the	
  government	
  made	
  the	
  system	
  available	
  for	
  civilian	
  use.	
  
	
  GPS	
  works	
  in	
  any	
  weather	
  condi(ons,	
  anywhere	
  in	
  the	
  world,	
  24	
  hours	
  a	
  day.	
  
There	
  are	
  no	
  subscrip(on	
  fees	
  or	
  setup	
  charges	
  to	
  use	
  GPS.	
  
Map	
  View	
  
	
  
A	
  map	
  view	
  contains	
  a	
  flaEened	
  representa(on	
  	
  
of	
  a	
  spherical	
  object,	
  namely	
  the	
  Earth.	
  
	
  In	
  order	
  to	
  use	
  maps	
  effec(vely,	
  you	
  need	
  to	
  
	
  understand	
  a	
  liEle	
  bit	
  about	
  how	
  to	
  specify	
  points	
  
	
  in	
  a	
  map	
  view,	
  and	
  how	
  those	
  points	
  translate	
  to	
  points	
  
	
  on	
  the	
  Earth’s	
  surface.	
  Understanding	
  map	
  coordinate	
  
	
  systems	
  is	
  especially	
  
	
  important	
  if	
  you	
  plan	
  to	
  place	
  custom	
  content,	
  such	
  as	
  overlays	
  
,	
  on	
  top	
  of	
  the	
  map.	
  
	
  
Map	
  View	
  
Loca(on	
  Monitoring	
  	
  
Systems	
  
•  Core	
  Loca(on	
  	
  
•  Region	
  Monitoring	
  
•  Geo	
  Fencing	
  
•  I	
  Beacon	
  
	
  
And	
  so	
  on	
  	
  
Core	
  Loca(on	
  
•  The	
  Core	
  Loca(on	
  framework	
  lets	
  you	
  determine	
  the	
  current	
  loca(on	
  or	
  
heading	
  associated	
  with	
  a	
  device.	
  The	
  framework	
  uses	
  the	
  available	
  
hardware	
  to	
  determine	
  the	
  user’s	
  posi(on	
  and	
  heading.	
  You	
  use	
  the	
  
classes	
  and	
  protocols	
  in	
  this	
  framework	
  to	
  configure	
  and	
  schedule	
  the	
  
delivery	
  of	
  loca(on	
  and	
  heading	
  events.	
  You	
  can	
  also	
  use	
  it	
  to	
  define	
  
geographic	
  regions	
  and	
  monitor	
  when	
  the	
  user	
  crosses	
  the	
  boundaries	
  of	
  
those	
  regions.	
  In	
  iOS,	
  you	
  can	
  also	
  define	
  a	
  region	
  around	
  a	
  Bluetooth	
  
beacon.	
  
Core	
  Loca(on	
  
Class	
  References	
  

Protocol	
  References	
  

Other	
  References	
  

CLBeacon	
  
CLBeaconRegion	
  
	
  CLCircularRegion	
  
CLGeocoder	
  
CLHeading	
  
CLLoca9on	
  
CLLoca9onManager	
  
CLPlacemark	
  
CLRegion	
  

CLLLoca9onManagerDeleg
ate	
  

Core	
  Loca9on	
  Func9ons	
  
Core	
  Loca9on	
  Data	
  Types	
  
Core	
  Loca9on	
  Constants	
  	
  	
  
	
  
Ini(alize	
  Loca(on	
  	
  
Manager	
  
-­‐	
  (void)startStandardUpdates	
  
{	
  	
  
	
   	
  if	
  (nil	
  ==	
  loca9onManager)	
  	
  
	
  {	
  
	
  	
  	
  	
  	
  	
   	
  loca9onManager	
  =	
  [[CLLoca9onManager	
  alloc]	
  init];	
  
	
  loca9onManager.delegate	
  =	
  self;	
  
	
  	
  	
  	
  	
  	
   	
  loca9onManager.desiredAccuracy	
  =	
  kCLLoca9onAccuracyKilometer;	
  
	
  events.	
  loca9onManager.distanceFilter	
  =	
  500	
  
	
  	
  	
  	
  	
  	
   	
  [loca9onManager	
  startUpda9ngLoca9on];	
  
	
  }	
  
}	
  
Ac9vate	
  GPS	
  Using	
  
	
  CoreLoca9on	
  Loca9on	
  Manager	
  
	
  
	
  	
  
If(!	
  loca(onManager)	
  
{ 	
  	
  
	
   	
  [loca(onManager	
  setDelegate:self];	
  
	
   	
  [loca(onManager	
  startUpda(ngLoca(on];	
  
	
   	
  [loca(onManager	
   	
  
	
  startMonitoringSignificantLoca(onChanges];	
  	
  	
  
	
   	
  [loca(onManager	
  startUpda(ngHeading];	
  
}	
  

	
  

	
  	
  
Core	
  Loca(on	
  
	
  Code	
  
	
  
-­‐  (void)loca9onManager:(CLLoca9onManager	
  *)manager	
  
didUpdateLoca9ons:(NSArray	
  *)loca9ons	
  
	
  {	
  
	
  	
  	
  	
  	
  	
   	
  
	
  NSLog(@"la9tude	
  %+.6f,	
  longitude	
  %+.6fn",	
   	
  
	
  
	
  
	
  
	
  
	
  loca9on.coordinate.la9tude,	
  loca9on.coord	
  inate.longitude);	
  	
  
	
   	
  
	
  	
  
	
  }	
  

	
  
Problems	
  of	
  	
  
Ac(vate	
  GPS	
  all	
  the	
  (me	
  
•  Huge	
  BaEery	
  Consump(on	
  
	
  
	
  
Loca(on	
  	
  
Monitoring	
  System	
  that	
  	
  saves	
  BaEery	
  Life	
  

•  Region	
  Monitoring	
  
•  Geo	
  Fencing	
  	
  
	
  
Region	
  Monitoring	
  
	
  	
  
Region	
  monitoring	
  lets	
  you	
  monitor	
  boundary	
  
crossings	
  for	
  defined	
  geographical	
  regions	
  and	
  
Bluetooth	
  low	
  energy	
  beacon	
  regions.	
  (iOS	
  4.0	
  
and	
  later.)	
  
Steps	
  of	
  implemen(ng	
  	
  
Region	
  Monitoring	
  
•  Declare	
  and	
  Ini(alize	
  a	
  MKCoordinateRegion	
  
•  Declare	
  and	
  Ini(alize	
  a	
  CLCircularRegion	
  
•  Draw	
  a	
  circular	
  Geofence	
  around	
  the	
  current	
  
loca(on	
  of	
  the	
  user.	
  
•  Start	
  monitoring	
  region	
  un(l	
  user	
  exit	
  the	
  
region	
  	
  
•  When	
  user	
  exit	
  the	
  region	
  draw	
  a	
  Circular	
  
Geofence	
  and	
  start	
  monitoring	
  for	
  the	
  new	
  
region.	
  
Important	
  Codes	
  for	
  	
  
implemen(ng	
  	
  
Region	
  Monitoring	
  

•  MKCoordinateRegion	
  

–  A	
  structure	
  that	
  defines	
  which	
  por(on	
  of	
  the	
  map	
  to	
  display.	
  

	
  	
  MKCoordinateRegion	
  region;	
  
	
  	
  	
  	
   	
  region.center.la(tude	
  =	
  	
  	
   	
   	
  
	
  loca(onManager.loca(on.coordinate.la(tude;	
  
	
  	
  	
  	
   	
  region.center.longitude	
  =	
  	
  	
  
	
  loca(onManager.loca(on.coordinate.la(tude;	
  
	
  	
  	
  	
  	
  
	
  	
  	
  	
   	
  region.span.la(tudeDelta	
  =	
  SPAN_VALUE;	
  
	
  	
  	
  	
   	
  region.span.longitudeDelta	
  =	
  SPAN_VALUE;	
  
	
  	
  	
  	
   	
  [self.mapView	
  setRegion:region	
  animated:YES];	
  
	
  
Important	
  Codes	
  for	
  	
  
implemen(ng	
  	
  
Region	
  Monitoring	
  
CLCircularRegion	
  :	
  
	
  The	
  CLCircularRegion	
  class	
  defines	
  the	
  loca(on	
  and	
  
boundaries	
  for	
  a	
  circular	
  geographic	
  region.	
  You	
  can	
  use	
  
instances	
  of	
  this	
  class	
  to	
  define	
  geo	
  fences	
  for	
  a	
  specific	
  
loca(on.	
  The	
  crossing	
  of	
  a	
  geo	
  fence’s	
  boundary	
  causes	
  
the	
  loca(on	
  manager	
  to	
  no(fy	
  its	
  delegate	
  
	
  
CLCircularRegion	
  *myRegion=[[CLCircularRegion	
  
alloc]initWithCenter:region.center	
  radius:10	
  
iden(fier:@"myRegion"];	
  
	
  	
  	
  	
  [loca(onManager	
  
startMonitoringForRegion:myRegion];	
  
	
  
Important	
  Codes	
  for	
  	
  
implemen(ng	
  	
  
Region	
  Monitoring	
  

•  Draw	
  a	
  circular	
  geofence:	
  
	
  
	
   	
  	
  MKCircle	
  *circle	
  =	
  [MKCircle	
   	
  
	
  circleWithCenterCoordinate:region.center	
   	
  
	
  radius:100];	
  
	
  [self.mapView	
  addOverlay:circle];	
  
Important	
  Codes	
  for	
  	
  
implemen(ng	
  	
  
Region	
  Monitoring	
  

•  Delegate	
  method	
  to	
  make	
  Circular	
  Overlay	
  Colorful	
  	
  
	
  	
  
	
  -­‐(MKOverlayView	
  *)	
  mapView:(MKMapView	
  *)mapView	
  
	
  viewForOverlay:(id<MKOverlay>)overlay	
  
	
  {	
  
	
  	
  	
  	
  	
  MKCircleView	
  *circleView	
  =	
  [[MKCircleView	
  alloc]	
   	
  
	
  initWithCircle:overlay];	
  
	
  	
  	
  	
  	
  circleView.fillColor	
  =	
  [[UIColor	
  redColor]	
   	
   	
   	
  
	
  colorWithAlphaComponent:0.1];	
  
	
  	
  	
  	
  	
  circleView.strokeColor	
  =	
  [[UIColor	
  blueColor]	
  	
  
	
  colorWithAlphaComponent:1.0];	
  
	
  	
  	
  	
  	
  circleView.lineWidth	
  =	
  1;	
  
	
  	
  	
  	
  	
  return	
  circleView;	
  
	
  }	
  
	
  

	
  
• 
	
  

Important	
  Codes	
  for	
  	
  
implemen(ng	
  	
  
Region	
  Monitoring	
  

Determine	
  when	
  user	
  enters	
  and	
  exits	
  region	
  

	
  -­‐	
  (void)loca9onManager:(CLLoca9onManager	
  *)manager	
  didEnterRegion:(CLRegion	
  *)region	
  

	
  {	
  
	
  	
  	
  	
   	
  
	
  UIAlertView	
  *alert	
  =	
  [[UIAlertView	
  alloc]initWithTitle:@""	
  
message:@"didEnterRegion"	
  delegate:nil	
  cancelBubonTitle:@"OK"	
  otherBubonTitles:nil,	
  nil];	
  
	
  	
  	
  	
   	
  
	
  [alert	
  show];	
  
	
  	
  	
  	
   	
  
	
  NSLog(@"didEnterRegion");	
  
	
  }	
  
	
  -­‐	
  (void)loca9onManager:(CLLoca9onManager	
  *)manager	
  didExitRegion:(CLRegion	
  *)region	
  
	
  {	
  
	
  	
  	
  	
   	
  
	
  UIAlertView	
  *alert	
  =	
  [[UIAlertView	
  alloc]initWithTitle:@""	
  
message:@"didExitRegion"	
  delegate:nil	
  cancelBubonTitle:@"OK"	
  otherBubonTitles:nil,	
  nil];	
  
	
  	
  	
  	
   	
  
	
  [alert	
  show]; 	
  	
  
	
  }	
  
Geofencing	
  	
  
•  A	
  geo-­‐fence	
  is	
  a	
  virtual	
  perimeter	
  for	
  a	
  real-­‐
world	
  geographic	
  areas.	
  
	
  
•  A	
  geo-­‐fence	
  could	
  be	
  dynamically	
  generated—
as	
  in	
  a	
  radius	
  around	
  a	
  store	
  or	
  point	
  loca(on.	
  
Or	
  a	
  geo-­‐fence	
  can	
  be	
  a	
  predefined	
  set	
  of	
  
boundaries,	
  like	
  school	
  aEendance	
  zones	
  or	
  
neighborhood	
  boundaries.	
  Custom-­‐digi(zed	
  
geofences	
  are	
  also	
  in	
  use.	
  
	
  
	
  
Geofecing	
  
iBeacon	
  
•  iBeacon	
   is	
   an	
   indoor	
   posi(oning	
   system	
   that	
  
Apple	
   Inc	
   calls	
   "a	
   new	
   class	
   of	
   low-­‐powered,	
  
low-­‐cost	
   transmiEers	
   that	
   can	
   no(fy	
   nearby	
  
iOS	
  7	
  devices	
  of	
  their	
  presence.	
  	
  
•  They	
   can	
   also	
   be	
   used	
   by	
   the	
   Android	
  
opera(ng	
  system.[	
  The	
  technology	
  enables	
  an	
  
iOS	
   device	
   or	
   other	
   hardware	
   to	
   send	
   push	
  
no(fica(ons	
  to	
  iOS	
  devices	
  in	
  close	
  proximity.	
  
I	
  Beacon	
  
 
That’s	
  all	
  for	
  Today	
  	
  

Más contenido relacionado

La actualidad más candente

Flight Dynamics Software Presentation Part I Version 5
Flight Dynamics Software Presentation Part I Version 5Flight Dynamics Software Presentation Part I Version 5
Flight Dynamics Software Presentation Part I Version 5Antonios Arkas
 
Mm6 Vs Juno Wp En June 2009
Mm6 Vs Juno Wp En June 2009Mm6 Vs Juno Wp En June 2009
Mm6 Vs Juno Wp En June 2009guesta2a0eba
 
التحليل المكاني للجزر الحرارية في مدينة الرياض مناور المطيري - إشراف أ.د. م...
التحليل المكاني للجزر الحرارية في مدينة الرياض   مناور المطيري - إشراف أ.د. م...التحليل المكاني للجزر الحرارية في مدينة الرياض   مناور المطيري - إشراف أ.د. م...
التحليل المكاني للجزر الحرارية في مدينة الرياض مناور المطيري - إشراف أ.د. م...Mohammed Sharaf
 
FR3T10-3-IGARSS2011_Geolocation_20110720.pptx
FR3T10-3-IGARSS2011_Geolocation_20110720.pptxFR3T10-3-IGARSS2011_Geolocation_20110720.pptx
FR3T10-3-IGARSS2011_Geolocation_20110720.pptxgrssieee
 
Advances in Satellite Conjunction Analysis with OR.A.SI
Advances in Satellite Conjunction Analysis with OR.A.SIAdvances in Satellite Conjunction Analysis with OR.A.SI
Advances in Satellite Conjunction Analysis with OR.A.SIAntonios Arkas
 
GNSS and Positioning for the Future - Kai Borre
GNSS and Positioning for the Future - Kai BorreGNSS and Positioning for the Future - Kai Borre
GNSS and Positioning for the Future - Kai Borreestelconference
 
Presentation for the 19th EUROSTAR Users Conference June 2011
Presentation for the 19th EUROSTAR Users Conference June 2011Presentation for the 19th EUROSTAR Users Conference June 2011
Presentation for the 19th EUROSTAR Users Conference June 2011Antonios Arkas
 
Flight Dynamics Software Presentation Part II Version 7
Flight Dynamics Software Presentation Part II Version 7Flight Dynamics Software Presentation Part II Version 7
Flight Dynamics Software Presentation Part II Version 7Antonios Arkas
 
Navigation Position: Sea Scout Ship 378
Navigation Position: Sea Scout Ship 378Navigation Position: Sea Scout Ship 378
Navigation Position: Sea Scout Ship 378Sam Young
 
Innovative, Non-Classical Optical Performance Verification Methodology
Innovative, Non-Classical Optical Performance Verification MethodologyInnovative, Non-Classical Optical Performance Verification Methodology
Innovative, Non-Classical Optical Performance Verification MethodologySociety of Women Engineers
 
Mission Planning and Execution for the Unmanned Rotorcraft ARTIS
Mission Planning and Execution for the Unmanned Rotorcraft ARTISMission Planning and Execution for the Unmanned Rotorcraft ARTIS
Mission Planning and Execution for the Unmanned Rotorcraft ARTISFlorian-Michael Adolf
 
Presentation for the 21th EUROSTAR Users Conference - June 2013
Presentation for the 21th EUROSTAR Users Conference - June 2013 Presentation for the 21th EUROSTAR Users Conference - June 2013
Presentation for the 21th EUROSTAR Users Conference - June 2013 Antonios Arkas
 
Presentation for the 16th EUROSTAR Users Conference June 2008
Presentation for the 16th EUROSTAR Users Conference June 2008Presentation for the 16th EUROSTAR Users Conference June 2008
Presentation for the 16th EUROSTAR Users Conference June 2008Antonios Arkas
 
Global positioning system 1
Global positioning system  1Global positioning system  1
Global positioning system 1sunil POLICE}
 

La actualidad más candente (20)

Flight Dynamics Software Presentation Part I Version 5
Flight Dynamics Software Presentation Part I Version 5Flight Dynamics Software Presentation Part I Version 5
Flight Dynamics Software Presentation Part I Version 5
 
Mm6 Vs Juno Wp En June 2009
Mm6 Vs Juno Wp En June 2009Mm6 Vs Juno Wp En June 2009
Mm6 Vs Juno Wp En June 2009
 
التحليل المكاني للجزر الحرارية في مدينة الرياض مناور المطيري - إشراف أ.د. م...
التحليل المكاني للجزر الحرارية في مدينة الرياض   مناور المطيري - إشراف أ.د. م...التحليل المكاني للجزر الحرارية في مدينة الرياض   مناور المطيري - إشراف أ.د. م...
التحليل المكاني للجزر الحرارية في مدينة الرياض مناور المطيري - إشراف أ.د. م...
 
FR3T10-3-IGARSS2011_Geolocation_20110720.pptx
FR3T10-3-IGARSS2011_Geolocation_20110720.pptxFR3T10-3-IGARSS2011_Geolocation_20110720.pptx
FR3T10-3-IGARSS2011_Geolocation_20110720.pptx
 
Advances in Satellite Conjunction Analysis with OR.A.SI
Advances in Satellite Conjunction Analysis with OR.A.SIAdvances in Satellite Conjunction Analysis with OR.A.SI
Advances in Satellite Conjunction Analysis with OR.A.SI
 
GNSS and Positioning for the Future - Kai Borre
GNSS and Positioning for the Future - Kai BorreGNSS and Positioning for the Future - Kai Borre
GNSS and Positioning for the Future - Kai Borre
 
Presentation for the 19th EUROSTAR Users Conference June 2011
Presentation for the 19th EUROSTAR Users Conference June 2011Presentation for the 19th EUROSTAR Users Conference June 2011
Presentation for the 19th EUROSTAR Users Conference June 2011
 
Dsbr
DsbrDsbr
Dsbr
 
Flight Dynamics Software Presentation Part II Version 7
Flight Dynamics Software Presentation Part II Version 7Flight Dynamics Software Presentation Part II Version 7
Flight Dynamics Software Presentation Part II Version 7
 
Unit 4 DGPS
Unit 4 DGPSUnit 4 DGPS
Unit 4 DGPS
 
Navigation Position: Sea Scout Ship 378
Navigation Position: Sea Scout Ship 378Navigation Position: Sea Scout Ship 378
Navigation Position: Sea Scout Ship 378
 
Innovative, Non-Classical Optical Performance Verification Methodology
Innovative, Non-Classical Optical Performance Verification MethodologyInnovative, Non-Classical Optical Performance Verification Methodology
Innovative, Non-Classical Optical Performance Verification Methodology
 
Thailand Earth Observation System sattellite
Thailand Earth Observation System sattelliteThailand Earth Observation System sattellite
Thailand Earth Observation System sattellite
 
Mission Planning and Execution for the Unmanned Rotorcraft ARTIS
Mission Planning and Execution for the Unmanned Rotorcraft ARTISMission Planning and Execution for the Unmanned Rotorcraft ARTIS
Mission Planning and Execution for the Unmanned Rotorcraft ARTIS
 
Gps
GpsGps
Gps
 
Presentation for the 21th EUROSTAR Users Conference - June 2013
Presentation for the 21th EUROSTAR Users Conference - June 2013 Presentation for the 21th EUROSTAR Users Conference - June 2013
Presentation for the 21th EUROSTAR Users Conference - June 2013
 
Presentation for the 16th EUROSTAR Users Conference June 2008
Presentation for the 16th EUROSTAR Users Conference June 2008Presentation for the 16th EUROSTAR Users Conference June 2008
Presentation for the 16th EUROSTAR Users Conference June 2008
 
Gps Technology
Gps TechnologyGps Technology
Gps Technology
 
Global positioning system 1
Global positioning system  1Global positioning system  1
Global positioning system 1
 
Gps03
Gps03Gps03
Gps03
 

Destacado (8)

Task 1
Task 1Task 1
Task 1
 
Media consumption
Media consumptionMedia consumption
Media consumption
 
Task 1.3
Task 1.3Task 1.3
Task 1.3
 
Charliere
CharliereCharliere
Charliere
 
Survey analysis
Survey analysisSurvey analysis
Survey analysis
 
Powerpoint bideoarekin
Powerpoint bideoarekinPowerpoint bideoarekin
Powerpoint bideoarekin
 
Convergence & synergies
Convergence & synergiesConvergence & synergies
Convergence & synergies
 
Radio drama presentation
Radio drama presentationRadio drama presentation
Radio drama presentation
 

Similar a I os developers_meetup_4_sessionon_locationservices

Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...Chris Adamson
 
iBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awarenessiBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awarenessStefano Zanetti
 
Opensource gis development - part 2
Opensource gis development - part 2Opensource gis development - part 2
Opensource gis development - part 2Andrea Antonello
 
devjam2018 - angular 5 performance
devjam2018  - angular 5 performancedevjam2018  - angular 5 performance
devjam2018 - angular 5 performanceElad Hirsch
 
MBLTDev: Phillip Connaughton, RunKepper
MBLTDev: Phillip Connaughton, RunKepper MBLTDev: Phillip Connaughton, RunKepper
MBLTDev: Phillip Connaughton, RunKepper e-Legion
 
Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...Texas Natural Resources Information System
 
SwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple MapSwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple MapHsiaoShan Chang
 
Presentation on progress report of final year project(gps
Presentation on progress report of final year project(gpsPresentation on progress report of final year project(gps
Presentation on progress report of final year project(gpsWasim Akram
 
Autonomous underwater vehicle positioning system(Project IEEE)
Autonomous underwater vehicle positioning system(Project IEEE)Autonomous underwater vehicle positioning system(Project IEEE)
Autonomous underwater vehicle positioning system(Project IEEE)Raghavendra Kumar Yadav
 
Computer Science Presentation for various MATLAB toolboxes
Computer Science Presentation for various MATLAB toolboxesComputer Science Presentation for various MATLAB toolboxes
Computer Science Presentation for various MATLAB toolboxesThinHunh47
 
Keeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in DepthKeeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in DepthGeoffrey Goetz
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksJinTaek Seo
 

Similar a I os developers_meetup_4_sessionon_locationservices (20)

Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
 
iBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awarenessiBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awareness
 
QGIS training class 3
QGIS training class 3QGIS training class 3
QGIS training class 3
 
Opensource gis development - part 2
Opensource gis development - part 2Opensource gis development - part 2
Opensource gis development - part 2
 
MSI UI Software Design Report
MSI UI Software Design ReportMSI UI Software Design Report
MSI UI Software Design Report
 
devjam2018 - angular 5 performance
devjam2018  - angular 5 performancedevjam2018  - angular 5 performance
devjam2018 - angular 5 performance
 
MBLTDev: Phillip Connaughton, RunKepper
MBLTDev: Phillip Connaughton, RunKepper MBLTDev: Phillip Connaughton, RunKepper
MBLTDev: Phillip Connaughton, RunKepper
 
Iphone course 2
Iphone course 2Iphone course 2
Iphone course 2
 
Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...
 
report
reportreport
report
 
Paper
PaperPaper
Paper
 
SwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple MapSwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple Map
 
Presentation on progress report of final year project(gps
Presentation on progress report of final year project(gpsPresentation on progress report of final year project(gps
Presentation on progress report of final year project(gps
 
Autonomous underwater vehicle positioning system(Project IEEE)
Autonomous underwater vehicle positioning system(Project IEEE)Autonomous underwater vehicle positioning system(Project IEEE)
Autonomous underwater vehicle positioning system(Project IEEE)
 
Computer Science Presentation for various MATLAB toolboxes
Computer Science Presentation for various MATLAB toolboxesComputer Science Presentation for various MATLAB toolboxes
Computer Science Presentation for various MATLAB toolboxes
 
Using iBeacons in Titanium
Using iBeacons in TitaniumUsing iBeacons in Titanium
Using iBeacons in Titanium
 
Keeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in DepthKeeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in Depth
 
Coding matlab
Coding matlabCoding matlab
Coding matlab
 
Coding matlab
Coding matlabCoding matlab
Coding matlab
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
 

Último

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

I os developers_meetup_4_sessionon_locationservices

  • 1. Presenta(on  On   GPS,  Map-­‐kit,  Core-­‐Loca(on  and   Region  Monitoring,  Geo-­‐fencing    
  • 2. Presented  By   Syed  Mahboob  Nur     iOS  Developer       Blog:   hEp://mahboobiosdeveloper.blogspot.com/   Fb  Profile:   hEps://www.facebook.com/mahboob.nur      
  • 3. GPS     The  Global  Posi(oning  System  (GPS)  is  a  satellite-­‐based  naviga(on  system   made  up  of  a  network  of  24  satellites  placed  into  orbit  by  the  U.S.    Department  of  Defense.  GPS  was  originally  intended  for  military  applica(ons,   but  in  the  1980s,  the  government  made  the  system  available  for  civilian  use.    GPS  works  in  any  weather  condi(ons,  anywhere  in  the  world,  24  hours  a  day.   There  are  no  subscrip(on  fees  or  setup  charges  to  use  GPS.  
  • 4. Map  View     A  map  view  contains  a  flaEened  representa(on     of  a  spherical  object,  namely  the  Earth.    In  order  to  use  maps  effec(vely,  you  need  to    understand  a  liEle  bit  about  how  to  specify  points    in  a  map  view,  and  how  those  points  translate  to  points    on  the  Earth’s  surface.  Understanding  map  coordinate    systems  is  especially    important  if  you  plan  to  place  custom  content,  such  as  overlays   ,  on  top  of  the  map.    
  • 6. Loca(on  Monitoring     Systems   •  Core  Loca(on     •  Region  Monitoring   •  Geo  Fencing   •  I  Beacon     And  so  on    
  • 7. Core  Loca(on   •  The  Core  Loca(on  framework  lets  you  determine  the  current  loca(on  or   heading  associated  with  a  device.  The  framework  uses  the  available   hardware  to  determine  the  user’s  posi(on  and  heading.  You  use  the   classes  and  protocols  in  this  framework  to  configure  and  schedule  the   delivery  of  loca(on  and  heading  events.  You  can  also  use  it  to  define   geographic  regions  and  monitor  when  the  user  crosses  the  boundaries  of   those  regions.  In  iOS,  you  can  also  define  a  region  around  a  Bluetooth   beacon.  
  • 8. Core  Loca(on   Class  References   Protocol  References   Other  References   CLBeacon   CLBeaconRegion    CLCircularRegion   CLGeocoder   CLHeading   CLLoca9on   CLLoca9onManager   CLPlacemark   CLRegion   CLLLoca9onManagerDeleg ate   Core  Loca9on  Func9ons   Core  Loca9on  Data  Types   Core  Loca9on  Constants        
  • 9. Ini(alize  Loca(on     Manager   -­‐  (void)startStandardUpdates   {        if  (nil  ==  loca9onManager)      {                loca9onManager  =  [[CLLoca9onManager  alloc]  init];    loca9onManager.delegate  =  self;                loca9onManager.desiredAccuracy  =  kCLLoca9onAccuracyKilometer;    events.  loca9onManager.distanceFilter  =  500                [loca9onManager  startUpda9ngLoca9on];    }   }  
  • 10. Ac9vate  GPS  Using    CoreLoca9on  Loca9on  Manager         If(!  loca(onManager)   {        [loca(onManager  setDelegate:self];      [loca(onManager  startUpda(ngLoca(on];      [loca(onManager      startMonitoringSignificantLoca(onChanges];          [loca(onManager  startUpda(ngHeading];   }        
  • 11. Core  Loca(on    Code     -­‐  (void)loca9onManager:(CLLoca9onManager  *)manager   didUpdateLoca9ons:(NSArray  *)loca9ons    {                  NSLog(@"la9tude  %+.6f,  longitude  %+.6fn",              loca9on.coordinate.la9tude,  loca9on.coord  inate.longitude);              }    
  • 12. Problems  of     Ac(vate  GPS  all  the  (me   •  Huge  BaEery  Consump(on      
  • 13. Loca(on     Monitoring  System  that    saves  BaEery  Life   •  Region  Monitoring   •  Geo  Fencing      
  • 14. Region  Monitoring       Region  monitoring  lets  you  monitor  boundary   crossings  for  defined  geographical  regions  and   Bluetooth  low  energy  beacon  regions.  (iOS  4.0   and  later.)  
  • 15. Steps  of  implemen(ng     Region  Monitoring   •  Declare  and  Ini(alize  a  MKCoordinateRegion   •  Declare  and  Ini(alize  a  CLCircularRegion   •  Draw  a  circular  Geofence  around  the  current   loca(on  of  the  user.   •  Start  monitoring  region  un(l  user  exit  the   region     •  When  user  exit  the  region  draw  a  Circular   Geofence  and  start  monitoring  for  the  new   region.  
  • 16. Important  Codes  for     implemen(ng     Region  Monitoring   •  MKCoordinateRegion   –  A  structure  that  defines  which  por(on  of  the  map  to  display.      MKCoordinateRegion  region;            region.center.la(tude  =            loca(onManager.loca(on.coordinate.la(tude;            region.center.longitude  =        loca(onManager.loca(on.coordinate.la(tude;                      region.span.la(tudeDelta  =  SPAN_VALUE;            region.span.longitudeDelta  =  SPAN_VALUE;            [self.mapView  setRegion:region  animated:YES];    
  • 17. Important  Codes  for     implemen(ng     Region  Monitoring   CLCircularRegion  :    The  CLCircularRegion  class  defines  the  loca(on  and   boundaries  for  a  circular  geographic  region.  You  can  use   instances  of  this  class  to  define  geo  fences  for  a  specific   loca(on.  The  crossing  of  a  geo  fence’s  boundary  causes   the  loca(on  manager  to  no(fy  its  delegate     CLCircularRegion  *myRegion=[[CLCircularRegion   alloc]initWithCenter:region.center  radius:10   iden(fier:@"myRegion"];          [loca(onManager   startMonitoringForRegion:myRegion];    
  • 18. Important  Codes  for     implemen(ng     Region  Monitoring   •  Draw  a  circular  geofence:          MKCircle  *circle  =  [MKCircle      circleWithCenterCoordinate:region.center      radius:100];    [self.mapView  addOverlay:circle];  
  • 19. Important  Codes  for     implemen(ng     Region  Monitoring   •  Delegate  method  to  make  Circular  Overlay  Colorful          -­‐(MKOverlayView  *)  mapView:(MKMapView  *)mapView    viewForOverlay:(id<MKOverlay>)overlay    {            MKCircleView  *circleView  =  [[MKCircleView  alloc]      initWithCircle:overlay];            circleView.fillColor  =  [[UIColor  redColor]          colorWithAlphaComponent:0.1];            circleView.strokeColor  =  [[UIColor  blueColor]      colorWithAlphaComponent:1.0];            circleView.lineWidth  =  1;            return  circleView;    }      
  • 20. •    Important  Codes  for     implemen(ng     Region  Monitoring   Determine  when  user  enters  and  exits  region    -­‐  (void)loca9onManager:(CLLoca9onManager  *)manager  didEnterRegion:(CLRegion  *)region    {              UIAlertView  *alert  =  [[UIAlertView  alloc]initWithTitle:@""   message:@"didEnterRegion"  delegate:nil  cancelBubonTitle:@"OK"  otherBubonTitles:nil,  nil];              [alert  show];              NSLog(@"didEnterRegion");    }    -­‐  (void)loca9onManager:(CLLoca9onManager  *)manager  didExitRegion:(CLRegion  *)region    {              UIAlertView  *alert  =  [[UIAlertView  alloc]initWithTitle:@""   message:@"didExitRegion"  delegate:nil  cancelBubonTitle:@"OK"  otherBubonTitles:nil,  nil];              [alert  show];      }  
  • 21. Geofencing     •  A  geo-­‐fence  is  a  virtual  perimeter  for  a  real-­‐ world  geographic  areas.     •  A  geo-­‐fence  could  be  dynamically  generated— as  in  a  radius  around  a  store  or  point  loca(on.   Or  a  geo-­‐fence  can  be  a  predefined  set  of   boundaries,  like  school  aEendance  zones  or   neighborhood  boundaries.  Custom-­‐digi(zed   geofences  are  also  in  use.      
  • 23. iBeacon   •  iBeacon   is   an   indoor   posi(oning   system   that   Apple   Inc   calls   "a   new   class   of   low-­‐powered,   low-­‐cost   transmiEers   that   can   no(fy   nearby   iOS  7  devices  of  their  presence.     •  They   can   also   be   used   by   the   Android   opera(ng  system.[  The  technology  enables  an   iOS   device   or   other   hardware   to   send   push   no(fica(ons  to  iOS  devices  in  close  proximity.  
  • 25.   That’s  all  for  Today