maxxd Posted June 22, 2015 Share Posted June 22, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/296964-google-maps-returned-data-weirdness/ Share on other sites More sharing options...
requinix Posted June 22, 2015 Share Posted June 22, 2015 What's the code for that? Is there a line break in the code's file at that point? Quote Link to comment https://forums.phpfreaks.com/topic/296964-google-maps-returned-data-weirdness/#findComment-1514628 Share on other sites More sharing options...
maxxd Posted June 22, 2015 Author Share Posted June 22, 2015 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... Quote Link to comment https://forums.phpfreaks.com/topic/296964-google-maps-returned-data-weirdness/#findComment-1514629 Share on other sites More sharing options...
requinix Posted June 22, 2015 Share Posted June 22, 2015 Another thing to check is what exactly the API is returning, and whether the line break is a plain \n (that's being preserved as a newline) or a . Quote Link to comment https://forums.phpfreaks.com/topic/296964-google-maps-returned-data-weirdness/#findComment-1514639 Share on other sites More sharing options...
maxxd Posted June 23, 2015 Author Share Posted June 23, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/296964-google-maps-returned-data-weirdness/#findComment-1514651 Share on other sites More sharing options...
maxxd Posted June 23, 2015 Author Share Posted June 23, 2015 @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! Quote Link to comment https://forums.phpfreaks.com/topic/296964-google-maps-returned-data-weirdness/#findComment-1514709 Share on other sites More sharing options...
maxxd Posted June 23, 2015 Author Share Posted June 23, 2015 Update: this had nothing whatsoever to do with Google Maps. It had to do with some interesting code and errant data entry. Thanks again for your help, requinix - I appreciate it a lot! Quote Link to comment https://forums.phpfreaks.com/topic/296964-google-maps-returned-data-weirdness/#findComment-1514713 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.