From e122bbbb08ee7847943e5380a9197a4fb210cd8c Mon Sep 17 00:00:00 2001 From: portree_kid Date: Fri, 19 Jun 2020 21:03:46 +0200 Subject: [PATCH] Bug with FrontWheel pos --- src/renderer/loaders/ParkingSpot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/loaders/ParkingSpot.js b/src/renderer/loaders/ParkingSpot.js index 855c1c5..d6f35a0 100644 --- a/src/renderer/loaders/ParkingSpot.js +++ b/src/renderer/loaders/ParkingSpot.js @@ -113,7 +113,9 @@ L.ParkingSpot = L.Circle.extend({ if (parkingSize>=0) { var frontWheelEnd = turf.destination([start.lng, start.lat], validN2M[parkingSize] / 1000, this.options.attributes.heading, options); - this.frontWheel.setLatLng(this.turfToLatLng(frontWheelEnd)); + if(this.frontWheel!==undefined) { + this.frontWheel.setLatLng(this.turfToLatLng(frontWheelEnd)); + } } }, select() {