Thinking of using an Array, is this best practice? Help!

Thinking of using an Array, is this best practice? Help!

I basically have a static map using gmaps3.net. It has 3 address points which work wonderfully. Now I need to grab them from the database and append them. I am OK to do this, but I think I need to put it into an array and somehow bind the results to the 'values' section. 

Whenever I change views I will destroy the map and re-create it, outputting the below logic: I just need to somehow get the address fields dynamically and inject them in. What would the best way forward be? Are you able to give me a few snippets? 

Thanks gurus! 



$('#test1').gmap3({
          map:{
            options:{
              center:[46.578498,2.457275],
              zoom: 5
            }
          },
          marker:{             

            values:[
              {latLng:[48.8620722, 2.352047], data:"Paris !"},
              {address:"xxx, xxx, xxx", data:"Poitiers : great city !"},
              {address:"xxx, xxx, xxx", data:"Perpignan ! <br> GO USAP !", options:{icon: "http://maps.google.com/mapfiles/marker_green.png"}},
              {address:"xxx, xxx, xxx", data:"<a href='#tabstrip-home'>Click here to go home</a>", options:{icon: "http://maps.google.com/mapfiles/marker_green.png"}}

            ],