(err)
| 118 | } |
| 119 | |
| 120 | function 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 | |
| 133 | function setUserLocation(lat, lng) { |
| 134 | userLocation = new google.maps.LatLng(lat, lng); |
nothing calls this directly
no test coverage detected