Functions

pointNG has several functions that make building location based web personalization's easy and user-friendly. Get familiar with these function on this page.

1. Geolocation API method

Use this method to launch the native location permission popup in the browser and use pointNG to predict the location based on users' GPS coordinates securely

pointng.getLocation()
.then(function(prediction) {
console.log(prediction)
//Do your magic here with the predictions
})

2. Reverse Geocoding method

If you already have GPS data available, you can use this method to insert the latitude and longitude coordinates to pointNG and execute reverse geocoding directly on the browser.

pointng.latLonLocate(62.2443, 34.35435)
.then(function(prediction) {
console.log(prediction)
//Do your magic here with the predictions
})

3. pointNG widget

Use this function to add a pointNG widget to your website. You empower your users to determine the level (continent, country, state or city) they wish that your site uses their location data. You users can also choose when they want to give your site the location permission or update their current location.