2023-12-05 09:18:10 -06:00
|
|
|
# Icons
|
2020-02-26 14:31:39 -06:00
|
|
|
|
|
|
|
Icons (aka pictograms in uMap sources) can be used in your map markers.
|
|
|
|
|
|
|
|
Icons are not embedded in uMap sources, you will have to add them manually. So you can choose which icons you want to use.
|
|
|
|
|
2023-10-30 15:51:05 -05:00
|
|
|
You can use either PNG, JPG or SVG files. SVG files are recommended.
|
2023-10-30 15:24:26 -05:00
|
|
|
|
2023-10-30 15:51:05 -05:00
|
|
|
When using SVG, it's recommended to use icons without color. uMap will switch to white colors
|
2023-10-30 15:24:26 -05:00
|
|
|
automatically according to the marker background color.
|
|
|
|
|
2020-02-26 14:31:39 -06:00
|
|
|
Example of icons libraries you may want to use:
|
|
|
|
|
|
|
|
- [Maki Icons](https://labs.mapbox.com/maki-icons/) (icon set made for map designers)
|
|
|
|
- [Osmic Icons](https://gitlab.com/gmgeo/osmic)
|
|
|
|
- [SJJB Icons](http://www.sjjb.co.uk/mapicons/contactsheet)
|
2023-10-30 15:24:26 -05:00
|
|
|
- [Remix](https://remixicon.com/)
|
2020-02-26 14:31:39 -06:00
|
|
|
|
2023-12-05 09:18:10 -06:00
|
|
|
## Import icons manually
|
2020-02-26 14:31:39 -06:00
|
|
|
|
|
|
|
You can import icons manually by going to your uMap admin page: `https://your.server.org/admin`
|
|
|
|
|
2023-12-05 09:18:10 -06:00
|
|
|
## Import icons automatically
|
2020-02-26 14:31:39 -06:00
|
|
|
|
2024-05-17 10:38:04 -05:00
|
|
|
To import icons on your uMap server, you will need to use the command `umap import_pictograms` (making sure the virtualenv is active).
|
2020-02-26 14:31:39 -06:00
|
|
|
|
2023-10-30 15:24:26 -05:00
|
|
|
Note: you can get help with `umap import_pictograms -h`
|
2020-02-26 14:31:39 -06:00
|
|
|
|
2023-10-30 15:24:26 -05:00
|
|
|
Basic usage:
|
2020-02-26 14:31:39 -06:00
|
|
|
|
2023-12-05 09:18:10 -06:00
|
|
|
```bash
|
|
|
|
umap import_pictograms --attribution "Maki Icons by Mapbox" path/to/icons/directory/
|
|
|
|
```
|
2020-02-26 14:31:39 -06:00
|
|
|
|
2023-12-05 09:18:10 -06:00
|
|
|
## Categories
|
2020-02-26 14:31:39 -06:00
|
|
|
|
2023-10-30 15:24:26 -05:00
|
|
|
uMap can render icons grouped into categories. When using the import script, any
|
|
|
|
subfolder will be used as category.
|