@geoblocks/edittrack
Advanced tools
Comparing version 2.0.0-beta.6 to 2.0.0-beta.7
@@ -20,6 +20,5 @@ import { getDistance } from 'ol/sphere'; | ||
.transform(this.projection, 'EPSG:4326'); | ||
const coordinates = geometry.getCoordinates(); | ||
const coordinates_4326 = geometry_4326.getCoordinates(); | ||
for (let i = 0, ii = coordinates.length; i < ii; i++) { | ||
const coos = coordinates[i]; | ||
for (let i = 0, ii = coordinates_4326.length; i < ii; i++) { | ||
const coos = coordinates_4326[i]; | ||
const m = i === 0 ? 0 : getDistance(coordinates_4326[i - 1], coordinates_4326[i]); | ||
@@ -38,2 +37,2 @@ accDistance += m; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXh0cmFjdEZyb21TZWdtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Byb2ZpbGVyL0V4dHJhY3RGcm9tU2VnbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBU3hDLE1BQU0sQ0FBQyxPQUFPLE9BQU8sa0JBQWtCO0lBRTdCLFVBQVUsQ0FBaUI7SUFFbkMsWUFBWSxPQUEwQztRQUNwRCxJQUFJLENBQUMsVUFBVSxHQUFHLE9BQU8sQ0FBQyxVQUFVLENBQUM7SUFDdkMsQ0FBQztJQUVELGNBQWMsQ0FDWixPQUE0QjtRQUU1QixPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFO1lBQ3JDLE1BQU0sUUFBUSxHQUFHLE9BQU8sQ0FBQyxXQUFXLEVBQUUsQ0FBQztZQUN2QyxJQUFJLFFBQVEsQ0FBQyxTQUFTLEVBQUUsS0FBSyxNQUFNLEVBQUUsQ0FBQztnQkFDcEMsT0FBTyxDQUFDLEdBQUcsQ0FBQyx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UN6RCxDQUFDO2dCQUNELE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxDQUFDO2dCQUNoQyxPQUFPLEVBQUUsQ0FBQztZQUNaLENBQUM7aUJBQU0sQ0FBQztnQkFDTixNQUFNLEVBQUUsQ0FBQztZQUNYLENBQUM7UUFDSCxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FDRiJ9 |
@@ -33,4 +33,4 @@ import GeoJSONFormat from 'ol/format/GeoJSON.js'; | ||
// original coordinates. | ||
profile.at(0).splice(0, 2, ...geometry.getCoordinateAt(0)); | ||
profile.at(-1).splice(0, 2, ...geometry.getCoordinateAt(-1)); | ||
profile.with(0, profile.at(0).slice(0, 2, ...geometry.getCoordinateAt(0))); | ||
profile.with(-1, profile.at(-1).slice(0, 2, ...geometry.getCoordinateAt(-1))); | ||
segment.set('profile', profile); | ||
@@ -42,2 +42,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3dpc3N0b3BvUHJvZmlsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJvZmlsZXIvU3dpc3N0b3BvUHJvZmlsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxhQUFhLE1BQU0sc0JBQXNCLENBQUM7QUFDakQsT0FBTyxFQUFDLEdBQUcsSUFBSSxhQUFhLEVBQUUsU0FBUyxFQUFDLE1BQU0sWUFBWSxDQUFDO0FBcUIzRCxNQUFNLENBQUMsT0FBTyxPQUFPLGlCQUFpQjtJQUM1QixHQUFHLEdBQUcsc0RBQXNELENBQUM7SUFDN0QsVUFBVSxDQUFpQjtJQUMzQixhQUFhLENBQWdCO0lBRXJDLFlBQVksT0FBaUM7UUFDM0MsSUFBSSxDQUFDLFVBQVUsR0FBRyxPQUFPLENBQUMsVUFBVSxDQUFDO1FBRXJDLE9B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0-beta.6", | ||
"version": "2.0.0-beta.7", | ||
"description": "Geoblocks edittrack", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -33,7 +33,6 @@ import { getDistance } from 'ol/sphere'; | ||
const coordinates = geometry.getCoordinates(); | ||
const coordinates_4326 = geometry_4326.getCoordinates(); | ||
for (let i = 0, ii = coordinates.length; i < ii; i++) { | ||
const coos = coordinates[i]; | ||
for (let i = 0, ii = coordinates_4326.length; i < ii; i++) { | ||
const coos = coordinates_4326[i]; | ||
const m = i === 0 ? 0 : getDistance(coordinates_4326[i - 1], coordinates_4326[i]); | ||
@@ -40,0 +39,0 @@ accDistance += m; |
@@ -60,4 +60,4 @@ import GeoJSONFormat from 'ol/format/GeoJSON.js'; | ||
// original coordinates. | ||
profile.at(0).splice(0, 2, ...geometry.getCoordinateAt(0)); | ||
profile.at(-1).splice(0, 2, ...geometry.getCoordinateAt(-1)); | ||
profile.with(0, profile.at(0).slice(0, 2, ...geometry.getCoordinateAt(0))); | ||
profile.with(-1, profile.at(-1).slice(0, 2, ...geometry.getCoordinateAt(-1))); | ||
@@ -64,0 +64,0 @@ segment.set('profile', profile); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
260202
4004