mapMarker - Google Maps coordinate picker example

The mapMarker element helps picking an exact coordinate using Google Maps and the Maptimize AddressChooser JavaScript addon. The element supports both Google Maps API v2 and v3.

Finding the location is made easier using an optional quicksearch field. You can also tie other form fields (eg. address, city, country, etc) to this element using several settings, which then will be used to help finding the location automatically. The autocomplete feature uses the geocoding services provided by Google Maps API.

For the best results, it's possible to drag and drop the marker itself, which makes entering locations a breeze.

This element also features a fallback (noscript) layout, when manual lat/lng values may be entered.

The live form - submit it!


Turn on JavaScript in your browser to use Google Maps instead of typing coordinates!

Data dump

Below are the dumps of some PHP variables - submit the form to see the changes!

Contents of the $_POST array:
$_POST = array (
)

Results of a $clonefish->getElementValues() call:
array (
  'coordinates' => NULL,
)

There are cases when the above arrays are different. This is not a bug, but a feature: clonefish was written to help with everyday form hassles (like avoiding the missing value of an unchecked checkbox or compiling the whole date string from date selector fields).