Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iboates authored Apr 14, 2019
1 parent a162b5e commit 3d277b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ A (toggleable) pair of spotlights, each of which selectively highlights points b

A (toggleable) pair of marker-based spotlights, each of which selectively highlights points based on their attributes [(Demo)](https://iboates.github.io/examples/02_multiple_spotlights_marker/index) [(Source)](https://github.com/iboates/leaflet-spotlight/tree/master/examples/02_multiple_spotlights_marker)
</p>

## How it works (generally)

The plugin enables an `L.Map` object to manage new `L.Spotlight` objects, which are linked to an `L.Layer` object in the map. You as the developer must define a function which receives a receives an `L.latlng` (which will be the user's mouse cursor), and constructs from it a `turf.js` Polygon. You also must specify either an `L.Style` object or a function which returns one, which will indicate how to draw the features which are contained within the spotlight area. You can also specify the style of the spotlight on the map itself.

See the [javascript for the simple example](https://github.com/iboates/leaflet-spotlight/blob/master/examples/00_simple/init.js) for a detailed walkthrough.

0 comments on commit 3d277b7

Please sign in to comment.