Google map and defined target

I have seen article like:
Embellishing Your Google Map with CSS3 and jQuery
URL:http://www.sitepoint.com/embellishing-your-google-map-with-css3-and-jquery/

Is there possibility target like: target=_blank
var melburn = new google.maps.LatLng(XXX,YYY);
var mapOptions = {
zoom: 16,

I don’t understand. How do you intend to use this?

I’m testing various options to set map default parameters.

  1. When user clicks resource details page it will open another frame or window like: target=_blank.

  2. I like to set language which are supported
    http://support.google.com/maps/bin/answer.py?hl=en&answer=63471

  3. I like to set Filter of resources. Example: All tourist locations inside particular city like:

  var mapOptions = {
    zoom:      12,
    center:    melbourne,
    mapTypeId: google.maps.MapTypeId.ROADMAP//SATELLITE,HYBRID,TERRAIN

Is there possible to set filter?

Additional setttings:

  1. Dynamic Google Maps

How to set dynamic map from database (street addresses)?

Setting javascript file and its line:
center: new google.maps.LatLng(<?=$lat?>, <?=$lng?>),

Geo coder and pull data from database:


// get address from database
mysql_connect('host', 'user', 'pass');
mysql_select_db('dbname');
$address=str_replace(" ","+",$address);

$url = "http://maps.googleapis.com/maps/api/geocode/xml?address=".$address."&sensor=false";

# INITIATE CURL.
$curl = curl_init();

# CURL SETTINGS.
curl_setopt($curl, CURLOPT_URL,"$url");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);

# GRAB THE XML FILE.
$result = curl_exec($curl);

curl_close($curl);

# SET UP XML OBJECT.
$xml = new SimpleXMLElement($result);

$flag=0;
foreach ($xml->result->geometry as $item){
    if($flag==0){
    $lat=$item->location->lat;
    $lng=$item->location->lng;
    $flag=1;
    }
}

setcookie("lat",$lat, time()+3600*24);
setcookie("lng",$lng, time()+3600*24);

header("location: index20.php");

?>

Can be improved this PHP code?

Need help. Can be replied?