CodeForPhilly / CodeForPhilly/philly-ward-leaders

Maps: use labels instead of tooltips

Open
#148 0 comments 0 reactions 0 assignees View on GitHub
v2
Dominant language
Vue
Stars
20
Forks
12
Avg merge
1d 16h
Merged PRs (30d)
3

Description

A fellow in Leaflet's gitter [showed me](https://gitter.im/Leaflet/Leaflet?at=59c8f071bc464729747258bd) how he's used `L.tooltip` for labels:

![2017-09-25-13_03_19-index html](https://user-images.githubusercontent.com/761444/30858719-d322ce4e-a28e-11e7-82b1-7850b5f028a6.png)

Tooltip options:
```js
{permanent: true}
```

And styles:
```css
.leaflet-tooltip {
background: none;
box-shadow: none;
border: none;
}
.leaflet-tooltip-left:before, .leaflet-tooltip-right:before {
border: 0px;
}
```

And to prevent overlapping labels, we can use [Geovation/labelgun](https://github.com/Geovation/labelgun). Woot!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.