Skip to content

Only Known Long/Lat reverse code working #1

@incidentally

Description

@incidentally

Hi There,

I tried to get the location ref. using the published code and using bigdatacloud_reverse_geocode.min.js

<script> /* Initialise Reverse Geocode API Client */ var reverseGeocoder = new BDCReverseGeocode(); /* Get the current user's location information, based on the coordinates provided by their browser */ /* Fetching coordinates requires the user to be accessing your page over HTTPS and to allow the location prompt. */ reverseGeocoder.getClientLocation(function(result) { document.getElementById("json-result").innerHTML = rresult.localityInfo['administrative'][4].name; }); /* Get the administrative location information using a set of known coordinates */ reverseGeocoder.getClientLocation({ latitude: 12.9716, longitude: 77.5946, }, function(result) { document.getElementById("json-result").innerHTML = result.localityInfo['administrative'][4].name; }); /* You can also set the locality language as needed */ reverseGeocoder.localityLanguage = 'en'; /* Request the current user's coordinates (requires HTTPS and acceptance of prompt) */ reverseGeocoder.getClientCoordinates(function(result) { document.getElementById("json-result").innerHTML = result.localityInfo['administrative'][4].name; }); /* document.getElementById("log").innerHTML = 5 + 6;*/ </script> 

This returns 'Bengaluru' which is correct.

But, during my testing (and located in New Delhi), it does not work even after 'accepting' the location permissions.

Could you check, to view please visit Incidental app and you could see the location below the yellow divider.
Screenshot 2021-06-13 at 10 35 18 AM

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions