Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Google Maps API 3

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
pr_4u
Smarty n00b


Joined: 30 Jul 2012
Posts: 2

PostPosted: Mon Jul 30, 2012 3:49 pm    Post subject: Google Maps API 3 Reply with quote

Hi i am using smarty for my website,I want to insert google map API v3 in my site ...how do i convert following HTML code to smarty template.
here is my code.

GV3.HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Google Map Test </TITLE>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize()
{
var latlng = new google.maps.LatLng(9.931544168615512,76.27632894178791);
var opt =
{
center:latlng,
zoom:10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableAutoPan:false,
navigationControl:true,
navigationControlOptions: {style:google.maps.NavigationControlStyle.SMALL },
mapTypeControl:true,
mapTypeControlOptions: {style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}
};
var map = new google.maps.Map(document.getElementById("map"),opt);
var marker= new google.maps.Marker({
position: new google.maps.LatLng(9.931544168615512,76.27632894178791),
title: "CodeGlobe",
clickable: true,
map: map
});


var infiwindow = new google.maps.InfoWindow(
{
content: " I am here! "

});


google.maps.event.addListener(marker,'mouseover',function(){
infiwindow.open(map,marker);
});
google.maps.event.addListener(marker,'mouseout',function(){
infiwindow.close(map,marker);
});


}
function test(event)
{

alert( event.latLng.lat());
alert(event.latLng.lng());

}
</script>
<style type"text/css">
#map{
width:500px;
height:500px;
float:left;
position:absolute;
left:300px;
top:200px;

}
</style>
</HEAD>

<BODY onload="initialize();">
<div id="map" >

</div>
</BODY>
</HTML>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP