@@ 233-245 (lines=13) @@ | ||
230 | return $toptrainer; |
|
231 | } |
|
232 | ||
233 | public function getPokemonHeatmap($pokemon_id, $start, $end) |
|
234 | { |
|
235 | $where = ' WHERE pokemon_id = '.$pokemon_id.' ' |
|
236 | ."AND FROM_UNIXTIME(expire_timestamp) BETWEEN '".$start."' AND '".$end."'"; |
|
237 | $req = 'SELECT lat AS latitude, lon AS longitude FROM sightings'.$where.' LIMIT 100000'; |
|
238 | $result = $this->mysqli->query($req); |
|
239 | $points = array(); |
|
240 | while ($data = $result->fetch_object()) { |
|
241 | $points[] = $data; |
|
242 | } |
|
243 | ||
244 | return $points; |
|
245 | } |
|
246 | ||
247 | public function getPokemonGraph($pokemon_id) |
|
248 | { |
@@ 207-219 (lines=13) @@ | ||
204 | return array(); |
|
205 | } |
|
206 | ||
207 | public function getPokemonHeatmap($pokemon_id, $start, $end) |
|
208 | { |
|
209 | $where = ' WHERE pokemon_id = '.$pokemon_id.' ' |
|
210 | ."AND FROM_UNIXTIME(expire_timestamp) BETWEEN '".$start."' AND '".$end."'"; |
|
211 | $req = 'SELECT lat AS latitude, lon AS longitude FROM pokemon'.$where.' LIMIT 100000'; |
|
212 | $result = $this->mysqli->query($req); |
|
213 | $points = array(); |
|
214 | while ($data = $result->fetch_object()) { |
|
215 | $points[] = $data; |
|
216 | } |
|
217 | ||
218 | return $points; |
|
219 | } |
|
220 | ||
221 | public function getPokemonGraph($pokemon_id) |
|
222 | { |