google map API not working.....

Posted by Ankitsrist under ASP.NET on 1/8/2013 | Points: 10 | Views : 1583 | Status : [Member] | Replies : 3
hey m trying to embed Google Map API, i hav obtained key for this nd write the following code still it is not displayng map.......please help

<%@ Page Language="C#" MasterPageFile="~/nationalmaster.master" AutoEventWireup="true" CodeFile="contactus.aspx.cs" Inherits="contactus" Title="::contact us::" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type ="text/javascript" language ="javascript">
function initialize()
{
var mapProp = {
center: new google.maps.LatLng(51.508742,-0.120850),
zoom:7,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
}
function loadScript()
{
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?key=AIzaShjutjI1U1gggksyutyrbtgsQq8hCqerwdhhfjdxs7ZuPcM&sensor=false&callback=initialize";
document.body.appendChild(script);
}
</script>
<div class ="googlemap" style =" width :500px ; height :500px">
<asp:Button ID="Button1" runat="server" OnClientClick ="return loadScript();" Text="view map" /></div>
</asp:Content>





Responses

Posted by: Nisar87 on: 1/14/2013 [Member] Starter | Points: 25

Up
0
Down
Hello
i have implemented the sample code of google map.
you can check it from following link
http://www.dotnetobject.com/Thread-Google-Map-in-asp-net

_______________________________________
Nisar Ahmad
http://www.dotnetobject.com/

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kumaran1987 on: 4/4/2013 [Member] Starter | Points: 25

Up
0
Down
http://www.kumaran198726.com/2013/04/show-your-current-location-in-google.html

see here

Happy Coding,

Your Regards,
Kumaran K

Kumaran K

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankitsrist on: 4/4/2013 [Member] Starter | Points: 25

Up
0
Down
thanks Kumaran1987 sir realy helpfull

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response