File talk:USA Counties.svg

出自Wikimedia Commons
跳至導覽 跳至搜尋

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! — 以上未簽名的留言是由該使用者加入的: 208.91.139.204 (留言 • 貢獻) 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)[回覆]
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)[回覆]