Search code examples
google-mapsdrupal-6cckgoogle-local-searchdrupal-gmap

How to get markers coordinates from GMAP into a Drupal CCK field?


I'd like to implement a GMAP into a Drupal 6 CCK form. I already have the GMAP module installed, and what I'd like to have is a CCK field in which coordinates from selected markers from GMAP are entered.

The ideal map would be one like this : http://code.google.com/apis/ajax/playground/#localsearch_with_markers. I have big issues on implementing this script into a form (don't know where (in a hook_form_alter() I suppose?), with (drupal_add_js('$js_code', 'inline') ?

So if I could have some experts advices, this would be awesome :-)

Thanks !


Solution

  • A combination of the Location module and GMap module will give you all of that functionality (plus an awful lot more) without a single line of code...it's got to be the way to go!