title: i use the NG-cordova Geolocation plugin
body: <p>The Gps work fine and also the error event is caught great, BUT i want that if the user dont have the GPS enable so the GPS service confirmation pop up will shown and the user can click on the settings and redirect to the setting of the device</p>
  
  <pre><code>navigator.geolocation.getCurrentPosition(function(pos) {
                  map.setCenter(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude));
                 marker = new google.maps.Marker({
                      position: new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude),
                      icon:'http://maps.google.com/mapfiles/ms/icons/green-dot.png',
                      draggable:true,
                      map: map,
                      title: "My Location"
                  });
                 console.log(marker.getPosition().A);
                 console.log(marker.getPosition().F);
                  infoWindow.setContent('&lt;div&gt;&lt;strong&gt;'+ "You are here!!" + '&lt;/strong&gt;&lt;br&gt;');
           infoWindow.open(map, marker);
               },
               function onError(error){
                      $ionicPopup.alert({
                          title: "GPS is Disable Please Enable it.",
                          template: "Go to setting and turn it ON"
                      })
                      .then(function(result) {
                          if(result) {
                              cordova.plugins.diagnostic.switchToLocationSettings();
                             // ionic.Platform.exitApp();
                          }
                      });
               },{maximumAge:60000,timeout:3000,enableHighAccuracy:false});
  </code></pre>