diff --git a/src/views/feature/Feature_edit.vue b/src/views/feature/Feature_edit.vue index 93afdda59e666c35dedf755723cc92f04ba2b5e3..900bb1b03d4ab98bbaaa8ad3a7caaa25372e4b93 100644 --- a/src/views/feature/Feature_edit.vue +++ b/src/views/feature/Feature_edit.vue @@ -430,12 +430,30 @@ export default { "Content-Type": "multipart/form-data", }, }) - .then(function () { - console.log("SUCCESS!!"); + .then(function (response) { + 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!!"); - self.erreurUploadMessage = "FAILURE!!"; + self.erreurUploadMessage = response.data.message; }); },