hi
thanks man for your link
i have some doubts
1. i need to display the users within the 5kms once map loaded.thats
why i change the code
this is the function which is use to get the address from user.
function searchLocations() {
var address = document.getElementById('addressInput').value;
geocoder.getLatLng(address, function(latlng) {
if (!latlng) {
alert(address + ' not found');
} else {
searchLocationsNear(latlng);
}
i do some like that
var address =" select address from markers where id=1'";
from distance setting i make a change php file
$query = sprintf("SELECT street, name, latitude, longitude, ( 3959 *
acos( cos( radians('$center_lat') ) * cos( radians( latitude ) ) *
cos( radians( longitude ) - radians('$center_lng') ) +
sin( radians('$center_lat') ) * sin( radians( latitude ) ) ) ) AS
distance FROM location HAVING distance < 5 ORDER BY distance LIMIT
0 , 20",
note:
markers table contains id,name,address,latitude and longitude datas.
while execute the query map loaded but user marker not display what i
am expect.can u check it post your suggestion.
thanks
On May 15, 2:12 pm, Rossko <[email protected]> wrote:
> > user details must be stored in table.This table contains
> > name ,address, latitude and longitude details.using this details i am
> > trying to plot the users in the map.user status table is available
> > for checking the user whether it is online or offline.
>
> That's straightforward. Use the techniques given in the
> examplehttp://code.google.com/apis/maps/articles/phpsqlsearch.html
> modified to suit whichever database you might want to use, and written
> in whatever server-side code you have available and understand.
>
> > instead of search address text box.i need display the user who
> > available at the radius within 5km which is based on the currently
> > logged user latitude and longitude.
>
> Wherever this mysterious logged data is, get it to the server side
> search script. Modify the client-side code from the example to remove
> the search box.
>
> > And i need to display the each user with different color marker for
> > differentiate the user.
>
> Add some 'online/offline' attribute to your data, and use the
> technique in this examplehttp://econym.org.uk/gmap/basic16.htm
> to show as red or green markers or whatever.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/google-maps-api?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.