Geolocation.getCurrentPosition: Timeout expired <p>I am using Ionic2.</p> <p>I am using the following code, but get an error:</p> <pre><code>import { Geolocation } from 'ionic-native'; public getPosition(): void { if (this.markers &amp;&amp; this.markers.length &gt; 0) { var marker: google.maps.Marker = this.markers[0]; // only one this.latitude = marker.getPosition().lat(); this.longitude = marker.getPosition().lng(); this.getJobRangeSearch(this.searchQuery); } else { let options = { timeout: 10000, enableHighAccuracy: true }; Geolocation.getCurrentPosition(options).then((position) =&gt; { this.latitude = position.coords.latitude; this.longitude = position.coords.longitude; this.getJobRangeSearch(this.searchQuery); }).catch((error) =&gt; { console.log(error); this.doAlert(error+' Timeout trying to get your devices Location'); }); } } </code></pre> <p><strong>error:</strong></p> <blockquote> <p>PositionError {message: "Timeout expired", code: 3, PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3}</p> </blockquote> <p><strong>package.json</strong></p> <pre><code>"ionic-native": "^1.3.2", </code></pre> <p>Thank you</p>