bcgov / smk-cli

The Command Line Interface enables users to rapidly create and edit SMK map configuration, including data consumption via OGC and Esri ReST data access services and local data files.
https://bcgov.github.io/smk-cli
Apache License 2.0
5 stars 3 forks source link

ability to turn on labels on DataBC (MPCM) layers #76

Closed NicoledeGreef closed 2 years ago

NicoledeGreef commented 3 years ago

Question was posed on yammer:

https://web.yammer.com/main/threads/eyJfdHlwZSI6IlRocmVhZCIsImlkIjoiMTA0MjA4NzY2NzY5NTYxNiJ9

Is it possible to turn on labels for added DataBC layers?

NicoledeGreef commented 3 years ago

https://gis.stackexchange.com/questions/245621/how-to-label-geojson-points-in-leaflet https://stackoverflow.com/questions/13316925/simple-label-on-a-leaflet-geojson-polygon

michaelpnelson commented 2 years ago

When labeling info exists for an ESRI dynamic layer, it can now be toggled on and off by a new "Show labels" check box in SMK-CLI. This was implemented in https://github.com/bcgov/smk-cli/pull/94.

michaelpnelson commented 2 years ago

As mentioned, we added the ability to show labels when labeling info exists.

It's also possible to fine-tune the content and styling of labels by editing smk-config.json. Each DataBC layer in the layers property has a dynamicLayers property. This includes a drawingInfo property which defines the appearance of the layer on the map. Label content and style can be updated by editing its labelingInfo property. For more information, see drawingInfo documentation.