[wp-hackers] EXIF geo data

Mike Little mike at zed1.com
Tue Mar 3 16:45:16 GMT 2009

2009/3/3 Otto <otto at ottodestruct.com>:
> On Tue, Mar 3, 2009 at 3:14 AM, Mike Little <mike at zed1.com> wrote:
>> I agree a standard meta data name makes sense, as does one which has
>> been around for a while. My only minor reservation about a combined
>> field, is that it is a little harder to parse than separate long and
>> lat.
> The reason to have them together is so you can pull them both out
> together. There's never an occasion where you need one and not the
> other.

I was thinking of positioning posts on a map where you will want them separate.

> And splitting them isn't that hard. If you've got "123.567,-12.345"
> then all you have to do is:
> $meta = trim(get_post_meta($post->ID, '_geo_location', true));
> list($lat, $long) = split(',', $meta);
> And voila.

Of course. But ugly to go in a theme  :-)

Mike Little

More information about the wp-hackers mailing list