To show the google map in our website using javascript, first we need to register Google map API and need to provide the API key in the below code.
<div id="map" style="width: 400px; height: 300px"></div>
<script type="text/javascript"> <script src="http://maps.google.com/maps?file=api&v=1&key=REGISTERED_API_KEY_HERE" type="text/javascript"></script>
var map = new GMap(document.getElementById("map"));
var point = GPoint(17.0477624,80.0981869);
var address = 'L.B.Nagar | Hyderabad';
var mark = createInfoMarker(point, address);
map.addOverlay(mark);
function createInfoMarker (point, address) {
var marker = new GMarker(point);
map.centerAndZoom(point, 3);
GEvent.addListener(marker, "click",
function() {
marker.openInfoWindowHtml(address);
}
);
return marker;
}
</script>
&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;iframe src="http://www.s2d6.com/x/?x=i&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;z=i&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;v=3783588&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;r=1&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;k=[NETWORKID]" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" width="120" height="60"&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;ilayer src="http://www.s2d6.com/x/?x=i&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;z=i&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;v=3783588&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;r=1&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;k=[NETWORKID]" z-index="0" width="120" height="60""&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href="http://www.s2d6.com/x/?x=c&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;z=s&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;v=3783588&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;r=1&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;k=[NETWORKID]" target="_blank"&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;img src="http://www.s2d6.com/x/?x=i&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;z=s&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;v=3783588&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;r=1&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;k=[NETWORKID]" border="0" alt="Click here"&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/ilayer&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/iframe&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
No comments:
Post a Comment