google maps embedded in a website that automatically read query string and go directly?

does anyone know how to make a very simple page of google map that when the page loads, it can automatically read querystring and show the map?

full javascript will be greatly appreciated

2 Answers

  • 1 decade ago
    Best Answer

    Here's a simple example....




    function mapGoogle(addyId) {

    adVal = document.getElementById(addyId).value;

    var gUrl = '';

    escapedAddy = escapeBlanks(adVal);

    var loc = gUrl+'?q='+escapedAddy;

    window.location = loc;


    function escapeBlanks(adVal) {

    eVal = '';

    var last = adVal.length;

    for (var i=0; i<last; i++) {

    if (' ' == adVal.charAt(i)) {

    eVal +='%20';


    else {

    eVal +=adVal.charAt(i);



    return eVal;






    Enter an address:

    <input type="text" id="addy" /><br />

    <input type="button"

    value="click to map"

    onclick="mapGoogle('addy');" />



  • thao
    Lv 4
    3 years ago

    i could say that that's a stick that became into centred whilst the digital camera became into drawn in the direction of the sky. The illumination referred to as no remember if that's something of heavenly ask your self, yet actual the effect is concerning the region of the digital camera and the perspective with which the stick became into in accordance with that makes it look as a distinct style of phenomena. effective capture!

Still have questions? Get your answers by asking now.