<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Show or Integrate Google Maps in asp.net webapplication</title>
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC6v5-2uaq_wusHDktM9ILcqIrlPtnZgEk&sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var myLatlng= new
google.maps.LatLng(-34.397, 150.644)
var mapOptions = {
center: myLatlng,
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP,
marker:true
};
var map = new
google.maps.Map(document.getElementById("map_canvas"),mapOptions);
}
</script>
</head>
<body onload="initialize()">
<form id="form1"
runat="server">
<div id="map_canvas"
style="width: 500px; height: 300px"></div>
</form>
</body>
</html>
|
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=Your_API_Key&sensor=SET_TRUE_OR_FALSE">
|
sensor parameter of the
URL must be included, it indicates whether this application uses a sensor (such
as a GPS locator) to determine the user's location for that reason you must set this value to either true or false explicitly|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|

Subscribe by RSS
Subscribe by Email
8 comments :
Thankyou. Good job. I lIke to integrate the same for the mobile. I mean mobile browser. Is there any chnage in the code for making it mobile compatable. Pls my email saheem.pn@gmail.com
Thank u sir....very nice
boss its great you have protected the image with copy scape,we are unable to copy the image but able to save it tell me the process in order to stop both..
Sir,I am not getting output but i am not getting any issues with it...can u plzz help???
@anonymous: disable right click in the site..
In this code,what is the use of (-34.397, 150.644)?
please reply me!!!
Kachhadiya Bhavesh
these are latitude and longitude of location.