• There has been a recent cluster of spammers accessing BARFer accounts and posting spam. To safeguard your account, please consider changing your password. It would be even better to take the additional step of enabling 2 Factor Authentication (2FA) on your BARF account. Read more here.

How to embed a Google Map

rodr

Well-known member
Joined
Dec 3, 2009
Location
Oz
Moto(s)
CB500XA
Name
Rod
BARF perks
AMA #: 2846730
UPDATE 2015-06-06: This feature seems to be completely broken now. Sorry.

UPDATE 2015-05-10: The old instructions (quoted below) don't work any more. Furthermore the "new" Google Maps sucks. Do this instead:

  1. Go to https://maps.google.com/lochp and create your map.
  2. Get the map centered in a smallish window. You may have to experiment and come back to this step to get it right.
  3. Click the "Link" icon (looks like chain links).
  4. Click the text box under "Paste HTML to embed in website" to highlight its contents.
  5. Type Ctrl-C to copy it to the clipboard.
  6. To insert the map into the message that you composing, type "[gm ap]", then Ctrl-V, then "[/gm ap]". Do not type the space between "gm" and "ap", I just had to insert it here so the system will not interpret it as a map.
  7. Look for the first occurrence of "https://www.google.com/maps" or "https://maps.google.com/maps" in the string that you pasted in, and change it to "http://maps.google.com/lochp". Note there may be three changes here!
Also note that if you have a (long) link to an existing map, you can change "maps" to "lochp" as above to open and edit it in classic mode. Same thing to fix old maps that you have embedded.

Many folks don't seem to know how to do this, so here's a quick summary.

  1. Go to maps.google.com and create your map.
  2. Click the "Link" icon (looks like chain links).

    [*]click "Customize and preview embedded map". In the resulting new window, select "Large".
    [*]Make final sizing and positioning adjustments to the map.
    [*]If you want to show the satellite or terrain version of the map, click "Sat" or "Ter" accordingly.
  3. Click in the HTML area at the bottom, then Ctrl-A and Ctrl-C to copy it all to the clipboard.
  4. To insert the map into the message that you composing, type "[gm ap]", then Ctrl-V, then "[/gm ap]". Do not type the space between "gm" and "ap", I just had to insert it here so the system will not interpret it as a map.
  5. Look for the first occurrence of "https://" in the string that you pasted in, and change it to "http://". This is to work around an error message caused by a recent change to map URLs.

UPDATE 7/15/2014:

This doesn't work with the "new" Google Maps. You can click the question mark near the bottom right and return to the old version. Even with that, the "customize and preview" option seems to have gone away -- you get code to embed but it's not clear how you can control the size and positioning. If anyone has a clue about that let me know.
 
Last edited:
thanks..
grey.png
 
Good stuff Rodr, but how do you do a pole?
 
Good stuff Rodr, but how do you do a pole?

A poll? There's an option for that when you start a new thread. When you do that, scroll down to the bottom and you'll see it. As I recall you set up the poll after the original message is posted.
 
I added a step #8 to the first posting, to deal with the "Wrong map URL" error.
 
I keep getting this - tried on both IE and Firefox, removed the s, added the gmap [] etc. Help please.

Short URL: https://goo.gl/maps/GdpNK

* in place of []

*gmap*<iframe src="http://www.google.com/maps/embed?pb=!1m76!1m12!1m3!1d789109.2840090617!2d-123.49697099164754!3d39.413763394698805!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!4m61!1i0!3e0!4m5!1s0x808f8fece9a2f0ff%3A0x8cd229daa3dc7bb9!2sSan+Leandro%2C+CA+94577!3m2!1d37.7199247!2d-122.1689284!4m5!1s0x54d2ecef79341c07%3A0x4e891699c4c59545!2sPonderosa+Inn+Redding%2C+2220+Pine+St%2C+Redding%2C+CA+96001!3m2!1d40.577616!2d-122.386854!4m5!1s0x54d25052db466a73%3A0xf5e198a5fc75beec!2sWeaverville%2C+CA!3m2!1d40.7309778!2d-122.94197079999999!4m5!1s0x54ce1423d0d23a83%3A0xc4bb4066332c405d!2sYreka%2C+CA!3m2!1d41.735418599999996!2d-122.63447079999999!4m4!2sCrater+Lake+Lodge%2C+Klamath+County%2C+OR!3m2!1d42.9099186!2d-122.14092409999999!4m5!1s0x54c8d4f041d24d63%3A0x855d56e2e955c244!2sMaverick+Motel%2C+1220+Main+St%2C+Klamath+Falls%2C+OR+97601!3m2!1d42.228134!2d-121.777474!4m5!1s0x54cf861b370d5bf1%3A0x26e5471bb81a2293!2s15370+Oregon+238%2C+Grants+Pass%2C+OR+97527!3m2!1d42.276196!2d-123.219005!4m5!1s0x54cff0eaa144ea39%3A0x2e0d1142815ae43!2sCave+Junction%2C+OR!3m2!1d42.1628912!2d-123.6481235!4m5!1s0x54d3ff83e6ff4ea7%3A0x2a860766b8290695!2sEureka%2C+CA!3m2!1d40.8020712!2d-124.1636729!4m5!1s0x808f8fece9a2f0ff%3A0x8cd229daa3dc7bb9!2sSan+Leandro%2C+CA+94577!3m2!1d37.7199247!2d-122.1689284!5e0!3m2!1sen!2sus!4v1405369434427" width="800" height="600" frameborder="0" style="border:0"></iframe>*/gmap*
 
Last edited:
Seems to work for me. I pasted the HTML from the link popup and changed the first https to http. You can quote this post to get it all.

[gmap]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?sll=40.3019735,-125.1942262&sspn=6.4591423,11.310668&geocode=FXWPPwIdoNm3-Cn_8KLp7I-PgDG5e9yj2inSjA%3BFVAqawIdWoa0-CkHHDR57-zSVDFFlcXEmRaJTg%3BFWKBbQId7Q2s-ClzakbbUlDSVDHsvnX8pZjh9Q%3BFfvUfAIdGb-w-CmDOtLQIxTOVDFdQCwzZkC7xA%3BFd_AjgIdBEe4-A%3BFaZZhAIdvtK9-CljTdJB8NTIVDFEwlXp4lZdhQ%3BFWQVhQIdw9On-CnxWw03G4bPVDGTIhq4G0flJg%3BFctagwIdhEeh-Ck56kSh6vDPVDFDrhUoFNHgAg%3BFaqEfwIdGEKk-CmhEVWoi97PVDGQ_t0LlAvybg%3BFReXbgIdp2mZ-CmnTv_mg__TVDGVBim4ZgeGKg%3BFXWPPwIdoNm3-Cn_8KLp7I-PgDG5e9yj2inSjA&saddr=San+Leandro,+CA+94577&via=8&daddr=Ponderosa+Inn+Redding,+2220+Pine+St,+Redding,+CA+96001+to:Weaverville,+CA+to:Yreka,+CA+to:Crater+Lake+Lodge,+Klamath+County,+OR+to:Maverick+Motel,+1220+Main+St,+Klamath+Falls,+OR+97601+to:15370+Oregon+238,+Grants+Pass,+OR+97527+to:Cave+Junction,+OR+to:41.9114663,-123.4529049+to:Eureka,+CA+to:San+Leandro,+CA+94577&dirflg=d&ie=UTF8&t=m&ll=40.322792,-122.995438&spn=5.209617,2.442225&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?sll=40.3019735,-125.1942262&sspn=6.4591423,11.310668&geocode=FXWPPwIdoNm3-Cn_8KLp7I-PgDG5e9yj2inSjA%3BFVAqawIdWoa0-CkHHDR57-zSVDFFlcXEmRaJTg%3BFWKBbQId7Q2s-ClzakbbUlDSVDHsvnX8pZjh9Q%3BFfvUfAIdGb-w-CmDOtLQIxTOVDFdQCwzZkC7xA%3BFd_AjgIdBEe4-A%3BFaZZhAIdvtK9-CljTdJB8NTIVDFEwlXp4lZdhQ%3BFWQVhQIdw9On-CnxWw03G4bPVDGTIhq4G0flJg%3BFctagwIdhEeh-Ck56kSh6vDPVDFDrhUoFNHgAg%3BFaqEfwIdGEKk-CmhEVWoi97PVDGQ_t0LlAvybg%3BFReXbgIdp2mZ-CmnTv_mg__TVDGVBim4ZgeGKg%3BFXWPPwIdoNm3-Cn_8KLp7I-PgDG5e9yj2inSjA&saddr=San+Leandro,+CA+94577&via=8&daddr=Ponderosa+Inn+Redding,+2220+Pine+St,+Redding,+CA+96001+to:Weaverville,+CA+to:Yreka,+CA+to:Crater+Lake+Lodge,+Klamath+County,+OR+to:Maverick+Motel,+1220+Main+St,+Klamath+Falls,+OR+97601+to:15370+Oregon+238,+Grants+Pass,+OR+97527+to:Cave+Junction,+OR+to:41.9114663,-123.4529049+to:Eureka,+CA+to:San+Leandro,+CA+94577&dirflg=d&ie=UTF8&t=m&ll=40.322792,-122.995438&spn=5.209617,2.442225&source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>[/gmap]
 
Oh you know what? I was using the "new" google maps - which I hate btw, and just figured out how to switch back. Our codes are totally different - stupid Google. The original maps link works as you said. Thanks!
 
Yeah the new stuff sucks.
 
I updated post #1 in an attempt tp keep this thread relevant.
 
Instructions changed once again in post #1.
 
Instructions changed once again in post #1.

If you don't changes /maps? to /lochp? it will post it as the new maps version, which is unreliable now. Let's hope they keep this.
 
If you don't changes /maps? to /lochp? it will post it as the new maps version, which is unreliable now. Let's hope they keep this.

Right. But I think they will eventually hang us out to dry. :mad
 
Right. But I think they will eventually hang us out to dry. :mad

Aaaand they did. The old Google maps seems to be disabled now. And with the new one, vBulletin won't accept map URLs starting with "https" and Google won't accept ones that don't.

:rip
 
Aaaand they did. The old Google maps seems to be disabled now. And with the new one, vBulletin won't accept map URLs starting with "https" and Google won't accept ones that don't.

:rip

AFAIK, the https issue can be addressed in a vBulletin config. Now, if we could get someone who could make that change to look into that... :laughing
 
Another solution may be to allow HTML in posts for members who have been around for a while. If that supports <iframe> and such then normal embedding should work without bbcode stuff.
 
Back
Top