MCPcopy Index your code
hub / github.com/PokemonGoF/PokemonGo-Bot / useRandomLocation

Function useRandomLocation

map-chat/javascript/map.js:120–131  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

118}
119
120function useRandomLocation(err) {
121 Materialize.toast('User location problem, using random location :P', 7000);
122 // These ranges cover only the center of the map
123 var lat = (90 * Math.random() - 22.5).toFixed(3);
124 var lng = (180 * Math.random() - 90).toFixed(3);
125 onFirstPosition({
126 "coords": {
127 latitude: parseFloat(lat),
128 longitude: parseFloat(lng)
129 }
130 });
131}
132
133function setUserLocation(lat, lng) {
134 userLocation = new google.maps.LatLng(lat, lng);

Callers

nothing calls this directly

Calls 1

onFirstPositionFunction · 0.85

Tested by

no test coverage detected