1.1 KiB
1.1 KiB
Borders Plugin
The borders plugin renders the borders around (and between) countries. It uses TopoJSON data published to planet.plugins.topojson.world by the TopoJSON plugin. It uses the feature at objects.countries in the TopoJSON object to calculate the borders.
API
planetaryjs.plugins.borders([config])
Valid keys for config are:
stroke: thestrokeStyleto use for the context; defaults to"gray"lineWidththelineWidthto set on the context; defaults to no value, and the context'slineWidthis not modifiedtype: valid options are"internal","external", or"both"."internal"draws borders between countries but not coastlines;"external"does the opposite."both", unsurprisingly, draws both. Defaults to"internal".
JavaScript
planetaryjs.plugins.borders({
stroke: '#008000', lineWidth: 0.25, type: 'both'
});
See also: