ARRAY – straightforward question?

Hi,

I’ve got a database that outputs markers on a google map project. The
problem I am encountering is that some businesses have been located the same
latitude and longitude, therefore markers don’t show (others are underneath
the top one). So, I need to get this MySQL output, parse it through an array
creating an output such as

(-0.28183499,51.37974167), biz1 biz2 biz3
(-0.28301400,51.38087463), biz4
(-0.28151301,51.38144684), biz5
(-0.28693399,51.38250351), biz6
(-0.28626299,51.38276672), biz7
(-0.29334599,51.38436890), biz8 biz9 biz10
(-0.29725999,51.38850021), biz11 biz12
(-0.29800400,51.38896179), biz13 biz14

Here’s an example of my input data as it is at the moment ..

(-0.28183499,51.37974167), biz1
(-0.28183499,51.37974167), biz2
(-0.28183499,51.37974167), biz3
(-0.28301400,51.38087463), biz4
(-0.28151301,51.38144684), biz5
(-0.28693399,51.38250351), biz6
(-0.28626299,51.38276672), biz7
(-0.29334599,51.38436890), biz8
(-0.29334599,51.38436890), biz9
(-0.29334599,51.38436890), biz10
(-0.29725999,51.38850021), biz11
(-0.29725999,51.38850021), biz12
(-0.29800400,51.38896179), biz13
(-0.29800400,51.38896179), biz14

I already sort the data by latitude, so they will always be next to each
other. But I am going to be writing this using AJAX and need the fastest
solution possible. There could be hundreds needed to be parsed in a split
second.

Thanks for any pointers.

Leave a Reply

Your email address will not be published. Required fields are marked *