Forum Moderators: open
What i want now is to show this data both on the map and on a list on the side of the map. This leaves me with the question "What is the best way to achieve that?"
The options i have come up with so far are:
A. Myplaces.php generates the html for the list on the side of the map. The associative array with the data gets encoded on a json string, which is passed via onload function to javascript, and javascript takes care of showing these places on the map. I have a little problem doing that when using jquery though cause i cant pass this string at $(document).ready() function...Or can I?
B. Myplaces.php generates just two empty divs, one for the map and one for the list. Then at onload function i make an ajax call and the response is an hml string to be put in the list div and an json string to be manipulated for the map. I could use only the json string to create the html by using javascript and DOM for the list div if i wanted...
C. Myplaces.php generates the html for the list on the side of the map. In addition myplaces.php generates the javascript code, instantiating an array of objects (as if someone hard coded it), each representing one point.
Any ideas would be appreciated!
Thanks