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() {