firebase / firebase/geofire-js

Feature request: Optional custom data

Open
#121 13 comments 14 reactions 0 assignees View on GitHub
type: feature request
Dominant language
TypeScript
Stars
1.4k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

My current project is based on Polymer/Firebase/Maps API.
I have to display to the user the number of records within the area he is viewing, using clustering technique.
All is fine with GeoFire and thousand of records (require some tweaks with the Polymer data binding system).

The user can filter records by type using the on/off switch buttons:
![capture d ecran de 2016-09-27 13 05 37](https://cloud.githubusercontent.com/assets/15780237/18874777/55a0a610-84c3-11e6-9061-98d93d7fd037.png)

If GeoFire lets me add custom data, then I can achieve this in a simple way without server side code.

For my use case, and for performance reasons, the added data must be relatively tiny.
For exemple:

```
"2016-001": {
"g" : "u07t4v857n",
"l" : [ 47.31595982215497, 5.042859856945543 ],
"t" : "a"
}
```

"t" stands for "type".

I understand that adding custom data has an impact on performances.
It might be up to the user of GeoFire to decide the best compromise, depending on the context, between adding data and performance.

I'll link a PR to this issue.

Contributor guide

Open the contributing guide

Research direction

Start by reading GeoFire's current record format and public API, then inspect how Firebase location data is written and queried. Done means an optional, compact custom field can be stored and retrieved without breaking existing location queries or making the data required.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase, typescript
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.