Prediction Object

pointNG methods return a prediction-object. Here is a specification of the available data fields.

Here are the data fields in the prediction object that is a Promise returned by pointNG methods. All values are a type of String.

prediction.continent // Name of the continent. Eg. "Europe"
prediction.sub_region // Name of the sub region of the continent. Eg. "Northern Europe"
prediction.country // Name of the country. Eg. "Finland"
prediction.iso2 // ISO2 code of the country. Eg. "FI"
prediction.iso3 // ISO3 code of the country. Eg. "FIN"
prediction.capital // Name of the capital. Eg. "Helsinki"
prediction.currency // Local currency. Eg. "EUR"
prediction.phone_code // Local phone prefix. Eg. "358"
prediction.state // Name of the state. Eg. "Uusimaa"
prediction.city // Name of the city. Eg. "Helsinki"

You can also access the location data by using pointng-object's predictionData property

pointng.predictionData.sub_region // Name of the sub region of the continent. Eg. "Northern Europe"
pointng.predictionData.country // Name of the country. Eg. "Finland"
pointng.predictionData.iso2 // ISO2 code of the country. Eg. "FI"
pointng.predictionData.iso3 // ISO3 code of the country. Eg. "FIN"
pointng.predictionData.capital // Name of the capital. Eg. "Helsinki"
pointng.predictionData.currency // Local currency. Eg. "EUR"
pointng.predictionData.phone_code // Local phone prefix. Eg. "358"
pointng.predictionData.state // Name of the state. Eg. "Uusimaa"
pointng.predictionData.city // Name of the city. Eg. "Helsinki"