JQuery google map issue

JQuery google map issue

Hi All,
I am not sure what I am doing wrong here. I have a hidden field in my page and trying to pull the value from that field and utilize it to populate markers. The hidden field contains this value -
  1. {latitude: -33.352222, longitude: 116.226675, html: "STOCKTON WEST" },{latitude: -32.5878758, longitude: 118.6554654, html: "DOWN ROAD" },{latitude: -32.42342342, longitude: 121.842342, html: "CAMEL LAKE" },{latitude: -32.4545643, longitude: 118.535344, html: "BLUE GUM CREEK" },{latitude: -32.2343223, longitude: 119.42323432, html: "GLEDHOWE" },{latitude: -32.654376, longitude: 121.765547567, html: "HASSELL" },{latitude: -32.12345654, longitude: 118.53437565, html: "STOCKTON EAST" }

Here is my javascript code -

  1. <script type="text/javascript">
  2.  $(function() {

  3. var loc = document.getElementById("LOCATION").value;
  4.  // alert(loc); 
  5. $("#map").gMap({

  6.                 markers: [loc],
                    zoom: 14


  7. }); 
  8. });

  9. </script> 

But if I use this code, it works -
  1. <script type="text/javascript"> 
  2. $(function() {
  3. var loc = document.getElementById("P179_LOCATION").value;
  4. // alert(loc);
  5.     $("#map").gMap({ markers: [{latitude: -33.352222, longitude: 116.226675, html: "STOCKTON WEST" },{latitude: -32.5878758, longitude: 118.6554654, html: "DOWN ROAD" },{latitude: -32.42342342, longitude: 121.842342, html: "CAMEL LAKE" },{latitude: -32.4545643, longitude: 118.535344, html: "BLUE GUM CREEK" },{latitude: -32.2343223, longitude: 119.42323432, html: "GLEDHOWE" },{latitude: -32.654376, longitude: 121.765547567, html: "HASSELL" },{latitude: -32.12345654, longitude: 118.53437565, html: "STOCKTON EAST" }],
                      zoom: 14 });
  6.   }); 

  7.  </script>   


Can any body help me with any idea???

Cheers,
Tajuddin