javascript - geolocation not working in chrome -


i have used following script in mozilla , chrome browser. in mozilla, asking whether share location. in chrome not displaying anything.

<script> var x = document.getelementbyid("demo"); function getlocation() { if (navigator.geolocation) {     navigator.geolocation.getcurrentposition(showposition); } else {     x.innerhtml = "geolocation not supported browser."; } } function showposition(position) { x.innerhtml = "latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude; } </script> 

do use chrome50 ? removed geolocation support non https sites.

https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -