Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jifalops/geo-query

Polymer web component wrapper for Geofire's Geoquery.
https://github.com/jifalops/geo-query

Last synced: about 2 months ago
JSON representation

Polymer web component wrapper for Geofire's Geoquery.

Awesome Lists containing this project

README

        

[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/jifalopsgeo-query)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/jifalopsgeo-query.svg)](https://vaadin.com/directory/component/jifalopsgeo-query)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/jifalops/geo-query)

# geo-query
A Polymer web component wrapper for GeoFire's GeoQuery.

## Installation

```
bower i -S geo-query # Polymer 2.0 hybrid (1.x compatible)
bower i -S geo-query#0.3.1 # Polymer 1.x based
```

## Usage
* Set `app-name` and `path` (just like on polymerfire elements) to define the
geofire instance.
* Set `lat`, `lng`, and `radius` to search for entries in an area.

## Demo

```html

Search








Disable

[[results.length]] results.



[[item.lat]][[item.lng]][[item.distance]] km

```

Full demo:
[webcomponents.org](https://www.webcomponents.org/element/jifalops/geo-query/demo/demo/index.html)
| [github](https://jifalops.github.io/geo-query/components/geo-query/demo/).

API: [webcomponents.org](https://www.webcomponents.org/element/jifalops/geo-query/geo-query)

## Breaking changes
*0.4 -> 1.0*

* `geo-query` now implements `polymerfire/FirebaseDatabaseBehavior`
* `idle` has been renamed to `disabled`
* `geofire` is now a computed property which depends on `app-name` (optional) and `path`.
* Use `data` (optionally combined with `asObject`) in place of the old `resultsArray` and
`resultsObject` properties.

## Contributing

1. Fork it on Github.
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request

## License

[MIT](https://opensource.org/licenses/MIT)