Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/systemed/radiate
Heatmap engine in ActionScript 3
https://github.com/systemed/radiate
Last synced: 3 months ago
JSON representation
Heatmap engine in ActionScript 3
- Host: GitHub
- URL: https://github.com/systemed/radiate
- Owner: systemed
- Archived: true
- Created: 2013-10-15T09:56:26.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-06T10:34:13.000Z (over 4 years ago)
- Last Synced: 2024-06-24T02:36:27.242Z (5 months ago)
- Language: ActionScript
- Size: 22.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actionscript-sorted - radiate - Heatmap engine in ActionScript 3 (Unsorted / Other API)
README
Radiate
=======Radiate is a flexible heatmap engine in ActionScript 3. It supports points, polygons and polylines. Each can be applied with varying radius and strength.
Geometries are requested from a server using a simple API. Radius and strength is set via a method which can be called via JavaScript from the embedding page.
You can see a deployment of this project at www.growingroutes.org.uk.
Compiling
---------`mxmlc radiate.as -output=/path/to/radiate.swf`
(as usual, add `-verbose-stacktraces` for debug information)
JavaScript interface
--------------------Call refreshLayers from JavaScript
`mapswf.refreshLayers(obj);`
with an object containing settings for each layer:
`{ name1: { radius: 5, strength: 50, enabled: true },
name2: { radius: 1, strength: 100, enabled: false } }`Database API
------------Radiate expects to call an API located at `/api`: you can change API_URL in HeatMap.as to alter this. The API should provide two calls:
`/bbox`
Call with `bbox`, a JSON array of [bottom,left,top,right] latitudes and longitudes; and `layers`, a JSON array of layer names requested.
Returns a hash of areas, lines, routes, and accommodations (points) found in that bbox. Accommodations are returned as id, name, category, and a lat/lon pair: all others are returned as id, name, type only.
TODO: rationalise accommodation into generic 'point' type.
`/multiple`
Call with `requests`, a hash of lines, routes, and areas for which the geometry is desired.
Returns geometries for each object.
See `server/` for excerpts from a Ruby implementation of this API.
Um, Flash?
-----------At the time of initially developing this code, native browser support for filters was less than ideal. The situation is continually improving and I'd anticipate that, in time, this will be ported to become an SVG overlay to Leaflet.
Licence and credits
-------------------WTFPL.
Heatmap code by Richard Fairhurst, @richardf, [email protected]. Slippy map code adapted from Potlatch 2 (also WTFPL).