Skip to content
Snippets Groups Projects
Commit 7ca4cdc2 authored by DESPRES Damien's avatar DESPRES Damien
Browse files

fix #11736

parent 38608143
No related branches found
No related tags found
No related merge requests found
...@@ -430,12 +430,30 @@ export default { ...@@ -430,12 +430,30 @@ export default {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
}) })
.then(function () { .then(function (response) {
console.log("SUCCESS!!"); console.log("SUCCESS!!",response.data);
if(response.data.geom.indexOf('POINT')>=0){
let regexp=/POINT\s\((.*)\s(.*)\)/;
var arr = regexp.exec(response.data.geom);
let json={ "type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [arr[1], arr[2]]
},
"properties": {
}
};
self.updateMap(self.map, json)
self.updateGeomField(json)
// Set Attachment
//self.addAttachment(self.file)
}
}) })
.catch(function () { .catch(function (response) {
console.log("FAILURE!!"); console.log("FAILURE!!");
self.erreurUploadMessage = "FAILURE!!"; self.erreurUploadMessage = response.data.message;
}); });
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment