@@ -290,81 +290,6 @@ L.DistortableCollection = L.FeatureGroup.extend({
290290 json . avg_cm_per_pixel = this . _getAvgCmPerPixel ( json . images ) ;
291291 return json ;
292292 } ,
293-
294- // generateExportJson(allImages = false) {
295- // const json = {};
296- // json.images = [];
297-
298- // this.eachLayer(function(layer) {
299- // if (allImages || this.isCollected(layer)) {
300- // const sections = layer._image.src.split('/');
301- // const filename = sections[sections.length - 1];
302- // const zc = layer.getCorners();
303-
304- // const corners = [
305- // {lat: zc[0].lat, lon: zc[0].lng},
306- // {lat: zc[1].lat, lon: zc[1].lng},
307- // {lat: zc[3].lat, lon: zc[3].lng},
308- // {lat: zc[2].lat, lon: zc[2].lng},
309- // ];
310-
311-
312- // json.images.push({
313- // id: layer._leaflet_id,
314- // src: layer._image.src,
315- // width: layer._image.width,
316- // height: layer._image.height,
317- // tooltipText: layer.getTooltipText(),
318- // image_file_name: filename,
319- // nodes: corners,
320- // cm_per_pixel: L.ImageUtil.getCmPerPixel(layer),
321- // });
322- // }
323- // }, this);
324-
325- // json.images = json.images.reverse();
326- // json.avg_cm_per_pixel = this._getAvgCmPerPixel(json.images);
327- // return json;
328- // },
329-
330- // OPTION 3
331- // generateExportJson(allImages = false) {
332- // const json = {};
333- // json.images = [];
334-
335- // this.eachLayer(function(layer) {
336- // if (allImages || this.isCollected(layer)) {
337- // let corners = [];
338- // const sections = layer._image.src.split('/');
339- // const filename = sections[sections.length - 1];
340- // const zc = layer.getCorners();
341-
342- // // supports longitude written as 'lon' or 'lng'
343- // for (i = 0; i < zc.length; i++) {
344- // if (zc[0].lng) {
345- // corners.push({lat: zc[i].lat, lon: zc[i].lng});
346- // } else if (zc[0].lon) {
347- // corners.push({lat: zc[i].lat, lon: zc[i].lon});
348- // }
349- // }
350-
351- // json.images.push({
352- // id: layer._leaflet_id,
353- // src: layer._image.src,
354- // width: layer._image.width,
355- // height: layer._image.height,
356- // tooltipText: layer.getTooltipText(),
357- // image_file_name: filename,
358- // nodes: corners,
359- // cm_per_pixel: L.ImageUtil.getCmPerPixel(layer),
360- // });
361- // }
362- // }, this);
363-
364- // json.images = json.images.reverse();
365- // json.avg_cm_per_pixel = this._getAvgCmPerPixel(json.images);
366- // return json;
367- // },
368293} ) ;
369294
370295L . distortableCollection = function ( id , options ) {
0 commit comments