wmbeers / cmv-app

CMV - The Configurable Map Viewer - A community supported open source mapping framework built with the Esri JavaScript API and the Dojo Toolkit
https://demo.cmv.io/
MIT License
1 stars 2 forks source link

Labels defined in map service for a feature layer do not appear when the feature layer is loaded directly. #50

Open wmbeers opened 3 years ago

wmbeers commented 3 years ago

Description:

Reported by at least one user to Lex: Labels are defined in several of our map services, and work as expected, but if a labelled feature layer is added directly, the labels do not appear.

Seems similar to https://github.com/cmv/cmv-app/issues/41, where the answer was just "load the map service". Our user was happy with this work-around, but as we move forward with Thematic Maps this is something we'll ultimately have to address.

Steps to reproduce:

  1. Load the WBIDs feature layer directly as a feature layer
  2. Zoom in to 1:50K or higher, so that the layer starts drawing.

Expected results:

Labels appear on the map.

Actual results:

Labels do not appear. Compare to loading the entire Water Quality map service.

wmbeers commented 3 years ago

Describes how to add labels: https://developers.arcgis.com/javascript/3/jssamples/layers_label.html

wmbeers commented 3 years ago

Note that label properties are included in the feature layer's service definition: https://pisces.at.geoplan.ufl.edu/arcgis/rest/services/etdm_services/Water_Quality/MapServer/18/?f=pjson

At first glance I would expect that to just be respected when the layer at that endpoint is added. Not sure if this is a JSAPI bug, something left out of CMV, or something I need to add to layer loader processes.