Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

navigator.geolocation.getCurrentPosition not allowed on "file:///C:/" based access [duplicate]

Possible Duplicate:
HTML 5 Geo Location Prompt in Chrome

I've been looking at geolocation in Html 5. I'm using Chrome (12) and am accessing the html file using a path like this: file:///C:/_Development/Examples/Html5/boilerplate.html

I'm getting the little geolocation icon in the search bar that says that the location has been blocked from tracking your location.

Note that I don't have any exceptions setup at all...

Can this be done or do I need to host the file on a web server? If it can't be done, why can't it be done?

Thanks

like image 722
jwwishart Avatar asked Jun 13 '11 01:06

jwwishart


1 Answers

This is a duplicate of this question:

HTML 5 Geo Location Prompt in Chrome

It seems that chrome has security restrictions on accessing geolocation data locally. You need to host the file to use the data. A workaround with python is available in the previous question.

like image 91
Swift Avatar answered Nov 14 '22 23:11

Swift