andunslg / Sith

Sith - Perception Capturing and Analysis Platform
3 stars 0 forks source link

Self HeatMap Is Broken #69

Closed andunslg closed 10 years ago

andunslg commented 10 years ago

Getting following error,

/home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/connection/server.js:594 throw err; ^ MongoError: exception: JavaScript execution failed: TypeError: Cannot read property 'lat' of undefined near 'ngLocation.lat.toFixed(4)' (line 2) at Object.exports.toError (/home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/utils.js:108:11) at /home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/collection.js:1229:29 at args.(anonymous function) (/home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/nodetime/lib/core/proxy.js:131:20) at null. (/home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/db.js:1659:20) at g (events.js:175:14) at EventEmitter.emit (events.js:106:17) at Server.Base._callHandler (/home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/connection/base.js:410:25) at /home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/connection/server.js:580:20 at MongoReply.parseBody (/home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:131:5) at null. (/home/andun/Sith/Sith_Code/Sith/NodeApi/node_modules/mongodb/lib/mongodb/connection/server.js:538:22)

Error is coming from,

roundlat = this.latLngLocation.lat.toFixed(4); of mapReduce.js

sachintharajith commented 10 years ago

Now this is resolved. But if the location is stored in db as "latLngLocation" the exception might occur. I saw some early documents where location is store as that. Now it is stored as "latLng"

Also I fixed some client side issues in this map. There is a problem of the perception schema. Since this map is not bound to an event it should be available for master perception schema. But now its available only for few perception. Thilini work on the rest of the schema... Do it with the existing API, I'll give a better performing API method later :D

sachintharajith commented 10 years ago

Also Thilini remove the Sahara dessert behavior please....