Example sources in the examples dir
This commit is contained in:
20
examples/lazy-source.html
Normal file
20
examples/lazy-source.html
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Lazy Source
|
||||
shortdesc: Example of setting a layer source after construction.
|
||||
docs: >
|
||||
<p>Typically, the source for a layer is provided to the layer constructor.
|
||||
If you need to set a layer source after construction, this can be
|
||||
done with the <code>layer.setSource()</code> method.</p>
|
||||
<p>The layer in the map above is constructed with no source. Use the
|
||||
links below to set/unset the layer source. A layer is not rendered
|
||||
until its source is set.</p>
|
||||
tags: "source"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button id="set-source" class="code">layer.setSource(source)</button>
|
||||
<button id="unset-source" class="code">layer.setSource(null)</button>
|
||||
Reference in New Issue
Block a user