Feature object

Overview

This topic discusses the JSON representation of feature objects.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "geometry": <geometry>,

  "attributes": {
    "name1": <value1>,
    "name2": <value2>,
  }
}

A feature consists of the following two properties. All properties are optional.

  • The geometry specifies the feature geometry. It can be any of the supported geometry types. It is a JSON object as defined in the Geometry Objects documentation.
  • The attributes property specifies the feature attributes. It is a JSON object that contains a dictionary of name-value pairs. The names are the feature field names. The values are the field values, and they can be any of the standard JSON types: string, number, and boolean. Note that date values are encoded as numbers. The number represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.