Add Google Maps driving directions to your website Añadir Google Maps para ir en coche a su sitio web

Posted on April 29, 2008 at 5:23 am Publicado el 29 de abril de 2008 a 5:23 am

I love using Google Maps “Get Directions” feature any time I need to figure how to get from point A to B. It’s one of the best ways to get driving directions in the USA for sure. Me gusta utilizar Google Maps "Llegar" característica en cualquier momento tengo que figura como llegar del punto A al B. It 's una de las mejores maneras de obtener rutas en los EE.UU. con seguridad.

So what if you have a wedding website or a MySpace page and you’re throwing a big party, wouldn’t it be nice if your guests could go to your site, type in the address they will be coming from and automatically get directions to the event location!? Entonces, ¿qué si usted tiene una boda o un sitio web página de MySpace y que está arrojando una gran fiesta, ¿no sería bueno que sus invitados podrían ir a su sitio web, escriba a la dirección que se viene ya automáticamente a las direcciones el caso de ubicación? Not sure what I mean? ¿No está seguro de a qué me refiero? Type your address in the box below and you’ll get directions from your address to my house: Escribe tu dirección en el cuadro de abajo y obtendrá las direcciones de su dirección a mi casa:

Enter your starting address: Ingrese su dirección a partir:

Cool huh? Cool huh? You can easily create this little form on any website, blog, or anywhere you can put in some HTML code! Usted puede crear fácilmente este pequeño formulario en cualquier sitio web, blog, o en cualquier lugar se puede poner en algún código HTML! This is also great for small business web sites as you can throw it up on your contact page and people can get directions quickly, rather than having to copy your address, open a new window, and then type in their starting address. Esto es también ideal para la pequeña empresa sitios web como se puede tirar hasta que en su página de contacto y la gente pueda obtener direcciones rápidamente, en lugar de tener que copiar su dirección, abrir una nueva ventana y, a continuación, escriba su dirección de comiendo.

So how do we go about creating this modified get directions box? Así que ¿Cómo podemos crear este modificados obtener direcciones caja? Well first, we’ll need to get the correct syntax for the URL that Google uses for directions. Bueno en primer lugar, tendremos que obtener la sintaxis correcta para la URL que Google utiliza para las direcciones. Luckily, we can figure that out by getting directions between two places and then clicking on the Send link at the top right. Por suerte, podemos cifra que, de obtener direcciones entre dos lugares y, a continuación, haga clic en el vínculo Enviar en la parte superior derecha.

Here’s what you end up getting: Esto es lo que acaban obteniendo:

obtener mapas directios

Notice the link in the email message! Aviso en el enlace del mensaje de correo electrónico! That’s what we need! Eso es lo que necesitamos! Here’s what the entire link looks like right now: Esto es lo que todo el vínculo se parece ahora mismo:

http://maps.google.com/maps?f=d&hl=en&geocode=&saddr= 6348+Pratt+Dr,+New+Orleans,+LA+70122+(Pratt+Home)&daddr=4601+lennox+blvd,+new+orleans,+la&sll=37.0625,-95.677068&sspn=33.214763,82.265625&ie=UTF8&z=12 http://maps.google.com/maps?f=d&hl=en&geocode=&saddr = 6348 + Dr Pratt +, + + Nueva Orleans, Luisiana 70122 + + (Pratt + Página de inicio) y daddr = 4601 + + Lennox Blvd, + nueva orleans +, + la + SLL = 37.0625, -95,677068 & sspn = es decir, 33.214763,82.265625 & = UTF8 & z = 12

Eeeks! That’s pretty long! Eso es muy largo! There are a lot of fields in the URL, such as SADDR (starting address), DADDR (destination address), hl (language), and some more stuff related to the latitude and longitude. Hay un montón de campos de la URL, tales como SADDR (a partir de dirección), DADDR (dirección de destino), hl (idioma), y algunas cosas más relacionadas con la latitud y longitud.

However, you don’t really need all of these fields in order for Google to give you driving directions! Sin embargo, usted no necesita realmente de todos estos campos en orden de Google para darle instrucciones de conducción! All you need is this: Todo lo que necesita es la siguiente:

http://maps.google.com/maps?saddr=start&daddr=end http://maps.google.com/maps?saddr=start&daddr=end

Go ahead and give it a shot. Vaya por delante y darle un tiro. Put in an address in quotes for the starting and ending address and paste the URL into your browser! Ponga en un discurso en las cotizaciones de la puesta en marcha y poner fin a la dirección y pegar la URL en su navegador! I replaced start with my home city New Orleans and end with Houston, TX, so this is what my Google Maps directions URL looks like: I sustituirá empezar con mi ciudad natal, Nueva Orleans y al final con Houston, TX, por lo que es lo que mi Google Maps direcciones URL tiene el siguiente aspecto:

http://maps.google.com/maps?saddr=”new orleans, la”&daddr=”houston, tx” http://maps.google.com/maps?saddr = "Nueva Orleáns, la" & daddr = "Houston, TX"

Pretty nifty eh! Pretty excelente eh! Isn’t it fun to mess around with these types of things! ¿No es divertido lío en torno a este tipo de cosas! Ok, so now that we have a URL that we can pass into Google Maps, we need to create a simple form with two fields, one for the starting address and one for the destination address. Ok, así que ahora que tenemos una URL que le puede pasar a Google Maps, tenemos que crear un simple formulario con dos campos, uno para la dirección de comiendo y uno para la dirección de destino.

If you want people to just type in their address and get directions to your place, then we’ll want the second field to be hidden and already set to the destination address. Si quieren que la gente sólo tienes que teclear en su dirección y obtener direcciones a su lugar, luego quieren que el segundo campo que se oculta y ya establecidos para la dirección de destino.

<form action=”http://maps.google.com/maps” method=”get” target=”_blank”> <form action="http://maps.google.com/maps" method="get" target="_blank">
Enter your starting address: Ingrese su dirección a partir:
<input type=”text” name=”saddr” /> <input type="text" name="saddr" />
<input type=”hidden” name=”daddr” value=”6348 Pratt Dr, New Orleans, LA” /> <input type="hidden" name="daddr" value="6348 Pratt Dr, Nueva Orleans, LA" />
<input type=”submit” value=”get directions” /> <input type="submit" value="get directions" />
</form> </ form>

Check out the code above. Compruebe el código anterior. The first line starts out form and says that when the submit button is clicked, the data should be sent to maps.google.com/maps. La primera línea inicia la forma y dice que cuando el botón de enviar es pulsado, se deben enviar los datos a maps.google.com / maps. The target=blank means that we want the result to open in a new window. El target = blank significa que queremos que el resultado para abrir en una ventana nueva. Then we have a text box for the starting address, which is blank. Entonces tenemos un cuadro de texto a partir de la dirección, que está en blanco.

The second text box is hidden and the value is the destination address that we desire. El segundo cuadro de texto se oculta y el valor es la dirección de destino que deseamos. Finally, there is a submit button with the title “Get Directions”. Por último, hay un botón de enviar con el título "Llegar". Now when someone types in their address, they’ll get this: Ahora, cuando alguien tipos en su dirección, obtendrá la siguiente:

obtener direcciones

You can customize the directions and map even more by following the same procedure as I went through above. Puede personalizar las direcciones y plano de situación aún más, siguiendo el mismo procedimiento que me pasaron por encima. For example, let’s say you don’t want the default view to be maps, but instead want it to be Satellite and show Traffic . Por ejemplo, supongamos que usted no desea que la vista predeterminada para ser mapas, sino que queremos que sea y por satélite muestran Tráfico. Type in your directions and then press the Satellite and Traffic buttons on the Google map. Introduzca su dirección y pulse el tráfico por satélite y los botones de Google mapa. Next, click on Send and you’ll see the modified URL: A continuación, haga clic en Enviar y verás la URL modificada:

http://maps.google.com/maps?saddr=%22new+orleans,+la%22&daddr=%22houston,+tx%22&ie=UTF8&t=h&z=7&layer=t http://maps.google.com/maps?saddr =% 22new + Orleáns, la +% 22 & daddr =% 22houston, tx +% 22 + es decir = UTF8 & t = h & z = 7 & t = capa

Notice the layer=t and t=h fields in the URL. Aviso de la capa = t y t = h campos en la URL. layer=t is for the traffic layer and t=h means satellite in some strange fashion! capa = t es para la capa de tráfico y t = h mediante satélite en alguna extraña moda! Just tack those on to your final URL and you’ve now got a highly customized Google Maps Get Directions form on your site! Justo en esos rumbo a final de su URL y que ha llegado ahora muy personalizada de Google Maps Llegar formulario en su sitio! Source: Fuente: AskDaveTaylor

Have any issues with this, post a comment and I’ll try to help! Tiene algún problema con esto, publica un comentario y yo intentaré ayudar! Enjoy! Disfrutar!

If you enjoyed this post, make sure you En caso de que haya disfrutado de este puesto, asegúrese de que subscribe to my RSS feed suscribirse a mi feed RSS ! !

» Filed Under »Presentadas en virtud de Google Software/Tips Google Software / Tips

Related Posts Puestos relacionados

4 Responses to “Add Google Maps driving directions to your website” 4 Respuestas a "Agregar Google Maps para ir en coche a su sitio web"

  1. MJ said on : MJ dice:

    Really cool feature. Really cool característica. I have tried it before, it’s really helpful. Lo he probado antes, es realmente útil.

    Thanks. Gracias.


  2. Aurelius Tjin Aurelio Tjin said on : dice:

    Great post! Gran post! Thanks for the valuable information and insights you have shared here. Gracias por la valiosa información y conocimientos que han compartido aquí.


  3. Bollywood Star Estrella de Bollywood said on : dice:

    This is my favorite website because there are greatest posts. Este es mi sitio favorito, porque hay más puestos.

    Thanks to all Gracias a todos


  4. Bob said on : Bob dijo:

    Hi, do you have any idea how to convert a google map to pdf, so I can draw arrows on the maps and make notes? Hola, ¿tiene alguna idea de cómo convertir un mapa de google pdf, por lo que puedo señalar flechas en los mapas y tomar notas? Thanks. Gracias.


    Please post your comments/suggestions! Por favor envie sus comentarios o sugerencias!