我有一个创世纪的json文件,我需要从文件路径中读取它,并需要更新字段值“ alloc”值并保存到现有文件中,需要一些建议
var vehiculeHorsZone = false;
var promise = new Promise((resolve, reject) => {
$.ajax({url:"/flotte/getVehicules",
type:"post",
success:function(data, status, xhr) {
resolve(data);
},
error:function(xhr, status, error) {
reject(error);
}});
});
promise.then((data) => {
...
vehiculeHorsZone = google.maps.geometry.poly.containsLocation(someLatLng, somePolygone);
console.log("---- from promise , vehiculeHorsZone = ",vehiculeHorsZone);
});
console.log("---- after promise , vehiculeHorsZone = ",vehiculeHorsZone);