Including Google Maps in my custom module So, to set the stage, I'm working on a small database project that will handle a company's order handling.
So far, I have a fully working client part where users can get a full list of all the clients and can edit/delete/add clients at will.

The next think that I'm trying to implement, is that each client will also have it's own details page, where more details of the client will be displayed. It should display all the data in the database regarding the specific client, but it should also incorporate a Google Map based on the client's address.

I've looked around and found a dozen of Google Maps modules, but they only seem to work with article types that have fields that contain an address.

My current line of thinking was just to render the detail page with a render array after getting all the client's info from my database. 

1) Is this the correct way of doing it? If not, how should I approach this?

2) If yes, how can I then implement a google map?

EDIT:

The thing is, I'm not exactly working with a content type at the moment. I'm using hook_menu for all my pages, and an example callback function for displaying a full list of all the clients is

function expoline_clients_overview() {
    // Table settings.
  $attributes['datatable_options'] = array(
    'bFilter'   =&gt; TRUE,
    'bInfo'     =&gt; TRUE,
  );
  // Define table columns
  $header = array(
    array(
      'data' =&gt; t('Column 1'),
      'datatable_options' =&gt; array(
        'bSortable' =&gt; TRUE,
        'bSearchable' =&gt; TRUE,
      ),
    ),
    array(
      'data' =&gt; t('Column 2'),
      'datatable_options' =&gt; array(
        'bSortable' =&gt; TRUE,
        'bSearchable' =&gt; TRUE,
      ),
    ),
    array(
      'data' =&gt; t('Column 2'),
      'datatable_options' =&gt; array(
        'bSortable' =&gt; TRUE,
        'bSearchable' =&gt; FALSE,
      ),
    ),
    array(
      'data' =&gt; t('Column 2'),
      'datatable_options' =&gt; array(
        'bSortable' =&gt; TRUE,
        'bSearchable' =&gt; TRUE,
      ),
    ),
    array(
      'data' =&gt; t('Column 2'),
      'datatable_options' =&gt; array(
        'bSortable' =&gt; TRUE,
        'bSearchable' =&gt; TRUE,
      ),
    ),
    array(
      'data' =&gt; t('Column 2'),
      'datatable_options' =&gt; array(
        'bSortable' =&gt; TRUE,
        'bSearchable' =&gt; TRUE,
      ),
    ),
    array(
      'data' =&gt; t('Column 2'),
      'datatable_options' =&gt; array(
        'bSortable' =&gt; TRUE,
        'bSearchable' =&gt; TRUE,
      ),
    ),
  );

  /*
   * Fetch all clients from the database and insert them into the array of rows
   * that will be rendered in the table
  */
  $query = db_query("SELECT * FROM {expoline_clients}");
  foreach ($query as $currentclient) {
    unset($client);
    $client[] = $currentclient-&gt;name;
    $client[] = $currentclient-&gt;street;
    $client[] = $currentclient-&gt;street_number;
    $client[] = $currentclient-&gt;postal_code;
    $client[] = $currentclient-&gt;city;
    $client[] = '&lt;a href="clients/' . $currentclient-&gt;cid . '/edit"&gt;&lt;button type="button"&gt;Edit&lt;/button&gt;&lt;/a&gt;';
    $client[] = '&lt;a href="clients/' . $currentclient-&gt;cid . '/delete"&gt;&lt;button type="button"&gt;Delete&lt;/button&gt;&lt;/a&gt;';
    $clients[] = $client;
  }
  $rows = $clients;

  // Render the Datatable
  $variables = array(
    'attributes' =&gt; $attributes,
    'header' =&gt; $header,
    'rows' =&gt; $rows,
  );
  $output = theme('datatable', $variables);

  return $output . '&lt;a href="clients/add"&gt;&lt;button type="button"&gt;' . t('Klant toevoegen') . '&lt;/button&gt;&lt;/a&gt;';
}


Thanks a bunch!
I didn't dig into the exact methods you are using, but if all you want to do is embed a very simple map graphic you could use something like this:

if (isset($currentclient-&gt;street_number) &amp;&amp; isset($currentclient-&gt;street)) {
      $address_var = $currentclient-&gt;street_number . " " . $currentclient-&gt;street;
      if (isset($currentclient-&gt;city)) $address_var .= "+".$currentclient-&gt;city;
      if (isset($currentclient-&gt;state)) $address_var .= "+".$currentclient-&gt;state;
      if (isset($currentclient-&gt;postal_code)) $address_var .= "+".$currentclient-&gt;postal_code;
      $address_var = str_replace(' ', '+', $address_var);
      $output = "&lt;a href='https://maps.google.com?daddr=".$address_var."'&gt;&lt;img style='float: right; ' src='https://maps.googleapis.com/maps/api/staticmap?center=".$address_var."&amp;zoom=15&amp;size=300x150
&amp;markers=color:blue%7Clabel:*%7C".$address_var."' /&gt;&lt;/a&gt;";
    }


Or, I suppose a render array would simply change the $output= line above to be something like this:

$output =  array(
    'map' =&gt; array(
      '#type' =&gt; 'markup',
      '#markup' =&gt; '&lt;a href="https://maps.google.com?daddr='.$address_var.'"&gt;&lt;img  src="https://maps.googleapis.com/maps/api/staticmap?center='.$address_var.'&amp;zoom=15&amp;size=300x150
    &amp;markers=color:blue%7Clabel:*%7C'.$address_var.'" /&gt;&lt;/a&gt;',
    ),
);