Local Search - Optimize Location Page

download Local Search - Optimize Location Page

of 5

Transcript of Local Search - Optimize Location Page

  • 8/3/2019 Local Search - Optimize Location Page

    1/5

    Geocode An Address & Optimize Location Pages

    Local businesses often display maps of their locations on their sites, but not a lot has been said about

    how to best create those pages for good usability and search engine optimization. This article willdescribe how to geocode addresses, use them to create dynamic maps for a local website while simultaneously

    optimizing those map/location pages.

    Many small-to-medium local businesses will set up a page on their site with a map that shows where their shop islocated. Typically, these pages will be called Locations or Contact Us, and most of them will consist of a brief

    of text for the address, a few written directions, and a static map image. Some have thoughtfully provided a hyperliover to one of the top mapping services to enable users to get specific driving directions or to pan and zoom the ma

    Now, how great would it be if all of these locations pages were set up with dynamic maps, allowing potential

    customers to easily interact with the maps while on the SMB site?

    For the sake of good usability, theres really no reason not to include a dynamic map on your site! Google Maps ha

    provided a free API to enable webmasters to take and use their maps.

    Although the Google Maps API is pretty easy to use, many do-it-yourself webmasters may find the instructions andsteps involved to be daunting. So, Im providing some easy steps below to enable one to place a Google Map with a

    simple location marker on a webpage.

    As an example, Im going to use Montparnasse, a favorite French bistro of mine in New York City. Theyre a greatexample, since theirlocation page sports a static map they copied from Mapquest.

    Step 1: Sign up with Google Maps API in order to obtain an API key. This coded number will enable your GoogleMaps to be delivered from your domain name.

    Step 2: Time to geocode the address. Geocoding is the process of converting a street address to equivalent

    geographic coordinates on a worldwide grid, much like one you may have done in primary school, plotting X-Ycoordinates on a graph. Mapping coordinates are referred to as longitude and latitude values, and in online

    mapping systems are passed in decimal degrees.

    Youll need to convert your location street address into longitude and latitude coordinates, and theres a number of

    ways to accomplish this. You may have a GPS device which shows you these coordinates, and you could just take reading from the GPS while at the address and note down the coordinates. There are also a number of software

    packages out there which provide this conversion, but you dont particularly need to buy one of those geocodersunless you need to geocode a large number of addresses. (Google Maps API also provides geocoding of this sort,

    although it may not be as user-friendly to those unfamiliar with programming, and the service limits you to a certainumber of requests per time period.)

    One free geocoding service I like is geocoder.us, and their conversion can be used just by typing the address into th

    field and hitting the submit button. They return GEO coordinates in a number of flavors, includingdegrees/minutes/seconds as well as in decimal degrees. When I enter Montparnasses street address, 230 East 51st

    Street, New York, NY into geocoder.us, it returns GEO coordinates for a 51st Street in Manhattan, and a 51st Strein Brooklyn. The coordinates Im wanting are for Manhattan, the first map, and I want the decimal version which is

    Latitude of 40.756390, Longitude of -73.969789.

  • 8/3/2019 Local Search - Optimize Location Page

    2/5

    Another way to get free geocodes which isnt quite as easy is to sort of hack it out of Google Maps itself. To do thi

    enter the same street address into Google Maps, and it displays the map location Im wanting (Google Maps typicadefaults to the more-popular address in situations like this, or else it provides a list of options to allow the user to

    disambiguate from options available).

    Now, click to close the little balloon info window that is automatically opened with the mapped location, and move

    the map to make sure that the location pinpoint is centered within the map window rectangle (the balloon infowindow frequently causes the map to move a little off-center from the location pinpoint). You can eyeball it when y

    re-center the map, but you may want to click the zooming controls to zoom in as closely as possible to insure you gthe center point of the map in the very center of the display rectangle.

    Then, click the link link at the upper right of the map, and copy the first map link out and take a look at it in your

    browser address box or in a text editor. Heres the link Google Maps gave me when I did this:

    http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=

    &q=230+East+51st+St.,New+York,NY&sll=37.0625,-95.677068&sspn=33.29802,56.601563&ie=UTF8&ll=40.755937,-73.969139&spn= 0.000937,0.001365&z=19

    In the query string of the above URL, one of the name/value parameters is: &ll=40.755937,-73.969139. This ll

    parameter and value is the longitude and latitude of the address we originally typed in.

  • 8/3/2019 Local Search - Optimize Location Page

    3/5

    Note that the latitude and longitude values returned by geocoder.us are a little bit different from those we extractedfrom the Google Maps URL. Its not at all unusual for different geocoding software to return slightly different valu

    for the same address, because they all use different data sources, and different calculations or algorithms for arrivinat geocodes. And, theres not necessarily a standard for what location should be returned for a street address - shou

    it be the spot along the street, or the address doorway, or should it be centered over the building (aka rooftop orhousetop)?

    With whatever geocoder you use, always check the map it produces before you finish. You can type the longitude a

    latitude directly into Google Maps and hit return to see what the mapped pinpoint will produce. When I do it for th

    geocoder.us pinpoint coordinates in this case, its too far off - some distance down the street and on the wrong sideYou could manually tweak the coordinates by adding or subtracting a few hundredths, thousandths, ten-thousandthetc., and seeing how it changes the resulting map. However, Ill just use the Google coordinates I derived in this ca

    since theyre already good.

    Using those GEO coordinates, I can put them into the following HTML code to produce the Google Map on anothewebpage:

    Montparnasse Map Code

    function initialize() {

    if (GBrowserIsCompatible()) {var zoomlevel = 13;

    var coordinates = new GLatLng(40.755937,-73.969139);var map = new GMap2(document.getElementById(map_canvas));

    map.setCenter(coordinates, zoomlevel);map.addControl(new GSmallMapControl());

    map.addControl(new GMapTypeControl());

    var marker = new GMarker(coordinates);map.addOverlay(marker);

    }

    }


    Map of Parnassus, New York City(viewed best with Javascript enabled)

  • 8/3/2019 Local Search - Optimize Location Page

    4/5

    Anyone could use this same code for their webpage, so long as they were to replace the key= value in the

  • 8/3/2019 Local Search - Optimize Location Page

    5/5


    Business Categories:

    Restaurants,French Restaurants,

    Bars

    By using these methods, you can create a highly optimal location page for a businesss website - one with anaccurately pinpointed map that functions well dynamically and fails silently - one which provides increasedfunctionality for power users while simultaneously providing good local search optimization.

    Opinions expressed in the article are those of the author, and not necessarily Search Engine Land.