-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set/get metadata at locations in addition to name #20
Comments
closed... duplicate found. #6 |
@vvavepacket Yeah, best bet is to have another hash store based on names. Redis stores everything as strings or numbers, but you can use Redis isn't super great for relational queries or storing complex objects at a key. Though, I actually think it could be a nice convenience to be able to store simple metadata for a location. It would be probably be limited to a shallow object of either strings and numbers. I would like to leave this open as a feature request. Ideally the API would look like: geo.addLocation('locationname', position, {
address: '265 Homer Lane',
city: 'Lalaland, CA',
rank: 3
})
geo.location('locationname', function(err, location) {
console.log('Location information', location.data);
}) But, I'd really have to consider how to implement this without drastically reducing performance. Particularly for the getting of location metadata. I think the retrival of metadata may have to be an option, like: geo.location('locationname', { withData: true }, function(err, location) {
console.log('Location information', location.data);
}) That way we could gate whether or not to make an additional request for data. |
+1 |
maybe instead of:
we can work with:
latitude -> required |
Hi,
GeoRedis feature currently utilizes 3 properties: latitude, longitude, and name. When adding a location, is it possible to add additional key value pairs aside from name itself? Let us say we are adding name, address, etc. Is it possible? If not, what are best workaround / practices?
The text was updated successfully, but these errors were encountered: