geocoder issue with recalculating

Hi all,

We have been using geocoder without any issues for a short while but have run into a small issue, we have one client who isnt happy because the google map displays a competitors holiday park on google maps rather than their own due to them sharing the same postcode. I thought a resolution to this would be to manually adjust the latitude and longitude values however as soon as the record is saved geocoder recalculates based upon the postcode and replaces the manually input coordinates with those calculated for the postcode. I tried removing the postcode and address details which are used by geocoder but we still get an ovewrwriting of the coordinates.

The only way I could resolve this was to manually edit the sql database for this record and change the coordinates but as soon as the record is changed it will revert back to the old values.

Is there any way to prevent the coordinates being recalculated once they have been set or other method to enforce specific coordinates?

If not already possible I feel this would be a very helpful addition to the plugin as it is feasible that many businesses may wish to fine tune their map display by manually altering the latitude and longitude values especially in industries such as hotels and accommodation.

Thanks in advance for any help with this..

This would be handy, as many times for some reason google does not identify the correct location.

Maybe its as simple as creating 2 additional fields: lat2 and long2.  Then have some kind of <?php if $lat2; $lattitude= $lat2; ?> so if there is an entry in the additional fields, even though the geocoding updates the lattiude fields, the lat2 field overrides it on the page?

Cheers,

Tim (toledoh.com.au)

Hi, Thanks for taking the time to help with this.

What you say makes sense, I understand the logic behind that, unfortunately I am not a php programmer, would it be as simple as using the code you have indicated and replicating it for longitude and inserting the two elements below the existing geocoder code script which from memory is in the head of the detail viewer. Would it require any additional code anywhere and would it make any difference where the code was placed? Presumably it has to go after the existing code has allocated the normal values So that they are overwritten by the new lat2 and long2 values.

Is the code you have suggested the actual code/syntax that would work if I set the two new fields as lat2 and long2

Thanks again for your help, it is appreciated.

I'm no programmer either, but I think this could work.

<?php if ($record['lat2']): ($record['latitude'] = $record['latitude']); ?><?php endif ?>
<?php if ($record['long2']): ($record['longitude'] = $record['longitude']); ?><?php endif ?> 

And put it in the <head> before the <script>

Cheers,

Tim (toledoh.com.au)

Thanks Tim,

I will give it a try, logically it makes sense so fingers crossed. :-)

Steve

Hey Steve - I actually just tackled a similar issue to this recently, and I added some extra custom code to the geocoder to prevent overrides.

If you're still having issues with it, please open a support ticket. I'll pass my version of the plugin over to whoever picks it up and you can try it out.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Hi Claire,

that would be great, i am leaving for vacation today  so will have left by the time you get the ticket. I will be back 13th October and will open the ticket then if thats okay.  This would be a natural update to the product to allow fine tuning of the maps, could you incorporate it into the basic product so it was available as standard so that all anyone would need to do is re- download the plugin?

thanks 

Steve

If possible - I would like to trial it also.

Cheers,

Tim (toledoh.com.au)

I'm not sure if Dave will want to add this specifically to the geocoder for everyone. Different clients have different needs after all. I'll talk to him about it.

Tim, go ahead and open a support ticket if you want this version of the plugin.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/