Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danpaz/cartodb-directive
A simple angular directive that loads a fullscreen CartoDB map visualization http://www.cartodb.com.
https://github.com/danpaz/cartodb-directive
Last synced: 23 days ago
JSON representation
A simple angular directive that loads a fullscreen CartoDB map visualization http://www.cartodb.com.
- Host: GitHub
- URL: https://github.com/danpaz/cartodb-directive
- Owner: danpaz
- License: mit
- Created: 2014-03-11T21:22:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-12T19:59:04.000Z (over 10 years ago)
- Last Synced: 2024-05-02T04:14:39.727Z (6 months ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# AngularJS Directive for CartoDB
A simple directive for [Angular](http://angularjs.org) which allows integration of [CartoDB](http://cartodb.com) map visualizations. This directive creates a new visualization at runtime, allowing the most flexibility to set options and manipulate layers from the client.
Follow the steps below to try a fullscreen demo
## Installation
You will need [node.js](http://nodejs.org/).
$ bower install
Update your visualization layer URL in src/services.js, and run the app at localhost:8000\app\index.html. This is the webserver from the [angular seed app](https://github.com/angular/angular-seed).
node scripts/web-server.js
## CustomizeAttributes for the visualization options can be set on the map-wrapper directive in index.html. Otherwise default values are used.
Refer to the [cartodb docs](http://developers.cartodb.com/documentation/cartodb-js.html#sec-3-1).
| Attribute | Default |
| ----------------- | ------------- |
| `shareable` | `true` |
| `title` | `true` |
| `description` | `true` |
| `search-control` | `false` |
| `zoom-control` | `true` |
| `loader-control` | `true` |
| `center-lat` | `0` |
| `center-lon` | `0` |
| `zoom` | `3` |
| `cartodb-logo` | `true` |
| `infowindow` | `true` |
| `layer-selector` | `true` |
| `legends` | `true` |
| `https` | `false` |
| `scroll-wheel` | `true` |
| `fullscreen` | `true` |