I just wondered if anyone knew of a simple script available that will do the following:
Load a google map in view, when clicked it displays a marker that will save the lat and long values to a variable?
Does anyone know if something like this already exists in PHP?
Thanks in advance
Perhaps you are looking for something similar to this Latitude-Longitude Finder Tool. The example code
iswas API v2. Below is trimmed down version of the code using Google Maps API v3:Demo
Explanation: you must set the
draggableproperty of the marker to true. You can then hook a callback function to that marker’sdragendevent; the new co-ordinates are passed to the function and you can assign them to a JavaScript variable or form field.