enjalot / wwsd

working with spatial data - workshop materials
212 stars 32 forks source link

Basic Styling & Interaction with Leaflet #2

Open enjalot opened 8 years ago

enjalot commented 8 years ago

Start here:

a) Try coloring the countries by their population using Leaflet's style option.
b) Add mouse interaction that changes the outline of a country when you mouse over it.

Resources: Leaflet Choropleth Bostock Choropleth

enjalot commented 8 years ago

An example choropleth using d3.max and d3.scale.threshold

Extended example with simple mouse interaction

enjalot commented 8 years ago

Using a linear color scale: http://blockbuilder.org/enjalot/ce1df58ab6680177df71255fc4d5e9db