HTML Question

HTML5 Geolocation KCLError Domain error

I am working on one site that uses HTML5 Geolocation.
Here is code i am using


<button onclick="getLocation()">Try It</button>


function getLocation() {
if (navigator.geolocation) {
} else {
console.log('Geolocation is not supported by this browser.');

function showPosition(position) {

Evething seem to works fine, but some users get
KCLError Domain error
and here are theri comments:

  • This happens regardless of browser - Safari and Chrome both affected(tablet).

  • Presumably the error occurred internally and isn't displayed on the screen.

  • When user press 'button' it shows the error and fails.

Error itself

I did not found any solution or reasons related to web of this error. So any help will be much appropriated

Answer Source
  • So the KCLError Domain error error was not retated to html5 geolocation code but to users GSM triangulation, reverse IP geolocation or WiFi network database lookups.
  • I was confused by this error because it was not self explanatory and here is where I made a mistake, this error is not strict error code it just additional error message and the error code was error.POSITION_UNAVAILABLE and this code is well known.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download