Last active
June 11, 2018 08:23
-
-
Save Jwata/03ea406cdfe475cf8d4e876a2d1a5211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var reactionImageUrls = {'angry': 'http://url.com/', 'wow': 'http://url.com/'}; | |
| firebase.database().ref('Points').once('value', function(points) { | |
| points.forEach(function(point) { | |
| var location = data.val().Location; | |
| var reaction = data.val().Reaction; | |
| imageUrl = reactionImageUrls[reaction]; | |
| // display a point | |
| }) | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| users: | |
| user_1: | |
| current_location: | |
| long: 12.345 | |
| lat: 12.345 | |
| points: | |
| - 'point_1' | |
| - 'point_2' | |
| user_2: | |
| - 'point_3' | |
| user_3: | |
| - 'point_4' | |
| points: | |
| point_1: | |
| user_id: 'user_1' | |
| reaction: 'sad' | |
| state: 'private' | |
| location: | |
| long: 12.345 | |
| lat: 12.345 | |
| time: 1528191174489 | |
| point_2: | |
| ... | |
| point_3: | |
| ... | |
| point_4: | |
| ... | |
| reactions: | |
| sad: | |
| ... | |
| joy: | |
| ... | |
| angry: | |
| ... |
Author
Author
SQL Join
| id | value | home_page |
|---|---|---|
| 1 | 'a' | 'google' |
| 2 | 'b' | 'yahoo' |
| home_page | url |
|---|---|
| 'google' | 'http://google.com/' |
| 'yahoo' | 'http://yahoo.com' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use case: A user finds public points around them