Skip to content

Commit

Permalink
docs: updated map style section [build doc]
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed May 6, 2024
1 parent 216cfcc commit f35d207
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Binary file added docs/.vitepress/public/images/kano-style.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/api/core/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Shapes['my-shape'] = {
},
```
::: note Tip
::: tip Tip
Checkout the [Miscellaneous activity](https://kapp.dev.kalisio.xyz/#/home/miscellaneous) to see examples.
:::
Expand All @@ -369,7 +369,7 @@ Checkout the [Miscellaneous activity](https://kapp.dev.kalisio.xyz/#/home/miscel
The [KColorScale](https://github.com/kalisio/kdk/blob/master/core/client/components/media/KColorScale.vue) component helps to render [Chroma color scales](https://gka.github.io/chroma.js/#color-scales).
You can provide the `scale`, `domain` and `classes` properties and also a `label` as well as a `direction` (vertical or horizontal).
::: note Tip
::: tip Tip
Checkout the [Miscellaneous activity](https://kapp.dev.kalisio.xyz/#/home/miscellaneous) to see examples.
:::
Expand All @@ -381,7 +381,7 @@ In addition and only if needed, it uses [chroma.js](https://gka.github.io/chroma
Checkout the [ChartActivity](https://github.com/kalisio/kApp/blob/master/src/components/ChartActivity.vue) to understand how it works.
::: tip
::: tip Tip
Have a look at the [choma color scales](https://gka.github.io/chroma.js/#color-scales) to see how to define your color scale.
:::
Expand Down
9 changes: 6 additions & 3 deletions docs/api/map/map-mixins.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,16 @@ In addition and for backward compatibility, **KDK** supports an enhanced [simple
| `icon-x-offset` | `style.point.icon.xOffset` |
| `icon-y-offset` | `style.point.icon.yOffset` |

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset

The mixin automatically registers defaults styling for the the following type: `point`, `line` and `polygon`. For each type, the following options are merged with the following order of precedence:
* feature style : **feature.style** or on [simple style spec options](https://github.com/mapbox/simplestyle-spec) **feature.properties**
* feature style: **feature.style** or on [simple style spec options](https://github.com/mapbox/simplestyle-spec) **feature.properties**
* layer style set on layer descriptor
* engline style set on engine descriptot

::: tip Tip
Check out this [features.geojson](https://github.com/kalisio/kano/blob/master/test/data/style-editor/features.geojson) file to have some examples
![Map style](../../.vitepress/public/images/kano-style.png)
:::

## Map Popup

Make it possible to generate [Leaflet popups](https://leafletjs.com/reference.html#popup) based on GeoJson feature properties. Use **register/unregisterStyle(`popup`, generator)** to (un)register a function **f(feature, layer, options)** returning a [Leaflet popup](https://leafletjs.com/reference.html#popup)
Expand Down

0 comments on commit f35d207

Please sign in to comment.