KmlToJson (source) converts KML files into GeoJSON. On Template:Attached KML subpages (where KML files are stored), the script adds a "GeoJSON" link near the "Move" link (in the 'More' dropdown menu for Vector skin; a tab in Monobook skin) that does the conversion when clicked. Copy the result and paste into an appropriate subpage of Wikipedia:Map data (example: Wikipedia:Map data/Wikipedia KML/Iowa Highway 192). The map data can then be used in mapframe maps, e.g. by using {{maplink}}'s |raw=
parameter:
{{maplink|frame=yes|plain=yes|frame-align=center|frame-width=290|frame-lat=41.253|frame-long=-95.862|zoom=11|raw={{Wikipedia:Map data/Wikipedia KML/Iowa Highway 192}}}}
Installation
editTo install the script, add the line:
importScript('User:Evad37/kmlToJson.js'); // [[User:Evad37/kmlToJson]]