<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic proper way of using agsgps ???? in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/proper-way-of-using-agsgps/m-p/704431#M6310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a gps button in my app which is used to toggle on/off the gps services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the following code to toggle gps services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The method below is called when the button is touched&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-(void) startGPS {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.mapView.gps.autoPan = YES ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if ((self.mapView.gps.enabled)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [self.mapView.gps stop];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [self.gpsButton setImage:[UIImage imageNamed:@"gps_off.png"] forState:UIControlStateNormal] ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else if(!(self.mapView.gps.enabled)) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; [self.mapView.gps start];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; [self.gpsButton setImage:[UIImage imageNamed:@"gps_on.png"] forState:UIControlStateNormal]&amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code works fine when location services are turned ON.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in iOS 4 , if location services are&lt;/SPAN&gt;&lt;STRONG&gt; turned off only for that particular app&lt;/STRONG&gt;&lt;SPAN&gt; keeping the global location settings ON then also my buttons are toggling to GPS ON state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone observed this problem ?? Is there a workaround for this. Ideally , I would like a sample code to use AGSGPS in a proper way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Harikant Jammi&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Oct 2010 08:25:46 GMT</pubDate>
    <dc:creator>HarikantJammi</dc:creator>
    <dc:date>2010-10-27T08:25:46Z</dc:date>
    <item>
      <title>proper way of using agsgps ????</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/proper-way-of-using-agsgps/m-p/704431#M6310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a gps button in my app which is used to toggle on/off the gps services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the following code to toggle gps services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The method below is called when the button is touched&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-(void) startGPS {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.mapView.gps.autoPan = YES ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if ((self.mapView.gps.enabled)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [self.mapView.gps stop];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [self.gpsButton setImage:[UIImage imageNamed:@"gps_off.png"] forState:UIControlStateNormal] ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else if(!(self.mapView.gps.enabled)) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; [self.mapView.gps start];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; [self.gpsButton setImage:[UIImage imageNamed:@"gps_on.png"] forState:UIControlStateNormal]&amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code works fine when location services are turned ON.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in iOS 4 , if location services are&lt;/SPAN&gt;&lt;STRONG&gt; turned off only for that particular app&lt;/STRONG&gt;&lt;SPAN&gt; keeping the global location settings ON then also my buttons are toggling to GPS ON state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone observed this problem ?? Is there a workaround for this. Ideally , I would like a sample code to use AGSGPS in a proper way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Harikant Jammi&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Oct 2010 08:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/proper-way-of-using-agsgps/m-p/704431#M6310</guid>
      <dc:creator>HarikantJammi</dc:creator>
      <dc:date>2010-10-27T08:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: proper way of using agsgps ????</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/proper-way-of-using-agsgps/m-p/704432#M6311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Harikant,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The self.mapView.gps.enabled property does not indicate whether location services are enabled/disabled for the application, or for that matter, the device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The property only indicates whether the map is using the location services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To find out whether location services are available for your app to use, you will need use the CoreLocation framework in iOS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Divesh&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(PS : Also take a look at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgismobile/10.0/apis/iPhone/concepts/00pw/00pw0000004q000000.htm"&gt;Displaying location on the map&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 15:26:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/proper-way-of-using-agsgps/m-p/704432#M6311</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2010-10-28T15:26:37Z</dc:date>
    </item>
  </channel>
</rss>

