What's actually supported for hosted services in the API?

3875
0
02-20-2015 03:05 PM
DavinShokes1
Occasional Contributor II

I have been referring to the Resource Center for a long time and it is still difficult to find the right information. Road blocks constantly occur when I'm trying to update the definition of a hosted layer and the syntax needed isn't in the examples. Lets take a look at my latest scenario.

Common data types - Labeling Objects‌ - Nowhere under any of these objects does it say whether or not they are supported when administering hosted services. Since "labelingInfo"  is a property that exists in hosted services, why wouldn't the labeling object be supported?

This is the example that is provided in the resources:

{
  "labelPlacement": "esriServerPointLabelPlacementAboveRight",
  "labelExpression": "[NAME]",
  "useCodedValues": false,
  "symbol": {
  "type": "esriTS",
  "color": [38,115,0,255],
  "backgroundColor": null,
  "borderLineColor": null,
  "verticalAlignment": "bottom",
  "horizontalAlignment": "left",
  "rightToLeft": false,
  "angle": 0,
  "xoffset": 0,
  "yoffset": 0,
  "kerning": true,
  "font": {
  "family": "Arial",
  "size": 11,
  "style": "normal",
  "weight": "bold",
  "decoration": "none"
  }
  },
  "minScale": 0,
  "maxScale": 0,
  "where" : "NAME LIKE 'A%'" //label only those feature where name begins with A
  }

This is my labelinginfo:

{
        "labelPlacement" : "esriServerPointLabelPlacementBelowCenter", 
        "labelExpression" : "[TAG]", 
        "labelExpressionInfo" : { "value" : "{TAG}"}, 
        "useCodedValues" : false, 
        "symbol" :  {
          "type" : "esriTS", 
          "color" : [224, 215, 255, 255], 
          "backgroundColor" : null, 
          "borderLineColor" : null, 
          "verticalAlignment" : "top", 
          "horizontalAlignment" : "center", 
          "rightToLeft" : false, 
          "angle" : 0, 
          "xoffset" : 0, 
          "yoffset" : 0, 
          "font" : {
            "family" : "Arial", 
            "size" : 9.75, 
            "style" : "normal", 
            "weight" : "bold", 
            "decoration" : "none"
          }
        }, 
        "minScale" : 36000, 
        "maxScale" : 2000
      }

They are similar, but how come there is no documentation for "labelExpressionInfo" and how to modify it?

Why do "backgroundColor" and "borderLineColor" remain null after I've set them to [38,115,0,255] yet UpdateDefinition succeeds without any issues?

Why is "where" in the example, but will not stick when I try to add "TAG LIKE 'A%'"? I would love to get rid of null labels that fill up the screen.

Earlier this week, I contacted esri support for a question on REST functionality. The receptionist said I wasn't covered since I didn't have ArcGIS for Server. I was baffled. Desktop, EDN, and AGOL annual fees aren't enough? The link at the top of my services directory page points to the same REST API Resource Center. So why is it so difficult to identify which objects and their properties can and can't be altered?

0 Replies