dati 3 campi input (indirizzo,città,nazione)
nell’evento onclick di un pulsante devo
-assegnare il valore della latitudine ad un campo input
-assegnare il valore della longitudine ad un campo input
It is currently 7 June 2025, 17:36 Advanced search
App.SelectTargetLocationFrm.prototype.getPosFromAddress = function(address)
{
if (address)
{
var u = app.fs.url("https://maps.googleapis.com/maps/api/geocode/json?address=" + address + "&" + app.theme.gmapKey);
var res = yield u.get();
if (res.status === 200)
{
results = res.body;
var obj = JSON.parse(results);
if (obj.results[0].geometry) {
var geometry = obj.results[0].geometry;
var location = geometry.location;
return location;
}
}
return null;
} else return null;
return null;
};
Return to Tips & Tricks - Cloud
Users browsing this forum: No registered users and 5 guests