Android: Geolocation: timeout error


Hi everybody,

Ok, this topic is opened again and again. But… I’m using leaflet. With this code:{
			setView: true,
			maxZoom: 10,
			timeout: 20000
		}).on('locationfound', (e) => {
			let markerGroup = leaflet.featureGroup();
		      let marker: any = leaflet.marker([e.latitude, e.longitude]).on('click', () => {
		        alert('Marker clicked');
		}).on('locationerror', (err) => {

I always obtain a timeout error. Permission are allowed on my Android for the position. I read a lot of topics about this problem with many many variations. One issue could be from Cordova and using Capacitor was the solution.

Someone have any idea without using Capacitor ?


<plugin name="cordova-plugin-geolocation" spec="^5.0.0">