[TIMOB-28530] Android: Add heat-map support to "ti.map" module
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2021-09-01T00:50:06.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 10.1.0 |
| Components | Android |
| Labels | android, heat, heatmap, ti.map |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2021-08-31T22:49:38.000+0000 |
| Updated | 2021-09-01T00:50:12.000+0000 |
Description
*Summary:*
Add the ability to show a heat-map via the "ti.map" module.
https://developers.google.com/maps/documentation/android-sdk/utility/heatmap
!HeatMap.png|thumbnail!
*Proposed API:*
MapView.addHeatMap(Array<MapPoint>)
*Example Usage 1:*
const Map = require('ti.map');
const window = Ti.UI.createWindow();
const mapView = Map.createView({
region: { latitude: -37.840935, longitude: 144.946457 }, // Melbourne
});
mapView.addHeatMap([
{ latitude: -37.1886, longitude: 145.708 },
{ latitude: -37.8361, longitude: 144.845 },
{ latitude: -38.4034, longitude: 144.192 },
{ latitude: -38.7597, longitude: 143.67 },
{ latitude: -36.9672, longitude: 141.083 },
]);
window.add(mapView);
window.open();
*Example Usage 2:*
const Map = require('ti.map');
const window = Ti.UI.createWindow();
const mapView = Map.createView({
region: { latitude: -37.840935, longitude: 144.946457 }, // Melbourne
});
mapView.addHeatMap([
[ 145.708, -37.1886 ],
[ 144.845, -37.8361 ],
[ 144.192, -38.4034 ],
[ 143.67, -38.7597 ],
[ 141.083, -36.9672 ],
]);
window.add(mapView);
window.open();
Attachments
| File | Date | Size |
|---|---|---|
| HeatMap.png | 2021-09-01T00:49:12.000+0000 | 805022 |
PR (ti.map): https://github.com/appcelerator-modules/ti.map/pull/472
FR Passed.