Bug in upload

This commit is contained in:
portree_kid 2020-05-24 22:50:29 +02:00
parent e3da808f5c
commit 9f381dea12

View File

@ -115,7 +115,7 @@
return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'type': o.holdPointType }; return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'type': o.holdPointType };
} else if (o instanceof L.Polyline) { } else if (o instanceof L.Polyline) {
console.log(o) console.log(o)
var latLngs = o.getLatLngs().map(l => ({lat: l.lat, lng: l.lng, index: l.__vertex.glueindex})); var latLngs = o.getLatLngs().map(l => ({lat: l.lat, lng: l.lng, index: l.attributes.index}));
return { 'start': Number(o['begin']), 'end': Number(o['end']), '_leaflet_id': o._leaflet_id, 'type': 'poly', 'isPushBackRoute': o.options.attributes.isPushBackRoute, latLngs: latLngs }; return { 'start': Number(o['begin']), 'end': Number(o['end']), '_leaflet_id': o._leaflet_id, 'type': 'poly', 'isPushBackRoute': o.options.attributes.isPushBackRoute, latLngs: latLngs };
} else { } else {
console.log('Unknown Type ') console.log('Unknown Type ')