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

MPCM layers can show labels #94

Closed michaelpnelson closed 2 years ago

michaelpnelson commented 2 years ago

This updates the layer editor for MPCM layers. When an MPCM layer has a non-empty "labelingInfo" value, we add a checkbox to show label information. This then sets the value of the "showLabels" property of the "drawingInfo" property of dynamic layers in smk-config.json.

michaelpnelson commented 2 years ago

I've been picking random MPCM layers for testing. These have layer information and the toggle works fine with them:

Polgyon: Administrative Boundaries/Provincial Parks, Eco Reserves, etc. - Tantalis/Ecological Reserves - Tantalis - Colour Filled Administrative Boundaries/Provincial Parks, Eco Reserves, etc. - Tantalis/Wildlife Management Areas - Tantalis - Colour Filled Archaeology and Culture/Archaeological Culture Areas Education/College Regions - Outlined Forest Grasslands and Wetlands/Seed Plan Zones - Natural Plan Zones

Point: Imagery/Airphoto Centres/Airphoto Centres (1992)

Line: Imagery/Flight Lines/Flight Lines (1992)

This doesn't seem to display labels when set to show labels - I'm not sure why: Health/Health Service Delivery Areas/Health Services Delivery Areas - Colour Themed (I removed \n from "where": "HLTH_AUTHORITY_CODE = 4\n" but it didn't help)

Given this, I'm considering updating the UI to mention something to the effect of "labels may not appear when shown due to issues with layer configuration" - please let me know what you think.

dgboss commented 2 years ago

Regarding your comment "Given this, I'm considering updating the UI to mention something to the effect of "labels may not appear when shown due to issues with layer configuration" - please let me know what you think."

I don't think we need to. I tested a number of other layers and labels were working for all of them. I think we can use the imap4m site (https://maps.gov.bc.ca/ess/hm/imap4m/) as the gold standard. If labels work/don't work there, then they should work/not work in SMK for any given layer.