Skip to content

Commit 08cf1f3

Browse files
committed
Website updates
1 parent ae26961 commit 08cf1f3

12 files changed

+138
-18
lines changed

dist/en/main/apidoc/module-ol_geom_MultiLineString-MultiLineString.html

+101-10
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<li data-name="getkeys"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getKeys">getKeys</a>
8686
<li data-name="getlastcoordinate"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLastCoordinate">getLastCoordinate</a>
8787
<li data-name="getlayout"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLayout">getLayout</a>
88+
<li data-name="getlength"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLength">getLength</a>
8889
<li data-name="getlinestring"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLineString">getLineString</a>
8990
<li data-name="getlinestrings"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLineStrings">getLineStrings</a>
9091
<li data-name="getproperties"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getProperties">getProperties</a>
@@ -173,7 +174,7 @@ <h4 class="name">
173174

174175
<div class="tag-source">
175176
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
176-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L24">line 24</a>
177+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L25">line 25</a>
177178
</div>
178179

179180
</div>
@@ -417,7 +418,7 @@ <h4 class="name">
417418

418419
<div class="tag-source">
419420
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
420-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L90">line 90</a>
421+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L91">line 91</a>
421422
</div>
422423

423424
</div>
@@ -758,7 +759,7 @@ <h4 class="name">
758759

759760
<div class="tag-source">
760761
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
761-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L102">line 102</a>
762+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L103">line 103</a>
762763
</div>
763764

764765
</div>
@@ -1291,7 +1292,7 @@ <h4 class="name">
12911292

12921293
<div class="tag-source">
12931294
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
1294-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L172">line 172</a>
1295+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L173">line 173</a>
12951296
</div>
12961297

12971298
</div>
@@ -1487,7 +1488,7 @@ <h4 class="name">
14871488

14881489
<div class="tag-source">
14891490
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
1490-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L198">line 198</a>
1491+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L199">line 199</a>
14911492
</div>
14921493

14931494
</div>
@@ -2068,6 +2069,96 @@ <h5>Returns:</h5>
20682069

20692070

20702071

2072+
<dt class="">
2073+
2074+
<div class="nameContainer">
2075+
<div class="anchor" id="getLength">
2076+
</div>
2077+
<h4 class="name">
2078+
getLength<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{number}</span>
2079+
2080+
2081+
2082+
</h4>
2083+
2084+
<div class="tag-source">
2085+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
2086+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L263">line 263</a>
2087+
</div>
2088+
2089+
</div>
2090+
2091+
2092+
</dt>
2093+
<dd class="">
2094+
2095+
2096+
2097+
2098+
<div class="description">
2099+
<p>Return the sum of all line string lengths</p>
2100+
</div>
2101+
2102+
2103+
2104+
2105+
2106+
2107+
2108+
2109+
2110+
2111+
2112+
<dl class="details">
2113+
2114+
2115+
2116+
2117+
2118+
2119+
2120+
2121+
2122+
2123+
2124+
2125+
2126+
2127+
2128+
2129+
2130+
2131+
2132+
2133+
2134+
</dl>
2135+
2136+
2137+
2138+
2139+
2140+
2141+
2142+
2143+
2144+
2145+
2146+
2147+
2148+
2149+
2150+
<h5>Returns:</h5>
2151+
Length (on projected plane).
2152+
<br />
2153+
2154+
2155+
2156+
2157+
</dd>
2158+
2159+
2160+
2161+
20712162
<dt class="">
20722163

20732164
<div class="nameContainer">
@@ -2082,7 +2173,7 @@ <h4 class="name">
20822173

20832174
<div class="tag-source">
20842175
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
2085-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L220">line 220</a>
2176+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L221">line 221</a>
20862177
</div>
20872178

20882179
</div>
@@ -2217,7 +2308,7 @@ <h4 class="name">
22172308

22182309
<div class="tag-source">
22192310
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
2220-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L238">line 238</a>
2311+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L239">line 239</a>
22212312
</div>
22222313

22232314
</div>
@@ -2492,7 +2583,7 @@ <h4 class="name">
24922583

24932584
<div class="tag-source">
24942585
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
2495-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L312">line 312</a>
2586+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L334">line 334</a>
24962587
</div>
24972588

24982589
</div>
@@ -2720,7 +2811,7 @@ <h4 class="name">
27202811

27212812
<div class="tag-source">
27222813
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
2723-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L323">line 323</a>
2814+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L345">line 345</a>
27242815
</div>
27252816

27262817
</div>
@@ -3701,7 +3792,7 @@ <h4 class="name">
37013792

37023793
<div class="tag-source">
37033794
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js">geom/MultiLineString.js</a>,
3704-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L340">line 340</a>
3795+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/geom/MultiLineString.js#L362">line 362</a>
37053796
</div>
37063797

37073798
</div>

dist/en/main/apidoc/navigation.tmpl.html

+1
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,7 @@
18361836
<li data-name="getkeys"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getKeys">getKeys</a>
18371837
<li data-name="getlastcoordinate"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLastCoordinate">getLastCoordinate</a>
18381838
<li data-name="getlayout"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLayout">getLayout</a>
1839+
<li data-name="getlength"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLength">getLength</a>
18391840
<li data-name="getlinestring"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLineString">getLineString</a>
18401841
<li data-name="getlinestrings"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getLineStrings">getLineStrings</a>
18411842
<li data-name="getproperties"><a href="module-ol_geom_MultiLineString-MultiLineString.html#getProperties">getProperties</a>

dist/en/main/examples/common.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/offscreen-canvas.worker.worker.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/offscreen-canvas.worker.worker.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/geom/MultiLineString.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ declare class MultiLineString extends SimpleGeometry {
8989
* @api
9090
*/
9191
getLineStrings(): Array<LineString>;
92+
/**
93+
* Return the sum of all line string lengths
94+
* @return {number} Length (on projected plane).
95+
* @api
96+
*/
97+
getLength(): number;
9298
/**
9399
* @return {Array<number>} Flat midpoints.
94100
*/

dist/en/main/ol/geom/MultiLineString.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/en/main/ol/geom/MultiLineString.js

+22
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
lineStringsCoordinateAtM,
1414
} from './flat/interpolate.js';
1515
import {intersectsLineStringArray} from './flat/intersectsextent.js';
16+
import {lineStringLength} from './flat/length.js';
1617
import {douglasPeuckerArray} from './flat/simplify.js';
1718

1819
/**
@@ -254,6 +255,27 @@ class MultiLineString extends SimpleGeometry {
254255
return lineStrings;
255256
}
256257

258+
/**
259+
* Return the sum of all line string lengths
260+
* @return {number} Length (on projected plane).
261+
* @api
262+
*/
263+
getLength() {
264+
const ends = this.ends_;
265+
let start = 0;
266+
let length = 0;
267+
for (let i = 0, ii = ends.length; i < ii; ++i) {
268+
length += lineStringLength(
269+
this.flatCoordinates,
270+
start,
271+
ends[i],
272+
this.stride,
273+
);
274+
start = ends[i];
275+
}
276+
return length;
277+
}
278+
257279
/**
258280
* @return {Array<number>} Flat midpoints.
259281
*/

dist/main.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)