We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Yahoo! and Google Geocode extension

Development and Programming

Andy Harris's avatar
Andy Harris
958 posts
17 years ago
Andy Harris's avatar Andy Harris

I have to say, this extension is absolutely superb! I’m having a small problem though, in that the preview (in the CP) doesn’t center on the specified area once you geocode - instead it puts it at top left. Similarly, when you double click, it doesn’t center on the the click.

I can work around it, but it’s a tad confusing especially when I hand it over to the user.

Again, this is a top extension. Nice one.

       
Boyink!'s avatar
Boyink!
5,011 posts
17 years ago
Boyink!'s avatar Boyink!

Hey Andy -

Does the extension pull the state from a weblog field for you?

       
Andy Harris's avatar
Andy Harris
958 posts
17 years ago
Andy Harris's avatar Andy Harris
Does the extension pull the state from a weblog field for you?

Hm, no, I’m getting that problem too - I hadn’t noticed because this particular project is ‘hardcoded’ to a county/state. I guess it’s fairly easy to fix it?

       
Boyink!'s avatar
Boyink!
5,011 posts
17 years ago
Boyink!'s avatar Boyink!

Not sure yet - was hoping to get the author of the extension to respond but since he hasn’t (either here or through their own site) it looks like I’ll have to see what I can figure out myself.

       
Andy Harris's avatar
Andy Harris
958 posts
17 years ago
Andy Harris's avatar Andy Harris

At first glance, and I don’t have it testable where I currently am, it seems to be missing this:

if ($this->settings['state_field'] != 0)
$this->fieldmappings['state'] = 'field_id_'.$this->settings['state_field'];

at around line 97 of ext.coollocation_extension.php. I don’t know if that’s enough to fix it outright.

       
Boyink!'s avatar
Boyink!
5,011 posts
17 years ago
Boyink!'s avatar Boyink!

Ah..cool..thanks for posting that.

I gotta run to a client meeting this AM but should be able to poke at it a bit this afternoon.

       
Andy Harris's avatar
Andy Harris
958 posts
17 years ago
Andy Harris's avatar Andy Harris

No worries, let me know if it works (or I’ll let you know if I get there first!)

       
Max Lazar's avatar
Max Lazar
337 posts
17 years ago
Max Lazar's avatar Max Lazar

CoolLocation (v.1.4.3) & EE 1.6.4 - I can’t see CoolLocation tab in CP. :( Does somebody try it with EE 1.6.4?

       
Bruce2005's avatar
Bruce2005
536 posts
17 years ago
Bruce2005's avatar Bruce2005

Works good for me in ee1.6.4. Enable extension and map the fields to right ones important.

       
Luke Hardiman's avatar
Luke Hardiman
109 posts
16 years ago
Luke Hardiman's avatar Luke Hardiman

Has anybody figured out how to enable Coollocation for more than one weblog?

The way the extension has been written this doesn’t appear to be possible. In order to do this the extension requires that you have the same Latitude and Longitude custom fields on multiple weblogs.. which is not allowed by EE (or sensible, considering that a custom field can only correspond to one weblog).

This means that when you enable the extension for multiple weblogs, the Coollocation tab javascript inevitably tries to get the wrong custom field by id, causing the map to be a blank grey box.

Has anybody else noticed this or found a solution? Seems a strange option to offer when it’s blatantly not usable..

Have I completely got the wrong end of the stick here?

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005
Have I completely got the wrong end of the stick here?

I don’t think you have, I cannot get it to either. I’ve gone back to using googles geocode services and php to save coordinates to the database fields from a template. Coolclimate is shutting down also according to the site.

       
Luke Hardiman's avatar
Luke Hardiman
109 posts
16 years ago
Luke Hardiman's avatar Luke Hardiman
I’ve gone back to using googles geocode services and php to save coordinates to the database fields from a template. Coolclimate is shutting down also according to the site.

thanks for the quick reply.. Any chance you could elaborate on this? It would be great to know more about what method you have migrated to.

Luke

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005

ummm, yes lol. There are several, one can click on a map to geocode, geocode by entering an address into a form on a map page, or use php and do it from a template with php. The first 2 pass the coordinate values from javascript to php using an additional submit button.

I’ll elaborate a bit, as long as you have php5: Drop the below into a php enabled template with your google key and view it.

<?php
$address ="http://maps.google.com/maps/geo?
=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=csv&key;=yourkey";
$page = file_get_contents($address);
$result = explode(",", $page); 
echo "$result[2], $result[3]";
?>

Basic geocoding, one can use jason, xml, kml or csv. Then from this principle update the database fields.

The above returns 37.423088, -122.085121.

       
Luke Hardiman's avatar
Luke Hardiman
109 posts
16 years ago
Luke Hardiman's avatar Luke Hardiman

Thanks, so you’re saying you’ve built your own custom solution external to EE that clients are using to post co-ords to the EE database? Would solution 3 be a SAEF?

Sorry, I’m a bit of a noob with all this geocoding stuff. I’m just trying to figure out a user-friendly workflow for my client. Its a travel site and a scalable mapping setup is critical.

Cheers for the help

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005
Thanks, so you’re saying you’ve built your own custom solution external to EE that clients are using to post co-ords to the EE database? Would solution 3 be a SAEF?

Yes to the first part. As for a saef it would work the same using address and coordinate fields. A client enters the adress aling with the rest of a post and saves it as usual. Then an additional step to geocode. It is not a perfect solution, just one that works.

I was hoping coollocation would work as it made things much simpler.

       
1 2 3

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.