Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> HTML

HTML5 geolocation 'permission denied' error ใน Mobile Safari


เมื่อสร้าง mobile website และมีความต้องการขอตำแหน่งปัจจุบันของผู้ใช้เมื่อคลิกปุ่ม ใช้ HTML5 geolocation ทำงานได้ดีใน mobile Chrome

แต่ใน Mobile Safari ผู้ใช้ถูก prompt ให้แชร์ location และเบราว์เซอร์ default ไป geolocation แล้ว browser default ไป Permission denied error

เพื่อแก้ไข ให้เปิด Geolocation services ใน mobile services เพื่อรับตำแหน่งปัจจุบันของผู้ใช้ที่ร้องขอ