MapServer Layer Labels are not displayed on iOS application.

476
1
10-25-2021 03:24 AM
YashvitNaik
New Contributor III

The MapServer layer label is not displayed on my iOS application (v100.7). The layer has a symbol and label. The same layer is displayed on the javascript web application with the symbol and label whereas on iOS the symbol is displayed but the label is not. please check the below image. 

iOS applicationiOS application

 

javascript web appjavascript web app

Layer Json:

{
  "currentVersion": 10.81,
  "id": 10,
  "name": "Drop Inlets",
  "type": "Feature Layer",
  "description": "",
  "geometryType": "esriGeometryPoint",
  "sourceSpatialReference": {
    "wkid": 102642,
    "latestWkid": 2226
  },
  "copyrightText": "",
  "parentLayer": null,
  "subLayers": [
    
  ],
  "minScale": 20000,
  "maxScale": 0,
  "drawingInfo": {
    "renderer": {
      "type": "simple",
      "symbol": {
        "type": "esriPMS",
        "url": "04daf6dba482f0b89551c272e8e441ea",
        "imageData": "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAB9JREFUGJVjYWBgYGAo8f3PgAOw4JIYggp6NjPiUgAA9ecDIdUlArEAAAAASUVORK5CYII=",
        "contentType": "image/png",
        "width": 6,
        "height": 6,
        "angle": 0,
        "xoffset": 0,
        "yoffset": 0
      },
      "label": "",
      "description": ""
    },
    "transparency": 0,
    "labelingInfo": null
  },
  "defaultVisibility": true,
  "extent": {
    "xmin": 6666683.263543308,
    "ymin": 1849480.0979458094,
    "xmax": 6792364.348794803,
    "ymax": 2030044.241738066,
    "spatialReference": {
      "wkid": 102642,
      "latestWkid": 2226
    }
  },
  "hasAttachments": false,
  "htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText",
  "displayField": "NEXGEN_ID",
  "typeIdField": null,
  "subtypeFieldName": null,
  "subtypeField": null,
  "defaultSubtypeCode": null,
  "fields": [
    {
      "name": "OBJECTID",
      "type": "esriFieldTypeOID",
      "alias": "OBJECTID",
      "domain": null
    },
    {
      "name": "FAC_ID",
      "type": "esriFieldTypeString",
      "alias": "FAC_ID",
      "length": 254,
      "domain": null
    },
    {
      "name": "CITY",
      "type": "esriFieldTypeString",
      "alias": "CITY",
      "length": 2,
      "domain": null
    },
    {
      "name": "DRPINTYP",
      "type": "esriFieldTypeString",
      "alias": "DRPINTYP",
      "length": 8,
      "domain": null
    },
    {
      "name": "SWQEMB",
      "type": "esriFieldTypeString",
      "alias": "SWQEMB",
      "length": 1,
      "domain": null
    },
    {
      "name": "IN_CURB_RADIUS",
      "type": "esriFieldTypeString",
      "alias": "IN_CURB_RADIUS",
      "length": 1,
      "domain": null
    },
    {
      "name": "SHAPE",
      "type": "esriFieldTypeGeometry",
      "alias": "SHAPE",
      "domain": null
    },
    {
      "name": "WRD_SERVICE_AREA",
      "type": "esriFieldTypeString",
      "alias": "WRD_SERVICE_AREA",
      "length": 16,
      "domain": null
    },
    {
      "name": "WATERSHED",
      "type": "esriFieldTypeString",
      "alias": "WATERSHED",
      "length": 50,
      "domain": null
    },
    {
      "name": "NAME",
      "type": "esriFieldTypeString",
      "alias": "NAME",
      "length": 50,
      "domain": null
    },
    {
      "name": "SUP_DISTRICT",
      "type": "esriFieldTypeString",
      "alias": "SUP_DISTRICT",
      "length": 16,
      "domain": null
    },
    {
      "name": "DTBUILT",
      "type": "esriFieldTypeDate",
      "alias": "DTBUILT",
      "length": 8,
      "domain": null
    },
    {
      "name": "last_edited_user",
      "type": "esriFieldTypeString",
      "alias": "last_edited_user",
      "length": 255,
      "domain": null
    },
    {
      "name": "last_edited_date",
      "type": "esriFieldTypeDate",
      "alias": "last_edited_date",
      "length": 8,
      "domain": null
    },
    {
      "name": "NEXGEN_ID",
      "type": "esriFieldTypeInteger",
      "alias": "NEXGEN_ID",
      "domain": null
    },
    {
      "name": "created_user",
      "type": "esriFieldTypeString",
      "alias": "created_user",
      "length": 255,
      "domain": null
    },
    {
      "name": "created_date",
      "type": "esriFieldTypeDate",
      "alias": "created_date",
      "length": 8,
      "domain": null
    }
  ],
  "geometryField": {
    "name": "SHAPE",
    "type": "esriFieldTypeGeometry",
    "alias": "SHAPE"
  },
  "indexes": [
    {
      "name": "R510_pk",
      "fields": "OBJECTID",
      "isAscending": true,
      "isUnique": true,
      "description": ""
    },
    {
      "name": "S496_idx",
      "fields": "SHAPE",
      "isAscending": true,
      "isUnique": true,
      "description": ""
    }
  ],
  "subtypes": [
    
  ],
  "relationships": [
    
  ],
  "canModifyLayer": true,
  "canScaleSymbols": false,
  "hasLabels": true,
  "capabilities": "Map,Query,Data",
  "maxRecordCount": 1000,
  "supportsStatistics": true,
  "supportsAdvancedQueries": true,
  "supportedQueryFormats": "JSON, geoJSON",
  "isDataVersioned": false,
  "ownershipBasedAccessControlForFeatures": {
    "allowOthersToQuery": true
  },
  "useStandardizedQueries": true,
  "advancedQueryCapabilities": {
    "useStandardizedQueries": true,
    "supportsStatistics": true,
    "supportsHavingClause": true,
    "supportsCountDistinct": true,
    "supportsOrderBy": true,
    "supportsDistinct": true,
    "supportsPagination": true,
    "supportsTrueCurve": true,
    "supportsReturningQueryExtent": true,
    "supportsQueryWithDistance": true,
    "supportsSqlExpression": true
  },
  "supportsDatumTransformation": true,
  "dateFieldsTimeReference": null,
  "supportsCoordinatesQuantization": true
}

 

 

0 Kudos
1 Reply
DiveshGoyal
Esri Regular Contributor

The Layer JSON you provided contains 

"labelingInfo": null

 

Based on that, I wouldn't expect labels to be displayed by default. Not sure why JSAPI is displaying them.
You can republish the service to include labels, or you can write some code in the runtime application to define & enable labels on the layer. Here's a sample that shows how you can do that - https://developers.arcgis.com/net/wpf/sample-code/show-labels-on-layers/

 

 

0 Kudos