-
Glenn Vorhes authoredGlenn Vorhes authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
LayerBase.html 30.90 KiB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: LayerBase</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: LayerBase</h1>
<section>
<header>
<h2>LayerBase</h2>
<div class="class-description">The base layer class</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="LayerBase"><span class="type-signature">(abstract) </span>new LayerBase<span class="signature">(url, options)</span><span class="type-signature"></span></h4>
<div class="description">
The base layer for all others
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">url for source</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">config
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
makeGuid()
</td>
<td class="description last">layer id</td>
</tr>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
Unnamed Layer
</td>
<td class="description last">layer name</td>
</tr>
<tr>
<td class="name"><code>opacity</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
1
</td>
<td class="description last">opacity</td>
</tr>
<tr>
<td class="name"><code>visible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last">default visible</td>
</tr>
<tr>
<td class="name"><code>minZoom</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last">min zoom level, 0 - 28</td>
</tr>
<tr>
<td class="name"><code>maxZoom</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last">max zoom level, 0 - 28</td>
</tr>
<tr>
<td class="name"><code>params</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{}
</td>
<td class="description last">the get parameters to include to retrieve the layer</td>
</tr>
<tr>
<td class="name"><code>zIndex</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
0
</td>
<td class="description last">the z index for the layer</td>
</tr>
<tr>
<td class="name"><code>loadCallback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last">function to call on load, context this is the layer object</td>
</tr>
<tr>
<td class="name"><code>legendCollapse</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last">if the legend item should be initially collapsed</td>
</tr>
<tr>
<td class="name"><code>legendCheckbox</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last">if the legend item should have a checkbox for visibility</td>
</tr>
<tr>
<td class="name"><code>legendContent</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last">additional content to add to the legend</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line11">line 11</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="legendContent"><span class="type-signature">(protected) </span>legendContent<span class="type-signature"></span></h4>
<div class="description">
set the legend content directly
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line205">line 205</a>
</li></ul></dd>
</dl>
<h4 class="name" id="legendContent"><span class="type-signature"></span>legendContent<span class="type-signature"> :string</span></h4>
<div class="description">
get the legend content
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line196">line 196</a>
</li></ul></dd>
</dl>
<h4 class="name" id="loaded"><span class="type-signature"></span>loaded<span class="type-signature"> :boolean</span></h4>
<div class="description">
Check if the layer is loaded
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line327">line 327</a>
</li></ul></dd>
</dl>
<h4 class="name" id="maxResolution"><span class="type-signature"></span>maxResolution<span class="type-signature"> :number|*</span></h4>
<div class="description">
get the maximum resolution
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
|
<span class="param-type">*</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line238">line 238</a>
</li></ul></dd>
</dl>
<h4 class="name" id="maxZoom"><span class="type-signature"></span>maxZoom<span class="type-signature"> :number|*</span></h4>
<div class="description">
get max zoom
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
|
<span class="param-type">*</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line254">line 254</a>
</li></ul></dd>
</dl>
<h4 class="name" id="minResolution"><span class="type-signature"></span>minResolution<span class="type-signature"> :number|*</span></h4>
<div class="description">
get the minimum resolution
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
|
<span class="param-type">*</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line230">line 230</a>
</li></ul></dd>
</dl>
<h4 class="name" id="minZoom"><span class="type-signature"></span>minZoom<span class="type-signature"> :number|*</span></h4>
<div class="description">
get min zoom
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
|
<span class="param-type">*</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line246">line 246</a>
</li></ul></dd>
</dl>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>
<div class="description">
Get the layer name
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line311">line 311</a>
</li></ul></dd>
</dl>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"></span></h4>
<div class="description">
set the layer name
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line319">line 319</a>
</li></ul></dd>
</dl>
<h4 class="name" id="opacity"><span class="type-signature"></span>opacity<span class="type-signature"> :number</span></h4>
<div class="description">
Get the layer opacity
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line292">line 292</a>
</li></ul></dd>
</dl>
<h4 class="name" id="opacity"><span class="type-signature"></span>opacity<span class="type-signature"></span></h4>
<div class="description">
Set the layer opacity
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line300">line 300</a>
</li></ul></dd>
</dl>
<h4 class="name" id="params"><span class="type-signature">(protected) </span>params<span class="type-signature"></span></h4>
<div class="description">
set the map get params
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line222">line 222</a>
</li></ul></dd>
</dl>
<h4 class="name" id="params"><span class="type-signature"></span>params<span class="type-signature"> :object</span></h4>
<div class="description">
get the map get params
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">object</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line213">line 213</a>
</li></ul></dd>
</dl>
<h4 class="name" id="source"><span class="type-signature"></span>source<span class="type-signature"> :*</span></h4>
<div class="description">
get the layer source
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">*</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line335">line 335</a>
</li></ul></dd>
</dl>
<h4 class="name" id="url"><span class="type-signature"></span>url<span class="type-signature"> :string</span></h4>
<div class="description">
get the url
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line262">line 262</a>
</li></ul></dd>
</dl>
<h4 class="name" id="visible"><span class="type-signature"></span>visible<span class="type-signature"> :boolean</span></h4>
<div class="description">
Get the layer visibility
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line270">line 270</a>
</li></ul></dd>
</dl>
<h4 class="name" id="visible"><span class="type-signature"></span>visible<span class="type-signature"></span></h4>
<div class="description">
Set the layer visibility
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line278">line 278</a>
</li></ul></dd>
</dl>
<h4 class="name" id="zIndex"><span class="type-signature"></span>zIndex<span class="type-signature"> :number</span></h4>
<div class="description">
get the z index
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line343">line 343</a>
</li></ul></dd>
</dl>
<h4 class="name" id="zIndex"><span class="type-signature"></span>zIndex<span class="type-signature"></span></h4>
<div class="description">
set the z index
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line351">line 351</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_load"><span class="type-signature">(protected) </span>_load<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
base load function, sets _loaded = true if it is not already
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line92">line 92</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
if already loaded
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="addLegendContent"><span class="type-signature"></span>addLegendContent<span class="signature">(additionalContent=<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
add additional content to the legend
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>additionalContent=</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">additonal content to add</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line138">line 138</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getLegendDiv"><span class="type-signature"></span>getLegendDiv<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
Get the legend html, be sure to only add to the DOM once
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line106">line 106</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
html for layer wrapped in a div
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="refresh"><span class="type-signature"></span>refresh<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
trick to refresh the layer
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="layers_LayerBase.js.html">layers/LayerBase.js</a>, <a href="layers_LayerBase.js.html#line182">line 182</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="-_FeatureLayerProperties.html">_FeatureLayerProperties</a></li><li><a href="-_Slider.html">_Slider</a></li><li><a href="Corridor.html">Corridor</a></li><li><a href="DayRange.html">DayRange</a></li><li><a href="ItsLayerCollection.html">ItsLayerCollection</a></li><li><a href="LayerBase.html">LayerBase</a></li><li><a href="LayerBaseVector.html">LayerBaseVector</a></li><li><a href="LayerBaseVectorEsri.html">LayerBaseVectorEsri</a></li><li><a href="LayerBaseVectorGeoJson.html">LayerBaseVectorGeoJson</a></li><li><a href="LayerBaseXyzTile.html">LayerBaseXyzTile</a></li><li><a href="LayerEsriMapServer.html">LayerEsriMapServer</a></li><li><a href="LayerGroup.html">LayerGroup</a></li><li><a href="LayerItsInventory.html">LayerItsInventory</a></li><li><a href="LayerLegend.html">LayerLegend</a></li><li><a href="LayerRealEarthTile.html">LayerRealEarthTile</a></li><li><a href="LayerVectorRealEarth.html">LayerVectorRealEarth</a></li><li><a href="MapInteractionBase.html">MapInteractionBase</a></li><li><a href="MapMoveCls.html">MapMoveCls</a></li><li><a href="MapPopupCls.html">MapPopupCls</a></li><li><a href="RealEarthAnimate.html">RealEarthAnimate</a></li><li><a href="RealEarthAnimateTile.html">RealEarthAnimateTile</a></li><li><a href="RealEarthAnimateVector.html">RealEarthAnimateVector</a></li><li><a href="RpPicker.html">RpPicker</a></li><li><a href="SingleSymbol.html">SingleSymbol</a></li><li><a href="Sliders.html">Sliders</a></li><li><a href="SortedFeatures.html">SortedFeatures</a></li><li><a href="SsaCorridorPicker.html">SsaCorridorPicker</a></li><li><a href="UniqueValueSymbol.html">UniqueValueSymbol</a></li></ul><h3>Global</h3><ul><li><a href="global.html#$">$</a></li><li><a href="global.html#dateToYyyyMmDdHh000">dateToYyyyMmDdHh000</a></li><li><a href="global.html#dateToYyyyMmDdHhMmSs">dateToYyyyMmDdHhMmSs</a></li><li><a href="global.html#definedAndNotNull">definedAndNotNull</a></li><li><a href="global.html#defineLegend">defineLegend</a></li><li><a href="global.html#defineStyle">defineStyle</a></li><li><a href="global.html#hexAlphaToRgbOrRgba">hexAlphaToRgbOrRgba</a></li><li><a href="global.html#highwayConvert">highwayConvert</a></li><li><a href="global.html#htmlEscape">htmlEscape</a></li><li><a href="global.html#makeBlueGreenRedGradient">makeBlueGreenRedGradient</a></li><li><a href="global.html#makeBlueGreenRedGradientZScore">makeBlueGreenRedGradientZScore</a></li><li><a href="global.html#makeFeatureServiceLegendAndSymbol">makeFeatureServiceLegendAndSymbol</a></li><li><a href="global.html#makeGuid">makeGuid</a></li><li><a href="global.html#makeMapServiceLegend">makeMapServiceLegend</a></li><li><a href="global.html#mapServiceLegendItem">mapServiceLegendItem</a></li><li><a href="global.html#offsetMinutes">offsetMinutes</a></li><li><a href="global.html#ol">ol</a></li><li><a href="global.html#propertiesZoomStyle">propertiesZoomStyle</a></li><li><a href="global.html#provide">provide</a></li><li><a href="global.html#quickMap">quickMap</a></li><li><a href="global.html#quickMapBase">quickMapBase</a></li><li><a href="global.html#quickMapMulti">quickMapMulti</a></li><li><a href="global.html#resolutionToZoom">resolutionToZoom</a></li><li><a href="global.html#returnedColors">returnedColors</a></li><li><a href="global.html#rgb2hex">rgb2hex</a></li><li><a href="global.html#rgbToRgba">rgbToRgba</a></li><li><a href="global.html#undefinedOrNull">undefinedOrNull</a></li><li><a href="global.html#zoomToResolution">zoomToResolution</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon May 02 2016 16:37:12 GMT-0500 (Central Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>