ESRI ArcGIS 10.1.1 navigation on the map using the GPS device in IOS SKD

Source: Internet
Author: User

To achieve this, ESRI ArcGIS 10.1.1 uses the GPS device in ios skd to navigate the map.

References: http://gis.stackexchange.com/questions/57487/force-arcgis-ios-to-use-gps-data-from-external-gps-device

Example:
Http://www.arcgis.com/home/item.html? Id = 5e9fe50031f5461796b5d158a11d0bad

Steps:

  1. Define a mapview object.
    AGSMapView* _mapView;

  2. Use the locationdisplay Method

    [Self. mapview. locationdisplay addobserver: Self forkeypath: @ "navigationmode" Options :( nskeyvalueobservingoptionnew) Context: NULL]; self. mapview. locationdisplay. autopanmode
    = Agslocationdisplayautopanmodenavigation;

  3. Switch the location switch function
    -(Ibaction) locationbtnclicked :( ID) sender {nslog (@ "start locating"); If (! Self. mapview. locationdisplay. performancestarted) {[self. mapview. locationdisplay startdatasource]; self. mapview. locationdisplay. autopanmode = agslocationdisplayautopanmodedefault; // set a wander extent equal to 75% of the map's envelope // The map will re-center on the location symbol only when // The symbol moves out of the wander extent/ /self. mapview. locationdisplay. wandreextentfactor = 0.75;} else {[self. mapview. locationdisplay stopdatasource] ;}}

  4. Implementation and positioning Methods
    - (void)observeValueForKeyPath:(NSString *)keyPath  ofObject:(id)object                        change:(NSDictionary *)change                       context:(void *)context {}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.