SideGeoFire is a .net component for generating a firebase geofire object. For a list of firebase supported libraries, visit https://github.com/firebase/geofire
This library does not write to firebase. The reccommended library for writing to firebase is (https://github.com/ziyasal/FireSharp)
//**Install**
Install-Package SideGeoFireThe GeoFire object contains a function called BuildGeoHash which has two overloads. The first accepts a System.Data.Spatial.DbGeography object. The second accepts both latitude and longitude.
string BuildGeoHash(DbGeography)
// Create a DBGeography object from a Latitude and Longitude
var geography = GenerateLocation(latitude, longitude);
// Build the geohash
var geoHash = GeoFire.BuildGeoHash(geography);string BuildGeoHash(Latitude, Longitude)
// Build the geohash
var geoHash = GeoFire.BuildGeoHash(latitude, longitude);The result of the BuildGeoHash is a JSON object formatted to the firebase specification. The g object is the geohash and the l is the latitude and longitude.
{
"g" : "9rv0ppmv03",
"l" : {
"0" : 43.6344415,
"1" : -116.4032208
}
}Code and documentation are available according to the MIT License (see LICENSE).