Leaflet Map Control

Set Marker Colors using ColorBrewer

Technologies / User Interface Add-Ins / Geographic Information System (GIS) Views / Thematic (Unique Value) Markers (Leaflet)

To specify marker colors with ColorBrewer, specify the colorBrewerClass in the markerProperties.

var markerProperties = { //optional radius: 7, fillColor: '#e41a1c', fillOpacity: 0.90, stroke: true, strokeColor: '#fff', strokeWeight: 1.0, // required for thematic markers renderer: 'thematic-unique-values', thematicField: 'bl.use1', uniqueValues: [], colorBrewerClass: 'Set1' };

The Colorbrewer scales are pictured here:

A link to this chart with scale names: http://bl.ocks.org/mbostock/5577023

See: ColorBrewer : Color Advice for Maps

View: http://localhost:8080/archibus/ab-leaflet-map-thematic-unique-value-renderer.axvw