Jump to content

How to plot points on a Google map?


skaterdav85

Recommended Posts

What is the best way to plot points on a Google map? I have a bunch of addresses (about 300) stored in my database, and right now I am outputting each address into a JS array and plotting each address by looping over the array and running a function that geocodes the address and creates a new marker. However, I'm not sure if that is the best approach. Any thoughts? My guess is that my current solution is not the most efficient...

Link to comment
Share on other sites

Saving my dynamic content to an xml file and then parsing that xml file seems like another solution. Do you think my first approach (loading my dynamic content into a huge JS array) would be bad practice or have some effect on performance compared to parsing an XML document in JS? The only drawback I can see of my first approach was that I could have a huge array in my code. But parsing an XML document seems like it could take more work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...