javascript - 在 Cloud Function Firebase 中创建 GeoHash(用于 GeoFire)
问题描述
我需要为我在 Firebase 上运行的云函数中的纬度、经度创建 Geohash。
我不需要我需要导入的内容以及最佳实践是什么。
目前这是我的index.js
样子:
'use strict';
const _ = require('lodash');
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
exports.gameCreated = functions.database.ref('/games/{gameId}').onCreate((snap, context) => {
// This is where I need to create the geohash
});
解决方案
推荐阅读
- parameters - 在 r-markdown 中嵌入参数化的绘图对象
- c# - 如何在c#模型类中解析RDF本体(乌龟文件)
- html - 元素不想绝对定位,ag-Grid 中的自定义单元格编辑器
- ionic-framework - Vue-router 推送到命名视图
- c# - 找不到包“Microsoft.AspNet.WebApi.Client”.Net Core 2.2 的编译库位置
- yolo - 在 yolov3-tiny 上训练模型,但平均损失总是等于 -nan
- python-3.x - 用大名称命名文本文件时出错
- python - 如何为python中的所有print()输出设置前缀?
- saml - SAML 2 - openSAML - 签名和加密断言
- python - Pandas:将两个系列连接到 Pandas DataFrame