planetary.js/site/public/documentation/builtin_land.md

31 lines
1000 B
Markdown

Land Plugin
===========
The `land` plugin renders Earth's landmasses. It uses TopoJSON data published to `planet.plugins.topojson.world` by the [TopoJSON plugin](/documentation/builtin_topojson.html). It uses the feature at `objects.land` in the TopoJSON object.
API
---
**`planetaryjs.plugins.land([config])`**
Valid keys for `config` are:
* `fill`: the `fillStyle` to use for the context; defaults to `"white"`
* `stroke`: the `strokeStyle` to use for the context; defaults to no value, resulting in no stroke around the landmasses
* `lineWidth` the `lineWidth` to set on the context; only effective if `stroke` is set. Defaults to no value, resulting in no change to the context's `lineWidth`
<div class='ui raised segment'>
<div class='ui red ribbon label'>JavaScript</div>
```javascript
planetaryjs.plugins.land({
fill: '#339966', stroke: '#000000'
});
```
</div>
See also:
* [Earth Plugin](/documentation/builtin_earth.html)
* [TopoJSON Plugin](/documentation/builtin_topojson.html)