Leaflet / Leaflet.heat

A tiny, simple and fast heatmap plugin for Leaflet.
http://leaflet.github.io/Leaflet.heat/demo
BSD 2-Clause "Simplified" License
1.55k stars 525 forks source link

add possibility to use options latField, lngField, and valueField #66

Closed rflament closed 11 months ago

rflament commented 8 years ago

This patch adds the possibility to use options latField, lngField, and valueField.

Example :

        $scope.layers.overlays = {
                heat: {
                    name: 'Heat Map',
                    type: 'heat',

                    data: heatPoints,
                    layerOptions: {
                        radius: 20,
                        blur: 10,
                       // which field name in your data represents the latitude - default "lat"
                        latField: 'lat',
                        // which field name in your data represents the longitude - default "lng"
                        lngField: 'lng',
                        // which field name in your data represents the data value - default "value"
                        valueField: 'count'
                    },
                    visible: true
                }
            };