Geo-Heatmap
view release on metacpan or search on metacpan
NAME
Geo::Heatmap - generate a density map (aka heatmap) overlay layer for
Google Maps, see the www directory in the distro how it works
see the script directory for creating a scale
for a real life example see
http://www.trust-box.at/dev/gm/GoogleMapsHeatmap/www/GoogleMapsHeatmap.h
tml
for Dokumentation see
HOMEPAGE
http://www.trust-box.at/googlemaps-geoheatmap/
REQUIRES
Moose
CHI
Imager
METHODS
tile
tile();
return the tile image in png format
ATTRIBUTES
debug
cache
logfile
return_points
zoom_scale
palette
USAGE
Create a Heatmap layer for GoogleMaps
The HTML part
The (f)cgi part
You need a color palette (one is included) to encode values to colors,
in Storable Format as an arrayref of arrayrefs eg
[50] = [34, 45, 56]
which means that a normalized value of 50 would lead to an RGB color of
34% red , 45% blue, 56% green.
zoom_scale
The maximum number of points for a given google zoom scale. You
would be able to extract to values from the denisity log or derive
them from your data in some cunning way
cache
You need some caching for the tiles otherwise the map would be quite
slow. Use a CHI object with the cache you like
return_points
A function reference which expects a single hashref as a parameter
which defines two LAT/LONG points to get all data points within this
box:
( run in 2.569 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )