Code Monkey home page Code Monkey logo

million-points-on-map's People

Contributors

cyrilcherian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

million-points-on-map's Issues

Elasticsearch data format

Could you clarify the format in which you're putting data into elasticsearch for someone who is not quite as familiar with elasticsearch?

Index was created with the supplied example

I've tried my data in this format (these being results from an empty search)

{
      "_index" : "points",
      "_type" : "point",
      "_id" : "AVEaYXOzCKM7Hs_jae0G",
      "_score" : 1.0,
      "_source":{"point":{"lat":13.964871,"lon":100.37347}}
 }

as well as

{
      "_index" : "points",
      "_type" : "point",
      "_id" : "AVEaYXOzCKM7Hs_jae0G",
      "_score" : 1.0,
      "_source":{"location":{"lat":13.964871,"lon":100.37347}}
 }

and

{
      "_index" : "points",
      "_type" : "point",
      "_id" : "AVEaaPfmCKM7Hs_jae0T",
      "_score" : 1.0,
      "_source":{"point":{"location":{"lat":50.706843,"lon":-1.285245}}}
 }

and

{
      "_index" : "points",
      "_type" : "point",
      "_id" : "AVEaa4FrCKM7Hs_jae0e",
      "_score" : 1.0,
      "_source":{"point":[51.531011,-0.012336]}
}

But when running a query, I get the following;
QueryParsingException[[points] failed to find geo_point field [point]]

Parse.com is down

Good day !

Parse.com is down, can you please update code, to make query to ElasticSearch search ?

Thanks !

Question about the showCoverageOnHover

Hi,

First of all. This work is absolutely brilliant! Thank you very much for sharing the example.

I have a question related to the OnHover feature. When I move over a cluster Leftlet shows the bounds of its markers. However in your function "makePoints(aggs)" you make the markers based on the buckets "makePoints(r.aggregations.zoom.buckets);". For each bucket, you decode the key to get its center and create a marker with that center. The marker has count and sentiment.

var markerList = [];
        aggs.forEach(function(agg, index){
            //var obj = {};
            //obj.id = guid();
            //var bounds = geohash.decode_bbox(agg.key);
            var center = geohash.decode (agg.key);
            var avg = Math.ceil(agg.sentiment_avg.value)
            var myIcon = L.divIcon({ html: '<div class="clustergroup'+avg+' leaflet-marker-icon marker-cluster marker-cluster-medium leaflet-zoom-animated leaflet-clickable" tabindex="0" style="margin-left: -20px; margin-top: -20px; width: 40px; height: 40px; z-index: 233;"><div><span>'+agg.doc_count+'</span></div></div>' });
            var marker = L.marker(new L.LatLng(center.latitude, center.longitude),{icon:myIcon});
            marker.count = agg.doc_count;
            marker.sentiment = agg.sentiment_avg.value;
            marker.bindPopup(''+agg.doc_count);
            markerList.push(marker);
            /*obj.min = min;
            obj.max = max;
            obj.center = center;
            obj.count = agg.doc_count;
            points[obj.id] = obj;        */
        });
        markers.addLayers(markerList);

So, how is Leaflet able to show the bounds of the cluster elements?

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.