Location

Learn how to read, update, and clear the location column on monday boards using the platform API

The location column stores a geographic location with longitude/latitude precision and displays it as text in the UI.

Via the API, the location column supports read, update, and clear operations.

Column Type

Implementation Type

Supported Operations

location

LocationValue

  • Read: Yes
  • Filter: No
  • Update: Yes
  • Clear: Yes

Queries

Location columns can be queried through the column_values field on items queries using an inline fragment on LocationValue.

query {
  items(ids: [1234567890, 9876543210]) {
    column_values {
      ... on LocationValue {
        country
        street
        street_number
      }
    }
  }
}

Fields

You can use the following fields to specify what information your LocationValue implementation will return.

FieldDescription
address StringThe location's address.
city StringThe location's city.
city_short StringThe location's shortened city value.
column Column!The column the value belongs to.
country StringThe location's country.
country_short StringThe location's shortened country value.
id ID!The column's unique identifier.
lat FloatThe location's latitude.
lng FloatThe location's longitude.
place_id StringThe unique place identifier of the location.
street StringThe location's street.
street_number StringThe location's street number.
street_number_short StringThe location's shortened street building number value.
street_short StringThe location's shortened street value.
text StringThe column's value as text. Returns "" if the column has an empty value.
type ColumnType!The column's type.
updated_at DateThe column's last updated date.
value JSONThe column's JSON-formatted raw value.

Mutations

Update

You can update a location column using the change_simple_column_value or change_multiple_column_values mutations. You can send values as simple strings or JSON objects, depending on the mutation you choose.

👍

The address is not validated against the latitude and longitude. It's only displayed as text in the cell.
If no address is provided, the cell displays unknown.

Valid latitude values range from -90.0 to 90.0 (exclusive), and valid longitude values range from -180.0 to 180.0 (inclusive). If the updated coordinates fall outside these ranges, the mutation returns an error.

change_simple_column_value

To update a location column with a simple string, send the latitude, longitude, and (optionally) the address separated by spaces.

mutation {
  change_simple_column_value(
    item_id: 9876543210
    board_id: 1234567890
    column_id: "location"
    value: "29.9772962 31.1324955 Giza Pyramid Complex"
  ) {
    id
  }
}

change_multiple_column_values

To update a location column with JSON, send the latitude, longitude, and (optionally) the address as fields on the location object.

mutation {
  change_multiple_column_values(
    item_id: 9876543210
    board_id: 1234567890
    column_values: "{\"location\": {\"lat\": \"29.9772962\", \"lng\": \"31.1324955\", \"address\": \"Giza Pyramid Complex\"}}"
  ) {
    id
  }
}

Clear

You can clear a location column using change_multiple_column_values by passing null or an empty object in column_values.

mutation {
  change_multiple_column_values(
    item_id: 9876543210
    board_id: 1234567890
    column_values: "{\"location\": null}"
  ) {
    id
  }
}