0

i was trying to run plot of 300,000 data points through leaflet but failed miserably. I found an alternative package called "leaflet.glify". However i could not find any proper documentation for it. I was trying to change the color of the datapoint based on different ID's in the dataset. Not sure how to go about it.

Please help !

Prabesh Kc
  • 27
  • 7
  • 1
    https://github.com/tim-salabim/leaflet.glify seems helpful. Have you seen `addGlifyPoints(data = pts, color = cols, group = "pts")`? – anotherfred Dec 24 '18 at 17:00

1 Answers1

0

You can use color property and return the color rgb value corresponding to the each and every lat-long point plotted.

L.glify.points({
                map: this.map,
                size:10,
                click: function (e, point, xy) {
                    //set up a standalone popup (use a popup as a layer)
                    L.popup()
                    .setLatLng(point)
                    .setContent("Tooltip content")
                    .openOn(this.map);
                },
                data: JSON.parse(JSON.stringify(geoJSONObj)),
                color: function(index,latLng){
                    return dataObject[latLng[0]+","+latLng[1]].color;
                },
                opacity:1
            });