angular - IONIC 2 PLATFORM. IONIC CANT GET GPS COORDINATES FROM IOS -


i creating ionic application ionic 2 both android , ios, developing application in windows , have checked android device. android working fine when copied files mac , tried test on ios emulator eveything worked fine except accessing geolocation plugin. works in browser on android device. bellow code used access gps

this.geolocation.getcurrentposition().then((position) => {           var pyrmont = {             lat: position.coords.latitude,             lng: position.coords.longitude         };          this.map = new google.maps.map(document.getelementbyid('map'), {             center: pyrmont,             zoom: 14         });          var image = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png';         var beachmarker = new google.maps.marker({             position: {                 lat: position.coords.latitude,                 lng: position.coords.longitude             },             map: this.map,             icon: image         });           this.infowindow = new google.maps.infowindow();         var service = new google.maps.places.placesservice(this.map);         service.nearbysearch({             location: pyrmont,             radius: 800,             type: this.place         }, (results, status) => {             if (status === google.maps.places.placesservicestatus.ok) {                 (var = 0; < results.length; i++) {                        this.createmarker(results[i]);                  }             }         });      }); 

i tired figure out causes problem , thing came mind when installed gealocation plugin have added android platform. can cause kind of problem. added ios platform when copied mac. please me


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -