フィーチャをテーブルに一括挿入しようとしています。これが私のjsonです
{"features":[{"type":"Feature","geometry":{"type":"Point","coordinates":["-80.358681","27.643045"]},"properties":{"gx_id":"84","address":"9037 Somerset Bay Lane, Vero Beach Port St. Lucie FL 32963","name":"x","phone":"x","email":"x","vehicle":"Cadillac ATS"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-81.819611","26.380350"]},"properties":{"gx_id":"85","address":"3951 Lakemont Drive, Bonita Springs Fort Meyers FL 34134","name":"x","phone":"x","email":"x","vehicle":"Toyota Highlander"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-82.677773","27.427950"]},"properties":{"gx_id":"86","address":"6809 Gulf Of Mexico Dr Longboat Key Sarasota FL 34228","name":"x","phone":"x","email":"x","vehicle":"Cadillac SRX"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-82.677773","27.427950"]},"properties":{"gx_id":"87","address":"6809 Gulf Of Mexico Dr Longboat Key, Sarasota FL 34228","name":"x","phone":"x","email":"x","vehicle":"Cadillac SRX"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-81.818977","26.590782"]},"properties":{"gx_id":"88","address":"10381 McArthur Palm Lane, Fort Myers Fort Meyers FL 33950","name":"x","phone":"x","email":"x","vehicle":"Infinity M35"}},{"type":"Feature","geometry":{"type":"Point","coordinates":["-81.972443","28.908287"]},"properties":{"gx_id":"89","address":"The Villages, Lake Sumter Landing, Lady Lake Orlando FL 32162","name":"x","phone":"x","email":"x","vehicle":"VW Bettle"}}]}
これが私のAjaxです
function sendBatch(tableID, data){
dataString = data;
console.log(dataString);
var url = "https://www.googleapis.com/mapsengine/v1/tables/"+tableID+"/features/batchInsert";
jQuery.ajax({
type: "POST",
url: url,
data: dataString,
contentType: 'application/json',
headers: {
'Authorization': 'Bearer ' + authResult.access_token
},
success: function(response) {
// Log the details of the Map.
console.log(response);
},
error: function(response) {
response = JSON.parse(response.responseText);
console.log("Error: ", response);
}
});
}
ここに私が得ているエラーがあります
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "The value is invalid.",
"locationType": "parameter",
"location": "id"
}
],
"code": 400,
"message": "The value is invalid."
}
}
機能を渡しているので、なぜ問題が発生しているのかわかりません。誰にも考えやアイデアはありますか?