I have the following sql query:
SELECT town,latitude,longitude FROM coordinates
The following will return e.g
"California,10.02313,20.123213"
I am using the query results to place markers on gmaps. But if i have 10 markers for California, they will pile up, since the coordinates are the same.
What i want to add a (very small) random number to lat and lng so markers will appear inside california's limits but they wont pile up.
How can i add, lets say FLOOR(RAND() * 0.0030)+0.0040 to lat and lng so the result will be:
"1,California,10.02322,20.123254"
"2,California,10.02313,20.123213"
Notice the small change in coordinates, but still inside California's state limits(with very little variation)