Results 1 to 5 of 5

Thread: How do Google do that?

  1. #1
    Join Date
    May 2007
    Posts
    31
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default How do Google do that?

    Does anyone have a clue how Google achieve the auto geocoding. If you place this link in your browsers address bar it goes directly to the map position, map style and map zoom level...

    http://maps.google.co.uk/maps?ie=UTF8&z=5

    I can see where the position and zoom info is but what makes it all work. I've embedded a map on my webpage but can't get it to accept the 'maps?...' found above. I've trawled the developers pages and forum on google but with no luck. Can anyone help me and point me in the right direction?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I'm not really sure what you're talking about here.

    What part of the URL is confusing?

    Each value is assigned to a variable that the server recognizes and moves the map around. (And Javascript as well.)

    ?ie=UTF8&ll=57.610107,-42.626953&spn=27.080362,59.765625&z=4

    So, ll= is latitude and longitude (not sure what order)
    spn= ....hmm... I'm not sure here. Do some tests to find out.
    z= is the zoom.
    I think ie= is character encoding, unless UTF8 happens to stand for something else.
    (might be related to "internet explorer"-safe settings)


    Anything not specified in the URL appears to be the default.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    burginsteve (03-31-2008)

  4. #3
    Join Date
    May 2007
    Posts
    31
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    I get that bit but what type of web page accepts those parameters. I know it's not a html page. It's how the webpage accepts the detail that foxes me. It doesn't work on http://maps.google.co.uk/ but does on http://maps.google.co.uk/maps/.
    Last edited by burginsteve; 03-31-2008 at 04:34 PM.

  5. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ah. I understand now.

    Those values are not part of the URL, in terms of the directories. In fact, they're just extra data for being used in any sort of programming language that can read them.

    The most common is with PHP or another server side language, such as interactions from a database ("viewarticleid=57"), but other languages can access them too.

    Javascript is definitely used here, though google's code is too complex for me to look for. Either PHP writes the values from the URL into the Javascript when the page is output, or the Javascript grabs the values directly (manually parsing this link-- this is automated in PHP).
    Then the JS takes those values and calibrates the map to match-- just like based on user input dragging/etc.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. The Following User Says Thank You to djr33 For This Useful Post:

    burginsteve (04-02-2008)

  7. #5
    Join Date
    May 2007
    Posts
    31
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    Thanks for that...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •