tsml_custom_addresses() and imported JSON feeds #1603
-
When importing JSON feeds, the addresses are run through Google for geocoding. When, as happens on occasion, the geocoding is incorrect, TSML has a facility for overriding via However, when the meeting is coming from an external JSON feed, it seems to me that Is this expected behavior? Is Or is it the case that Alternatively, can the JSON entry contain more detailed info ( such as latitude / longitude ) that would prevent the bad geocoding from google to take effect without the need for an override via Example: Google incorrectly geocodes If you set up a test site to import the following feed which has a single meeting at this location: You'll notice that as part of the import process the address is incorrectly geocoded. If you then add the following: the override works as expected when editing the meeting from within the TSML plugin's admin screen. However, if you re-import the JSON feed, the badly geocoded address returns. So either OR the way the address is encoded in the JSON does not match up with what Any insight on how I might alter the override in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
looks like your override does not match the data coming in from JSON. try adding another entry for |
Beta Was this translation helpful? Give feedback.
-
Thanks for the speedy reply @joshreisner I tried several variations just changing the 'lookup' address in Finally I decide to drop the hammer and add THIS DID WORK ! THANK YOU ! For the record I was reluctant to do add Anyhow things are better behaved in that I can get the proper town to appear in the address on the meetings detail page. Frustratingly however, hitting the directions button still maps out directions to the wrong address, but I'll take the win and keep working on this secondary issue. For the record here is the code that builds the
and here is the override that matches this formatting:
|
Beta Was this translation helpful? Give feedback.
looks like your override does not match the data coming in from JSON. try adding another entry for
1 Cedar Ave, MEDFORD, NY, 11763, US
to see if that works, or change the JSON to use"formatted_address" => "1 Cedar Ave, Medford, 11763, USA"