Skip to content
Commit a6ae3a4a authored by Brandon Bergren's avatar Brandon Bergren
Browse files

Add a way to bind controls that we aren't able to set the id/classes on from the Drupal side.

This lets us work around the fact that gmap_widget_setup() completely fails to work on CCK fields.

Example:
<code>
  $remap = array(
    'edit-field-latitude-0-value' => array('classes' => array('gmap-locpick_latitude'), 'id' => 'gmap-loc0-locpick_latitude0'),
    'edit-field-longitude-0-value' => array('classes' => array('gmap-locpick_longitude'), 'id' => 'gmap-loc0-locpick_longitude0'),
    'edit-field-address-0-value' => array('classes' => array('gmap-locpick_address'), 'id' => 'gmap-loc0-locpick_address0'),
  );
  drupal_add_js(array('gmap_remap_widgets' => $remap), 'setting');

  /* ... stuff copied from gmap_set_location(), etc... */
</code>
parent 5a24a253
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment