{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/leaflet-knn/issues/9","repository_url":"https://api.github.com/repos/mapbox/leaflet-knn","labels_url":"https://api.github.com/repos/mapbox/leaflet-knn/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/leaflet-knn/issues/9/comments","events_url":"https://api.github.com/repos/mapbox/leaflet-knn/issues/9/events","html_url":"https://github.com/mapbox/leaflet-knn/issues/9","id":179783530,"number":9,"title":"[FAQ] understanding nearest value ","user":{"login":"kirantpatil","id":1178055,"avatar_url":"https://avatars.githubusercontent.com/u/1178055?v=3","gravatar_id":"","url":"https://api.github.com/users/kirantpatil","html_url":"https://github.com/kirantpatil","followers_url":"https://api.github.com/users/kirantpatil/followers","following_url":"https://api.github.com/users/kirantpatil/following{/other_user}","gists_url":"https://api.github.com/users/kirantpatil/gists{/gist_id}","starred_url":"https://api.github.com/users/kirantpatil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirantpatil/subscriptions","organizations_url":"https://api.github.com/users/kirantpatil/orgs","repos_url":"https://api.github.com/users/kirantpatil/repos","events_url":"https://api.github.com/users/kirantpatil/events{/privacy}","received_events_url":"https://api.github.com/users/kirantpatil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-28T14:09:10Z","updated_at":"2016-09-28T14:09:10Z","closed_at":null,"body":"Hi,\r\n\r\nI am using leaflet-knn as below.\r\n\r\nvar myLines = [{\r\n        \"type\": \"Point\",\r\n        \"coordinates\": [[-105, 40], [-110, 45], [-101, 55]]\r\n}];\r\n\r\nvar gj = L.geoJson(myLines);\r\n\r\nvar nearest = leafletKnn(gj).nearest(L.latLng(38, -78), 2);\r\n\r\nconsole.log(nearest );\r\n\r\nThe result nearest coordinates are as shown in screenshot: [-105, 40],  [-101, 55]\r\n\r\nWhy it did not pick [-110, 45] ? \r\n\r\nSince its lat value is less than 55.\r\n\r\nPlease help me to understand the behaviour.\r\n\r\n![screenshot from 2016-09-28 19 33 16](https://cloud.githubusercontent.com/assets/1178055/18916677/d666c406-85b2-11e6-9ebc-cb1ae20d3212.png)\r\n\r\n![screenshot from 2016-09-28 19 32 34](https://cloud.githubusercontent.com/assets/1178055/18916678/d691e474-85b2-11e6-86db-5015d6d0af03.png)\r\n\r\nThanks.\r\n"}}
{"actor":{"display_login":"kirantpatil"}}