I created an app that will display the map and the location of the external GPS device. The scenario is using a wifly module to broadcast the GPS data of the GPS receiver in wifi. The app is now receiving the data from the wifly module.

How do i force ArcGIS to use the data from the wifly module?

I am using the AGSLocationDisplay of ArcGIS iOS but its using the data from the CLLocation.

  • 1
    You are not going to find a simple switch to enable this, you will need to use the ArcGIS API for IOS to access the other device via network connection (wifi in your case) to get to the exposed interface. It sounds like you have done the hardest part already, getting the devices to talk, you just will need to create a new interface to read that input.
    – D.E.Wright
    Apr 8, 2013 at 20:55
  • Thanks for the reply D.E Wright. I just dont know where to start. I was actually planning to not use the ArcGIS location display and probably just create a point from the coordinates retrieved from the wifly dongle.
    – Juno
    Apr 8, 2013 at 22:05

1 Answer 1


With the 10.1.1 version of ArcGIS SDK you can replace the AGSLocationDisplay object's data source that AGSMapView uses with your own location data source. You don't have to rely on CLLocationManager as a GPS data source. You'll be able to get GPS location data from anywhere you want.

First, create an object that conforms to the AGSLocationDisplayDataSource protocol (defined here.) This object will need to get data from your wifly module (how I don't know) and return it when called. It needs to conform to the AGSLocationDisplayDataSource protocol:

@interface WiflyDataSource <AGSLocationDisplayDataSource> : NSObject

Second, on your AGSMapView object (let's call it mapView), there is a property called locationDisplay, it has a property called dataSource. Set dataSource with your object, like this:

WiflyDataSource* wiflyDataSource = [WiflyDataSource alloc] initWith...];  
mapView.locationDisplay.dataSource = wiflyDataSource;

Now the mapView will get location updates from your data source instead of the default one which uses CLLocationManager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.