Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cspanring/ember-cartodb-adapter
Ember Data Adapter for using CartoDB as data persistence layer.
https://github.com/cspanring/ember-cartodb-adapter
Last synced: 4 months ago
JSON representation
Ember Data Adapter for using CartoDB as data persistence layer.
- Host: GitHub
- URL: https://github.com/cspanring/ember-cartodb-adapter
- Owner: cspanring
- License: mit
- Created: 2014-01-20T21:11:37.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-07-27T13:22:37.000Z (over 8 years ago)
- Last Synced: 2024-09-29T12:07:31.928Z (4 months ago)
- Language: JavaScript
- Size: 494 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ember CartoDB Adapter
This is a [CartoDB][1] adapter for [Ember Data][2] 1.0 beta 6, that extends the built-in default data adapter. Please note that Ember Data and this CartoDB adapter are both works in progress, use with caution.
## Download
* [ember-cartodb-adapter.js][3] (5.5 kB)
## Usage
App.ApplicationAdapter = DS.CartoDBAdapter.extend({
accountName: '',
tablePrefix: '',
// DANGERZONE: GIVES WRITE ACCESS TO YOUR CARTODB ACCOUNT. DON'T USE IT ON PUBLIC SITES!
apiKey: ''
});View a [simple example][4].
## Issues
* CartoDB table names must correspond to the plural version of your Ember Data Model names. E.g. The adapter will look for the table `playgrounds` to find data about a model called `Playground`.
* Currently only GeoJSON Points (WGS84) are supported. The adapter is more a proof-of-concept.
* All data found in a CartoDB table is stored in the `properties` property of your Ember Data Model.
* `BelongsTo` and `Many` relations are not (yet) supported.[1]: http://cartodb.com/
[2]: http://github.com/emberjs/data
[3]: http://raw.github.com/cspanring/ember-cartodb-adapter/master/ember-cartodb-adapter.js
[4]: http://cspanring.github.io/ember-cartodb-adapter/