Jump to content

Google Maps returned data weirdness


maxxd

Recommended Posts

Hi y'all.

 

I'm stumped on this and wondered if anybody had anything they could add or suggest. I've got a development version of a site on one server and the live version on another. Both use the same host, are using the same code, same data, same Google Maps API call, etc - everything is the same so far as I can tell. But, for some odd reason, on the dev site the address is returned with a line break between the street and city in the address. The live version does not have this break. It did until recently (like 2 weeks ago or so, I guess). I can't for the life of me figure out what that's all about, and if anyone's seen anything similar or has any ideas, I'd love to hear them.

Link to comment
Share on other sites

There's not - at one point, there's a bit of script that uses regex to remove the line breaks for use in a 'directions' link, but I haven't found anything that inserts a line break anywhere. And the directions link isn't involved in the actual address display - it's injected into a link offsite to Google proper.

 

I'm at home right now so don't have the actual code to post - I'll try to scrub and post it tomorrow morning. And needless to say, I didn't write the original code, but it doesn't seem too difficult to follow. Of course, I say that rather glibly as I have no idea where the issue is...

Link to comment
Share on other sites

Thanks for the help - like I said I'll try to scrub and post the handler code tomorrow morning.

 

What's strange is the API appears to be returning (I'm paraphrasing here)

123 My Street
<br></br>

My Town, ST 12345
<br></br>

on dev, but

123 My Street

My Town, ST 12345
<br></br>

on production when I inspect the element. It's just weird.

Link to comment
Share on other sites

@requinix - thank you for your input and help.

 

I'm not any closer to figuring this out, but digging through the code to scrub it for posting has brought to light some less than obvious things that are happening with regard to data-gathering setup that may be the actual culprit. Until I get a clearer idea of what's actually happening I'm not going to waste anybody else's time - hopefully I'll be able to figure it out on my own by digging further, but I'll certainly post back here f I still can't suss it out once I finally track down what's happening.

 

Thanks again for taking the time!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.