Bounty: USD $300
Module: Gmap Field http://drupal.org/project/gmapfield
Work to be done: View integration has been 'started'. Needs to be finished.

We need the Views Integration of the Gmap Field module finalised. At the moment it shows a map but does not center on or show the marker for the node. The current maintainer is unable to complete due to other business.

We need this done ASAP (it's always the way, isn't it!).

You can get in contact by messaging me here. We are a web design studio and use Drupal extensively but do not have skills to develop modules.

The post starting this issue is here, and a post afterwards contains an image of the issue:
http://drupal.org/node/332084#comment-3669248

Once fixed, this module can be released here to the public.

We have been established for over 10 years, are completely professional, and look forward to professional relationships with whoever picks this one up. Thank you.

Comments

jvizcarrondo’s picture

Unfortunately all the necessary fields to display the map are not views. A way to ensure the presence of locations fields is load node. Replace function _gmapfield_get_markers in gmapfield.module by:

<?php
/**
 * Function to get markers
 *
 * @params $node
 *  Node object loaded so far
 * @params $field
 *  Field data
 * @return
 *  Associative array to merge into a gmap array
 */
function _gmapfield_get_markers($node, $marker, $field) {
  $loc_data = array();

  // Check for datasource
  if ($field['coordinate_datasource'] == 'location') {
    // Check Markers
    $available_markers = gmap_get_marker_titles();
    if (!array_key_exists($marker, $available_markers)) {
      $marker = 'drupal';
    }
    $node = node_load($node->nid);
    // Check for locations
    if ($locations = $node->locations) {
      $count = 0;
      foreach ($locations as $l) {
        // Check for lat and long first
        if ($l['longitude'] != 0 && $l['latitude'] != 0) {
          // Add markers
          $loc_data['markers'][] = array(
            'text' => theme('gmapfield_markerwindow', $l, $node),
            'longitude' => (float) $l['longitude'],
            'latitude' => (float) $l['latitude'],
            'markername' => $marker,
            'offset' => $count,
          );
          // Set center if primary or first location
          if ($l['is_primary'] || $count == 0) {
            $loc_data['longitude'] = $l['longitude'];
            $loc_data['latitude'] = $l['latitude'];
          }
          $count += 1;
        }
      }
    }
  }
  elseif ($field['coordinate_datasource'] == 'cck_fields') {
    $loc_data = array();
  }
  return $loc_data;
}

?>

hoping to help
Juan

petarb’s picture

Thanks Juan
Testing in around an hour.
Regards, Petar

petarb’s picture

Testing has commenced, looks good so far, will finalise reporting soon.
Regards, Petar

huyviptranphu’s picture

After some testing, this solutions works as expected.
Thanks to Juan for some quick work!

petarb’s picture

After some testing, this solutions works as expected.
Thanks to Juan for some quick work!
Juan I am about to message you for payment details.
Regards, Petar

jvizcarrondo’s picture

Petar Belic for Renelt Belic Design paid Bounty as offered
Juan