Currently in coordo-PY, when reading a resource from the datapackage, the layer_type is always set to "cricle".
See code here :
This due to the fact that when computing the colum "geom" of the config.json, the result will be a Point, Polygon, or Line type, which are usually depicted respectively with circle, fill or line in MapLibre Style Spec.
But as we can see in their doc here, it is also possible to set the layer type to "symbol" and add Layout properties to define the icon in the specifications, more or less like this:
{
"layers":[
{
"id":"inventaire",
"type":"symbol",
"source":"maplibre",
"layout":{
"icon-image":"poi",
"icon-size":0.5,
"text-field":"{name}",
"text-font":[
"Noto Sans Regular"
],
"text-size":12
}
}
]
}
To use an icon, we need to define a "sprite" URL at the root of the json style. (see doc here
After a thorough research, I found only a few sprites directly available on the web, with limited icons
The best way would be be to create our own spirte url, hosted on github, with lucide icons for instance. Here is a guide that can help doing that:
maplibre/maplibre-gl-js#3243
Currently in coordo-PY, when reading a resource from the datapackage, the layer_type is always set to "cricle".
See code here :
Coordonnees/coordo-py/coordo/map/datapackage.py
Line 47 in 5f82001
This due to the fact that when computing the colum "geom" of the config.json, the result will be a Point, Polygon, or Line type, which are usually depicted respectively with circle, fill or line in MapLibre Style Spec.
But as we can see in their doc here, it is also possible to set the layer type to "symbol" and add Layout properties to define the icon in the specifications, more or less like this:
{ "layers":[ { "id":"inventaire", "type":"symbol", "source":"maplibre", "layout":{ "icon-image":"poi", "icon-size":0.5, "text-field":"{name}", "text-font":[ "Noto Sans Regular" ], "text-size":12 } } ] }To use an icon, we need to define a "sprite" URL at the root of the json style. (see doc here
After a thorough research, I found only a few sprites directly available on the web, with limited icons
The best way would be be to create our own spirte url, hosted on github, with lucide icons for instance. Here is a guide that can help doing that:
maplibre/maplibre-gl-js#3243