I wanna set up a way in which users can place a marker on the map to tell their address and i should be able to extract the lat and long and store it in the database.
Is there somekinda plugin which i can modify and use ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First create a function that a accepts a latlng object. This function will add the info to your database and then add the marker if it was successful.
Then add an event listener on the click event of the map that calls the function you just created. Add this to your map initialize code.
Now when your map is clicked add_restaurant will be called with the latlng of the click event on the map.