Demos for the custom marker functions feature that allows passing JavaScript functions directly as marker.symbol values.
Data-driven markers: sun, cloud, and wind barb symbols based on customdata
Simple custom shapes: heart and star markers using only radius
Shows both simple (r) and data-aware (r, customdata) functions working together