Guyz this what i wrote but markers didnt come up:
function load() {

if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GScaleControl());
map.addControl(new GMapTypeControl());
var x= map.getMapTypes();
    map.setMapType(x[1]);
        map.setCenter(new GLatLng(35.3417347, 33.3224344), 13);
        }
        }
        function createInfoMarker(point) {
   var marker = new GMarker(point);
        map.addOverlay(marker);
        }

        </script>
</head>

<body onload="load()">
<form name="farzad" action="testsearch.php" method="post">
<table align="center">
<tr>
<td>
<input type="text" name="name" />
<input type="hidden" id="ok" value="1" name="ok" />
<input name="sub" type="submit" id="sub" />
<?php
if ( $_REQUEST['ok']=="1")
{
$name=$_REQUEST['name'];
$sql="select * from info where Compname like '%".$name."%'";
echo $sql;
$result = mysql_query($sql) or die('Error, query failed');
                                while($row = mysql_fetch_array($result))
 {

$lat= $row ['lat'];
$log=$row ['log'];
?>
<script type="text/javascript">
var point = new GLatLng(<?php echo $lat ?>,<?php echo $log ?> )
createInfoMarker(point);
</script>
<?php
}
}
?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to