Using form api to store google map location Is it possible to use form api (write codes) to display and store google map Latitude and Longitude? Most of the modules available is to add new google map field to drupal content type.
I don't want to use drupal content type to store as a node. i wish to store the location using db_insert.
Thanks
Yes, there are couple of ways of doing this. You would need to install Geofield which has a Form API element that can be used as such:

$form['location'] = array(
  '#type' =&gt; 'geofield_latlon',
  '#title' =&gt; t('Location'),
);


That'll give you a start to work from. I'm looking at embedding a clickable Google map using the GMap module as follows:

$form['contact_us']['map'] = array(
  '#description' =&gt; t('Enter your location to be displayed as a Google map.'),
  '#type' =&gt; 'gmap',
  '#title' =&gt; t('Location'),
  '#settings' =&gt; array(
    'zoom' =&gt; 8,
    'id' =&gt; 'location_map',
  ),
);


It shows the map however that is about all, so far. But it's another starting point for you!