Advertisement
Guest User

Untitled

a guest
Oct 24th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <style>
  4. h1{
  5. font-family:"Bahnschrift";
  6. }
  7. form{
  8. font-family:"Lucida Console";
  9. }
  10. </style>
  11. <body style="background-color:#282a36;">
  12. <script src="http://gstatic.com/firebase/7.2.1/firebase-app.js"></script>
  13. <script src="http://gstatic.com/firebase/7.2.1/firebase-database.js"></script>
  14. <h1>Find Your Phone without GPS!</h1>
  15. <button type="button" onclick="loadDoc()">Submit</button>
  16. <div id="googleMap" style="width:100%;height:600px;"></div>
  17. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  18. <script>
  19. var lat = 39.56764858;
  20. var long = -105.00733121;
  21. function myMap() {
  22. var mapProp= {
  23. center:new google.maps.LatLng(lat,long),
  24. zoom:10,
  25. };
  26. var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
  27. var contentstring = '<p>123</p>';
  28. var infowindow = new google.maps.InfoWindow({
  29. content:contentstring
  30. });
  31.  
  32. var pos = {lat: lat, lng: long};
  33. var marker = new google.maps.Marker({
  34. position: pos,
  35. map: map,
  36. title: "here"
  37. });
  38. marker.addListener('click', function() {
  39. infowindow.open(map, marker);
  40. });
  41. }
  42. function loadDoc(){
  43. var settings = {
  44. "async": true,
  45. "crossDomain": true,
  46. "url": "https://us1.unwiredlabs.com/v2/process.php",
  47. "method": "POST",
  48. "headers": {},
  49. "processData": false,
  50. "data": "{\"token\": \"f889a207d1ec50\",\"radio\": \"lte\",\"mcc\": 505,\"mnc\": 3,\"cells\": [{\"lac\": 533,\"cid\": 99701450}],\"address\": 1}"
  51. }
  52. $.ajax(settings).done(function (response) {
  53. console.log(response);
  54. lat = response.lat;
  55. long = response.lon;
  56. myMap();
  57. });
  58. }
  59. </script>
  60. <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC3TuCGGqMxqe9jbIH2dfYBPVLezyJK0B8&callback=myMap"></script>
  61. </body>
  62. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement