Hi,

I've just taken a quick look at this module and I think its really cool.

I was wondering if you have considered adding some for of API into the code? I have a series of photographs that I would like on a google map, however I do not have them in a content area (thus the filter is not use to me), but rather in a custom database table.

It would be good if I could call a theme function, passing in an array of photos and receive the code to render the map.
eg.


$photos = array(
  array(
    'path' => 'my path',
    'long' => 'long',
    'lat' => 'lat',
    'url' => 'destination url'
  ),
  array(
    'path' => 'my path',
    'long' => 'long',
    'lat' => 'lat',
    'url' => 'destination url'
  ),
);

echo theme('exif2gmap', $photos);

lat and long could be optional. If supplied, map the photo at these points, if not supplied, calculate from the exif data.

let me know if you need a hand or want me so have a crack at some code.

Comments

iktaka’s picture

Assigned: Unassigned » iktaka

It seems not so difficult to add requested funtion.
I‘ll take a look.

iktaka’s picture

Status: Active » Needs review

Beta version of theme api is added.
Please try CVS source.

aaron1234nz’s picture

Thanks,

I've checked it out from cvs and will try it out sometime this week.

Aaron

aaron1234nz’s picture

Status: Needs review » Needs work

I checked out the version from the DRUPAL-6--1 branch head
Line 407 should be isset() rather then isnull()
The return function on line 431 does not exist (exif2gmap_male_gmapcode)

iktaka’s picture

Thank you for your advice.
The typoes are fixed :-)
The function returns array which includes javascript head, body, and html.