Split Segments

pull/36/head
portree_kid 5 years ago
parent 381c631775
commit 707f8b1871

@ -0,0 +1,36 @@
/* eslint-disable */
var L = require('leaflet');
L.TaxiwaySegment = L.Polyline.extend({
options: {
id: 'Custom data!',
attributes: {}
},
begin: String,
end: String,
bidirectional: Boolean,
updateBeginVertex : function (latlng) {
this._latlngs[0].__vertex.setLatLng(latlng);
},
updateEndVertex : function (latlng) {
this._latlngs[1].__vertex.setLatLng(latlng);
},
updateMiddle: function () {
this._latlngs.forEach(element => {
if(element.__vertex.middleMarker){
element.__vertex.middleMarker.updateLatLng();
}
});
},
updateStyle() {
var style = {};
if (this.options.attributes.isPushBackRoute) {
style.color = 'magenta';
}
this.setStyle(style);
}
});

@ -4,7 +4,8 @@ const path = require('path');
var xamel = require('xamel');
const convert = require('geo-coordinates-parser');
const markers = require('./markers');
const markers = require('./MagneticVertex');
const TaxiwaySegment = require('./TaxiwaySegment');
const parkingSpot = require('./ParkingSpot.js');

Loading…
Cancel
Save