JohnTigue / idots

A web data standard for Infectious Disease Outbreak Time Series (IDOTS), and related software
http://tigue.com/
Apache License 2.0
3 stars 0 forks source link

Leaflet.EpiMarker: custom Marker and MarkerClusterGroup #58

Open JohnTigue opened 9 years ago

JohnTigue commented 9 years ago

This will be the bulls eye marker, which has 2 stacked circle markers. It can be used for cases vs. deaths or deaths-in-last-21-days vs. deaths-cummulative, etc.

How is this generalized to all 5 AMD level (ADM0 through ADM4, is all there is right?) and Points? Can MarkerClusterGroup be used as multiple levels?

Thing is that L.MarkerClusterGroup has a config property of disableClusteringAtZoom: which will need to be set to sensible value such that map transitions from ADM0, ADM1, and ADM2 clustering.

So, do ADM2 features have properties defining their ADM0 and ADM1 "parents" or does this get into GAUL codes only and then an external table to map ADM0::ADM1::ADM2?

JohnTigue commented 9 years ago

And here's how to do 2 concentric circles: https://github.com/heyman/leaflet-usermarker

The trick is in the onAdd function: https://github.com/heyman/leaflet-usermarker/blob/master/src/leaflet.usermarker.js

JohnTigue commented 9 years ago

Perhaps: the config options should have an array of Stackies each element a duble which is a map from a GeoJSON property name to a style. There can be more than two items to stack.