Free Reverse Geocoding Javascript API Client

Welcome to our Javascript API Client for interacting with our Free Client-side Reverse Geocoding API!

For web applications, mobile application containers, e-commerce, CMS and standard websites, our Javascript API allows you to perform API actions on the front end, without any server-side interaction required.

This client operates independently of any JavaScript dependencies and does not require an API key or account credentials.

View source and usage instructions >

Installation

CDN Location
https://cdn.jsdelivr.net/gh/bigdatacloudapi/js-reverse-geocode-client@latest/bigdatacloud_reverse_geocode.min.js

Example usage

	
<script src="https://cdn.jsdelivr.net/gh/bigdatacloudapi/js-reverse-geocode-client@latest/bigdatacloud_reverse_geocode.min.js" type="text/javascript"></script>
<script type="text/javascript">
	  /* 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) {
        console.log(result);
    });

    /* Get the administrative location information using a set of known coordinates */
    reverseGeocoder.getClientLocation({
        latitude: -33.8688,
        longitude: 151.2093,
    },function(result) {
        console.log(result);
    });

    /* You can also set the locality language as needed */
    reverseGeocoder.localityLanguage='es';

    /* Request the current user's coordinates (requires HTTPS and acceptance of prompt) */
    reverseGeocoder.getClientCoordinates(function(result) {
        console.log(result);
    });
</script>

Contact support

If you have any further queries, feel free to contact our email support on our contact us page .


Topics

Was this page helpful?