portree_kid 2020-07-01 22:03:23 +02:00
parent af4d3b7143
commit 7a75e4f392
4 changed files with 6 additions and 7 deletions

View File

@ -865,7 +865,7 @@ You should have received a copy of the GNU General Public License along with FG
}); });
} }
this.$store.dispatch('setParking', circle.options.attributes); this.$store.dispatch('setParking', circle.options.attributes);
this.$store.dispatch('setParkingCoords', circle.getLatLng().lat.toFixed(5) + ' ' + circle.getLatLng().lng.toFixed(5)); this.$store.dispatch('setParkingCoords', circle.getLatLng().lat.toFixed(6) + ' ' + circle.getLatLng().lng.toFixed(6));
circle.select() circle.select()
addFeature(circle) addFeature(circle)
// console.log(this.groundnetLayerGroup) // console.log(this.groundnetLayerGroup)

View File

@ -230,9 +230,8 @@
if (newValue==='unknown') { if (newValue==='unknown') {
} }
if( newValue.match(/,/g).length === 3) { if( newValue.match(/,/g) !== null && newValue.match(/,/g).length === 3) {
newValue = newValue.replace(', ', ' ').replace(/,/g, '.').replace(' ', ', '); newValue = newValue.replace(', ', ' ').replace(/,/g, '.').replace(' ', ', ');
} }
this.$store.commit('SET_EDIT_PARKING_COORDS', newValue) this.$store.commit('SET_EDIT_PARKING_COORDS', newValue)
} }

View File

@ -131,7 +131,7 @@ L.ParkingSpot = L.Circle.extend({
}, },
select() { select() {
store.default.dispatch('setParking', this.options.attributes); store.default.dispatch('setParking', this.options.attributes);
store.default.dispatch('setParkingCoords', this.getLatLng().lat.toFixed(5) + ' ' + this.getLatLng().lng.toFixed(5)); store.default.dispatch('setParkingCoords', this.getLatLng().lat.toFixed(6) + ' ' + this.getLatLng().lng.toFixed(6));
var style = {}; var style = {};
style['color'] = 'red'; style['color'] = 'red';
this.setStyle(style); this.setStyle(style);
@ -174,7 +174,7 @@ L.ParkingSpot = L.Circle.extend({
this.on('editable:vertex:dragend', function (event) { this.on('editable:vertex:dragend', function (event) {
console.debug("DragEnd Parking : ", event); console.debug("DragEnd Parking : ", event);
store.default.dispatch('setParking', event.target.options.attributes); store.default.dispatch('setParking', event.target.options.attributes);
store.default.dispatch('setParkingCoords', event.target.getLatLng().lat.toFixed(5) + ' ' + event.target.getLatLng().lng.toFixed(5)); store.default.dispatch('setParkingCoords', event.target.getLatLng().lat.toFixed(6) + ' ' + event.target.getLatLng().lng.toFixed(6));
event.target.updateWheelPos(); event.target.updateWheelPos();
/* /*
store.default.dispatch('setParkingHeading', this.options.attributes.heading) store.default.dispatch('setParkingHeading', this.options.attributes.heading)
@ -230,7 +230,7 @@ L.ParkingSpot = L.Circle.extend({
} }
store.default.dispatch('setParking', this.options.attributes); store.default.dispatch('setParking', this.options.attributes);
store.default.dispatch('setParkingCoords', this.getLatLng().lat.toFixed(5) + ' ' + this.getLatLng().lng.toFixed(5)); store.default.dispatch('setParkingCoords', this.getLatLng().lat.toFixed(6) + ' ' + this.getLatLng().lng.toFixed(6));
this.select(); this.select();
}, },

View File

@ -134,7 +134,7 @@ const actions = {
}, },
async setNode (context, node) { async setNode (context, node) {
context.commit('SET_EDIT_NODE', node.attributes) context.commit('SET_EDIT_NODE', node.attributes)
context.commit('SET_EDIT_NODE_COORDS', node.lat.toFixed(5) + ' ' + node.lng.toFixed(5)) context.commit('SET_EDIT_NODE_COORDS', node.lat.toFixed(6) + ' ' + node.lng.toFixed(6))
} }
} }