Server IP : 103.6.199.200 / Your IP : 3.149.235.171 Web Server : Microsoft-IIS/10.0 System : Windows NT EMPUSA 10.0 build 20348 (Windows Server 2016) i586 User : EMPUSA$ ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Domains/tradepan/eup4u.com/wwwroot/ |
Upload File : |
<%@ page language="C#" autoeventwireup="true" inherits="Map, App_Web__ulh3fih" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Map</title> <script type="text/javascript"> function showLocation(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; var latlongvalue = position.coords.latitude + "," + position.coords.longitude; var img_url = "https://maps.googleapis.com/maps/api/staticmap?center=" +latlongvalue+"&zoom=14&size=400x300&key =AIzaSyAa8HeLH2lQMbPeOiMlM9D1VxZ7pbGQq8o"; document.getElementById("mapholder").innerHTML = "<img src='"+img_url+"'>"; } function errorHandler(err) { if(err.code == 1) { alert("Error: Access is denied!"); } else if( err.code == 2) { alert("Error: Position is unavailable!"); } } function getLocation2(){ if(navigator.geolocation){ // timeout at 60000 milliseconds (60 seconds) var options = {timeout:60000}; navigator.geolocation.getCurrentPosition (showLocation, errorHandler, options); } else{ alert("Sorry, browser does not support geolocation!"); } } </script> <style> #map { height: 100%; } html, body { height: 100%; margin: 0; padding: 0; } </style> </head> <body> <form id="form1" runat="server"> <div id="mapholder"></div> <div id="map"></div> <div> <input type="button" onclick="getLocation();" value="Get Location"/> </div> <button onclick="getLocation()">Try It</button> <p id="demo"></p> <script> var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.watchPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { x.innerHTML="Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; var elText = document.getElementById("TextBox1"); elText.value= position.coords.latitude + ', ' + position.coords.longitude; } getLocation(); </script> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:TextBox ID="TextBox1" runat="server" Width="100%" BorderStyle="None" ></asp:TextBox> </form> </body> <script async defer src="https://maps.googleapis.com/maps/api/js?key=****************&callback=initMap"></script> </html>