public void applyGPSSetting() {
        // verify if GPS enable on device
        if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
            GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
            Boolean showGPSLocation = gpsSettingController.getGPSLocationState();
            Boolean showGPSLocationOnCenter = gpsSettingController.getGPSCenterState();
            if (showGPSLocation != null)
                if (showGPSLocation) {
                    MainActivity mainActivity = (MainActivity) context;
                    GPSOverlayController gpsOverlayController = mainActivity.getMainController().getGpsOverlayController();
                    gpsOverlayController.addGPSTrackerLayer();
                    gpsOverlayController.setKeepOnCenter( ((showGPSLocationOnCenter != null)?(showGPSLocationOnCenter):(false)) );
                }
        }else {
            // TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar?
        }
    }
public void applyGPSSetting() {
       
        if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
            GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
            Boolean showGPSLocation = gpsSettingController.getGPSLocationState();
            Boolean showGPSLocationOnCenter = gpsSettingController.getGPSCenterState();
            if (showGPSLocation != null)
                if (showGPSLocation) {
                    MainActivity mainActivity = (MainActivity) context;
                    GPSOverlayController gpsOverlayController = mainActivity.getMainController().getGpsOverlayController();
                    gpsOverlayController.addGPSTrackerLayer();
                    gpsOverlayController.setKeepOnCenter( ((showGPSLocationOnCenter != null)?(showGPSLocationOnCenter):(false)) );
                }
        }else {
           
        }
    }
public void applygpssetting() { if(gpsservice.isgpsproviderenable(context) || gpsservice.isnetworkproviderenable(context)) { gpssettingcontroller gpssettingcontroller = new gpssettingcontroller(mmapview.getcontext()); boolean showgpslocation = gpssettingcontroller.getgpslocationstate(); boolean showgpslocationoncenter = gpssettingcontroller.getgpscenterstate(); if (showgpslocation != null) if (showgpslocation) { mainactivity mainactivity = (mainactivity) context; gpsoverlaycontroller gpsoverlaycontroller = mainactivity.getmaincontroller().getgpsoverlaycontroller(); gpsoverlaycontroller.addgpstrackerlayer(); gpsoverlaycontroller.setkeeponcenter( ((showgpslocationoncenter != null)?(showgpslocationoncenter):(false)) ); } }else { } }