I used this link enter link description herefor shown Google map but always he asks me of activated for the GPS .
My objective is: posted(Shown)the map without activated the GPS
after he shows my position
my controller :
facebookExample.controller('carteController', function($scope,$ionicPopup,$ionicLoading,$location,$cordovaGeolocation,$compile,$http) {
$scope.init = function() {
var options = {timeout: 10000, enableHighAccuracy: true};
$cordovaGeolocation.getCurrentPosition(options).then(function(position){
var latLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
console.log("langitude et latitude obtenu par google maps");
console.log(latLng);
var mapOptions = {
center: latLng,
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
$scope.map = new google.maps.Map(document.getElementById("map"), mapOptions);
google.maps.event.addListenerOnce($scope.map, 'idle', function(){
var marker = new google.maps.Marker({
map: $scope.map,
animation: google.maps.Animation.DROP,
position: latLng
});
var infoWindow = new google.maps.InfoWindow({
content: "Here I am!"
});
google.maps.event.addListener(marker, 'click', function () {
infoWindow.open($scope.map, marker);
});
console.log(status);
please help me ,how to chnage my controller to reach my goal