R/iconFunctions.R

defIconFunction <-
  JS("function(icon){
       if (!$.isEmptyObject(icon)) {
         return L.icon(icon);
       } else {
         return L.icon();
       }
     }")

awesomeIconFunction <-
  JS("function(icon){
       if (!$.isEmptyObject(icon)) {
         if (!icon.prefix) {
           icon.prefix = icon.library;
         }
         return L.AwesomeMarkers.icon(icon);
       } else {
         return L.AwesomeMarkers.icon();
       }
     }")

Try the leaflet.esri package in your browser

Any scripts or data that you put into this service are public.

leaflet.esri documentation built on May 2, 2019, 2:39 a.m.