Skip to content

Commit c38c981

Browse files
committed
Add docs for setLayerSource.
Fixes #31.
1 parent b9fb32d commit c38c981

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed

docs/index.html

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset='utf-8'>
5-
<title>map-gl-utils 0.41.0 | Documentation</title>
5+
<title>map-gl-utils 0.42.0 | Documentation</title>
66
<meta name='description' content='Utility functions for Mapbox GL JS or Maplibre GL JS'>
77
<meta name='viewport' content='width=device-width,initial-scale=1'>
88
<link href='assets/bass.css' rel='stylesheet'>
@@ -15,7 +15,7 @@
1515
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
1616
<div class='py1 px2'>
1717
<h3 class='mb0 no-anchor'>map-gl-utils</h3>
18-
<div class='mb1'><code>0.41.0</code></div>
18+
<div class='mb1'><code>0.42.0</code></div>
1919
<input
2020
placeholder='Filter'
2121
id='filter-input'
@@ -388,6 +388,16 @@ <h3 class='mb0 no-anchor'>map-gl-utils</h3>
388388
</li>
389389

390390

391+
<li><a
392+
href='#setlayersource'
393+
class="">
394+
setLayerSource
395+
396+
</a>
397+
398+
</li>
399+
400+
391401
<li><a
392402
href='#setproperty'
393403
class="">
@@ -3161,6 +3171,10 @@ <h2 id='changelog' class='mt0'>
31613171

31623172

31633173
<h2>Changelog</h2>
3174+
<h3>0.42.0</h3>
3175+
<ul>
3176+
<li>fixed UMD packaging some more by removing <code>esmodules: true</code> from rollup config.</li>
3177+
</ul>
31643178
<h3>0.41.0</h3>
31653179
<ul>
31663180
<li>fix UMD packaging (thanks @lasseborly!)</li>
@@ -5915,6 +5929,56 @@ <h3 class='fl m0' id='setfilter'>
59155929

59165930
<pre class='p1 overflow-auto round fill-light'>map.U.setFilter([<span class="hljs-string">&#x27;buildings-fill&#x27;</span>, <span class="hljs-string">&#x27;buildings-outline&#x27;</span>, <span class="hljs-string">&#x27;buildings-label&#x27;</span>], [<span class="hljs-string">&#x27;==&#x27;</span>,<span class="hljs-string">&#x27;level&#x27;</span>,<span class="hljs-string">&#x27;0&#x27;</span>]]);</pre>
59175931

5932+
5933+
5934+
5935+
5936+
5937+
5938+
5939+
5940+
5941+
</section>
5942+
5943+
5944+
5945+
5946+
<section class='p2 mb2 clearfix bg-white minishadow'>
5947+
5948+
5949+
<div class='clearfix'>
5950+
5951+
<h3 class='fl m0' id='setlayersource'>
5952+
setLayerSource
5953+
</h3>
5954+
5955+
5956+
</div>
5957+
5958+
5959+
<p>Changes the source of an existing layer, by removing and readding the source.</p>
5960+
5961+
<div class='pre p1 fill-light mt0'>setLayerSource</div>
5962+
5963+
5964+
5965+
5966+
5967+
5968+
5969+
5970+
5971+
5972+
5973+
5974+
5975+
5976+
5977+
5978+
5979+
5980+
5981+
59185982

59195983

59205984

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@ class MapGlUtils implements UtilsFuncs {
918918
this.map.removeSource(source);
919919
}
920920
});
921+
/** Changes the source of an existing layer, by removing and readding the source. */
921922
setLayerSource: LayerRefFunc2<string, string> = arrayify(function (
922923
layerId,
923924
source,

0 commit comments

Comments
 (0)