Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
e019cb01ba
|
|||
|
eb2878ec6a
|
|||
|
602cc44ae2
|
|||
|
b9615d7b97
|
10
README.md
10
README.md
@@ -1,7 +1,13 @@
|
||||
# @remotestorage/module-places
|
||||
|
||||
[](https://www.npmjs.com/package/@remotestorage/module-places)
|
||||
|
||||
This module allows you to manage saved places (Points of Interest) using the [remoteStorage](https://remotestorage.io/) protocol.
|
||||
|
||||
It leverages [Geohashes](https://www.geohash.es/) to organize data, enabling efficient retrieval of places within specific geographic areas. This structure is particularly optimized for map applications that need to load data only for the visible viewport.
|
||||
|
||||
For a demo application, as well as source code using this module, check out [Marco](https://marco.kosmos.org).
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
@@ -31,6 +37,10 @@ await places.store({
|
||||
// List all places
|
||||
const allPlaces = await places.getPlaces();
|
||||
console.log(allPlaces);
|
||||
|
||||
// List places for specific geohash prefixes (e.g. for a map view)
|
||||
const areaPlaces = await places.getPlaces(['u33d', 'u33e']);
|
||||
console.log(areaPlaces);
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@remotestorage/module-places",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@remotestorage/module-places",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"latlon-geohash": "^2.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@remotestorage/module-places",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"description": "Manage favorite/saved places",
|
||||
"homepage": "https://gitea.kosmos.org/raucao/remotestorage-module-places#remotestoragemodule-places",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user