Constructors
constructor
- new Geojson(api: Api): Geojson
Properties
api
Optional
googleKey
googleKey?: string
Optional
sessionToken
sessionToken?: string
Methods
addFeature
- addFeature(
geojson: Feature,
layerName: string,
organization: string,
): Promise<ApiResponse<void>> Parameters
- geojson: Feature
- layerName: string
- organization: string
Returns Promise<ApiResponse<void>>
createElementsForFeatures
- createElementsForFeatures(
organization: string,
hashes: string | string[],
): Promise<ApiResponse<ElementFeaturePair[]>> Parameters
- organization: string
- hashes: string | string[]
editFeature
- editFeature(
geoIdentifier: string,
editData: EditData,
): Promise<ApiResponse<unknown, unknown>> Parameters
- geoIdentifier: string
- editData: EditData
Returns Promise<ApiResponse<unknown, unknown>>
generateSessionToken
- generateSessionToken(): void
Returns void
geocodingQuery
- geocodingQuery(
query: string,
metaData?: { location?: string; radius?: number },
):
| undefined
| Promise<ApiResponse<AutocompleteResponse, AutocompleteResponse>> Parameters
- query: string
- metaData: { location?: string; radius?: number } = {}
Returns undefined | Promise<ApiResponse<AutocompleteResponse, AutocompleteResponse>>
getFeaturesForElements
- getFeaturesForElements(
hashes: string[],
): Promise<ApiResponse<DatabaseFeature[]>>
getPlaceLocation
- getPlaceLocation(
placeId: string,
): Promise<ApiResponse<GeocodingResponse, GeocodingResponse>> Returns Promise<ApiResponse<GeocodingResponse, GeocodingResponse>>
loadLayers
- loadLayers(organization: string): Promise<ApiResponse<string[]>>
Returns Promise<ApiResponse<string[]>>
near
- near(
query: NearbyQuery,
organization: string,
layer: string | string[],
page?: number,
perPage?: number,
paramOptions?: Partial<NearOptions>,
): Promise<ApiResponse<ShowNearResult, void>> Parameters
- query: NearbyQuery
- organization: string
- layer: string | string[]
- page: number = 1
- perPage: number = 200
Optional
paramOptions: Partial<NearOptions>
setGoogleKey
- setGoogleKey(key: string): void
Returns void