title: Mark a location by location google maps v3
body: <p>I want to provide a feature like user will provide a city,state and country. Then my aim is to mark the location provided by the user on the google maps.</p>
  
  <p>My code is:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)"&gt;
      &lt;meta name="dcterms.created" content="Tue, 08 Jan 2013 05:31:17 GMT"&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="keywords" content=""&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;?php
  // get and breakdown the results then store them in $var's
  $Address = "99999 parkplace, new york, NY";
  $urladdress = urlencode($Address);
  $Base_url = "http://maps.google.com/maps/geo?q=";
  $urlParts = "&amp;output=xml";
  $urlrequest = $Base_url . $urladdress . $urlParts;
  $xml = simplexml_load_file($urlrequest);
  $num = "0";
  $value=$xml-&gt;Response-&gt;Placemark;
      $GeoFindAdd{$num} = $value-&gt;address;
      $GeoFindCords{$num} = $value-&gt;Point-&gt;coordinates;
  ?&gt;
      &lt;script
  src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&amp;sensor=false"&gt;
  &lt;/script&gt;
      &lt;script&gt;
          var myCenter=new google.maps.LatLng(&lt;?php echo $GeoFindCords{$num}; ?&gt;);
  
  function initialize()
  {
  var mapProp = {
    center:myCenter,
    zoom:5,
    mapTypeId:google.maps.MapTypeId.ROADMAP
    };
  
  var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
  
  var marker=new google.maps.Marker({
    position:myCenter,
    });
  
  marker.setMap(map);
  }
  
  google.maps.event.addDomListener(window, 'load', initialize);
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
  &lt;div id="googleMap" style="width:500px;height:380px;"&gt;&lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The output of the code is</p>
  
  <p><a href="http://wfs-01.wapka.mobi/300030/300030787_6850a0ae9a.png" rel="nofollow noreferrer">http://wfs-01.wapka.mobi/300030/300030787_6850a0ae9a.png</a></p>
  
  <p>Is there something wrong i am doing? Or any other way to mark the location by providing location.</p>
  
  <p>Thanks.</p>