Removing Hidden Line Feeds, Carriage Returns and Tabs For Great Google Maps

by Seth on October 4, 2009

I was playing around with Google maps and my maps kept producing a strange object error.  What I found out was that some of the data that I was pulling into the Google Map (was creating multiple data points) had hidden characters that were breaking the Google Map, especially in IE.

There is a simple query that you can run from phpMyAdmin or whatever tool you use to manage your mysql database:

UPDATE `Shoppe` SET `Address1` = REPLACE(REPLACE(REPLACE(Address1, CHAR(10), ”), CHAR(13), ”), CHAR(9), ”) WHERE Shoppe_ID = ‘KS0113022b042′
UPDATE `TableName` 
SET `FieldName` =
REPLACE(REPLACE(REPLACE(FieldName, CHAR(10), ''), CHAR(13), ''), CHAR(9), '')

Obviously, change the TableName and FieldName to your corresponding values, but other than that, this cleaned up the problem nicely.

The Google map displays perfectly now.

{ 1 comment… read it below or add one }

Get Indexed Quickly January 4, 2010 at 12:32 am

Dude, great post about search engine optimization. Definitely better than anything I’ve ever seen posted by Google.

Leave a Comment

Previous post:

Next post: