File talk:USA Counties.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

can this be dynamic/datadriven, like for a statistical map? how to connect the county shapes to the database ID's? any simple example would be appreciated! — Preceding unsigned comment added by 208.91.139.204 (talk • contribs) 23:55, January 29, 2013‎ (UTC)

This version doesn't have a mapping between path names and county codes. It looks as though the version over at File:Usa counties large.svg has this though. With that it should be a "simple" case of procedurally finding the path with the matching county code and setting the style appropriately. I'll see if I can find some time to clean up the code a bit and make it support defining styles by css (which makes generating maps trivial. As for making it truly dynamic that is (at the moment) not possible on-wiki but should be possible in general. /Lokal_Profil 00:06, 30 January 2013 (UTC)[reply]
The other map has now been fixed. Instructions for how to automagically colour it are in the code. /Lokal_Profil 01:10, 30 January 2013 (UTC)[reply]