Back to Pocketbase

Interface GeoPointField

static/jsvm/interfaces/core.GeoPointField.html

latest5.3 KB
Original Source

Interface GeoPointField

GeoPointField defines "geoPoint" type field for storing latitude and longitude GPS coordinates.

You can set the record field value as [types.GeoPoint], map or serialized json object with lat-lon props. The stored value is always converted to [types.GeoPoint]. Nil, empty map, empty bytes slice, etc. results in zero [types.GeoPoint].

Examples of updating a record's GeoPointField value programmatically:

record.Set("location", types.GeoPoint{Lat: 123, Lon: 456}) record.Set("location", map[string]any{"lat":123, "lon":456}) record.Set("location", []byte(`{"lat":123, "lon":456}`)Copy

Hierarchy

Implemented by

Index

Methods

columnTypegetHiddengetIdgetNamegetSystemprepareValuesetHiddensetIdsetNamesetSystemtypevalidateSettingsvalidateValue

Properties

hiddenidnamepresentablerequiredsystem

Methods

columnType

  • columnType(app): string

ColumnType implements [Field.ColumnType] interface method.

Parameters

app: App

Returns string

getHidden

  • getHidden(): boolean

GetHidden implements [Field.GetHidden] interface method.

Returns boolean

getId

  • getId(): string

GetId implements [Field.GetId] interface method.

Returns string

getName

  • getName(): string

GetName implements [Field.GetName] interface method.

Returns string

getSystem

  • getSystem(): boolean

GetSystem implements [Field.GetSystem] interface method.

Returns boolean

prepareValue

  • prepareValue(record, raw): any

PrepareValue implements [Field.PrepareValue] interface method.

Parameters

record: core.Record
raw: any

Returns any

setHidden

  • setHidden(hidden): void

SetHidden implements [Field.SetHidden] interface method.

Parameters

hidden: boolean

Returns void

setId

  • setId(id): void

SetId implements [Field.SetId] interface method.

Parameters

id: string

Returns void

setName

  • setName(name): void

SetName implements [Field.SetName] interface method.

Parameters

name: string

Returns void

setSystem

  • setSystem(system): void

SetSystem implements [Field.SetSystem] interface method.

Parameters

system: boolean

Returns void

type

  • type(): string

Type implements [Field.Type] interface method.

Returns string

validateSettings

  • validateSettings(ctx, app, collection): void

ValidateSettings implements [Field.ValidateSettings] interface method.

Parameters

ctx: context.Context
app: App
collection: core.Collection

Returns void

validateValue

  • validateValue(ctx, app, record): void

ValidateValue implements [Field.ValidateValue] interface method.

Parameters

ctx: context.Context
app: App
record: core.Record

Returns void

Properties

hidden

hidden: boolean

Hidden hides the field from the API response.

id

id: string

Id is the unique stable field identifier.

It is automatically generated from the name when adding to a collection FieldsList.

name

name: string

Name (required) is the unique name of the field.

presentable

presentable: boolean

Presentable hints the Dashboard UI to use the underlying field record value in the relation preview label.

required

required: boolean

Required will require the field coordinates to be non-zero (aka. not "Null Island").

system

system: boolean

System prevents the renaming and removal of the field.

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

On This Page

Generated using TypeDoc