Skip to content

Instantly share code, notes, and snippets.

View pmacMaps's full-sized avatar

Patrick McKinney pmacMaps

  • Commonwealth of Pennsylvania
  • Harrisburg, PA
  • 14:07 (UTC -05:00)
View GitHub Profile
@pmacMaps
pmacMaps / index.html
Last active July 17, 2018 17:14
Add error message to Leaflet.js web map if an Esri service fails to load
<!-- error message modal -->
<div class="modal fade" id="layerErrorModal" tabindex="-1" role="dialog" aria-labelledby="layerErrorModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">Error Adding Layers</h4>
</div>
<div id="erMsg" class="modal-body">
<h4 class="text-danger">Warning: One or more layers failed to load on the map!</h4>
@pmacMaps
pmacMaps / style.css
Created June 18, 2018 18:28
Expanded Layer Widget with Legend for Esri Web AppBuilder
/* Introduction
CSS rules for the Layer widget is Esri's Web AppBuilder.
For layer widgets that are expanded on map load, legend items will show
with their symbols instead of a loading icon.
Place these style rules within the <style> tag of the index.html file.
Or, create a new style.css file and link to it in the index.html file
*/
/* Layer list expanded by default */