Adding a Google Map to Your Post (revised)

Discussion in 'Forum Announcements and Feedback' started by Daniel Mosquin, Mar 5, 2009.

  1. Daniel Mosquin

    Daniel Mosquin Paragon of Plants UBC Botanical Garden Forums Administrator Forums Moderator 10 Years

    Messages:
    10,578
    Likes Received:
    615
    Location:
    Vancouver, British Columbia, Canada
    Ok, to embed a Google Map in a post:

    Once you have your Google Map (and whatever markers, routes, etc...), use the Link button in the upper right of the Google Map and copy the HTML from "Paste HTML to embed in website".

    You can then paste the Google Maps html into your posting.

    Then, highlight the Google Maps html and use the new "red-pin" Google Map icon in the advanced editor to create the tags [ g m a p ] and [ / g m a p ] around your Google Maps html (ignore the spaces), or type it in yourself.

    It will look something like this (again, ignore the spaces in the gmap opening and closing tags):

    Code:
    [ g m a p ]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;q=6804+SW+Marine+Dr,+Vancouver,+Greater+Vancouver+Regional+District,+British+Columbia,+Canada&amp;sll=37.0625,-95.677068&amp;sspn=43.934478,79.101563&amp;ie=UTF8&amp;cd=1&amp;geocode=FbWP7wIdkVyn-A&amp;split=0&amp;z=14&amp;iwloc=addr&amp;ll=49.262036,-123.245316&amp;output=embed&amp;s=AARTsJqVoWhmXy3AYBS2Kfh85UOep18Vdw"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;q=6804+SW+Marine+Dr,+Vancouver,+Greater+Vancouver+Regional+District,+British+Columbia,+Canada&amp;sll=37.0625,-95.677068&amp;sspn=43.934478,79.101563&amp;ie=UTF8&amp;cd=1&amp;geocode=FbWP7wIdkVyn-A&amp;split=0&amp;z=14&amp;iwloc=addr&amp;ll=49.262036,-123.245316" style="color:#0000FF;text-align:left">View Larger Map</a></small>[ / g m a p ]
     
  2. Daniel Mosquin

    Daniel Mosquin Paragon of Plants UBC Botanical Garden Forums Administrator Forums Moderator 10 Years

    Messages:
    10,578
    Likes Received:
    615
    Location:
    Vancouver, British Columbia, Canada
    That translates into something like this:

    [GMAP]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;q=6804+SW+Marine+Dr,+Vancouver,+Greater+Vancouver+Regional+District,+British+Columbia,+Canada&amp;sll=37.0625,-95.677068&amp;sspn=43.934478,79.101563&amp;ie=UTF8&amp;cd=1&amp;geocode=FbWP7wIdkVyn-A&amp;split=0&amp;z=14&amp;iwloc=addr&amp;ll=49.262036,-123.245316&amp;output=embed&amp;s=AARTsJqVoWhmXy3AYBS2Kfh85UOep18Vdw"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;q=6804+SW+Marine+Dr,+Vancouver,+Greater+Vancouver+Regional+District,+British+Columbia,+Canada&amp;sll=37.0625,-95.677068&amp;sspn=43.934478,79.101563&amp;ie=UTF8&amp;cd=1&amp;geocode=FbWP7wIdkVyn-A&amp;split=0&amp;z=14&amp;iwloc=addr&amp;ll=49.262036,-123.245316" style="color:#0000FF;text-align:left">View Larger Map</a></small>[/GMAP]
     
  3. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,877
    Likes Received:
    2,284
    Location:
    Vancouver, BC Canada
    Daniel, thanks for looking into this! I tried what you said twice and got nothing (it's like the red pin picked up my code and tossed it out - no space where the map should have been and no text left behind).

    But a second issue is that when I look at your posting, I see just "loading ..." for three minutes, or longer the first time, but then as soon as I clicked Post Reply both times, the map was there. And then when I hit the back arrow, it was still there. But I can't seem to get it to appear until I do a reply. If that only happens to me, I have the obvious workaround for testing a map, should I ever get it to appear (start a reply, then back out of it), but I wonder if that happens to other people.
     
  4. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,877
    Likes Received:
    2,284
    Location:
    Vancouver, BC Canada
    Twice just now I've looked at the Forum Announcements posting regarding the maps. Both times it said "loading ..." and these times I didn't wait very long to start a reply, and the map showed up right away on the reply screen. So there doesn't seem to be any delay on showing the map on a reply screen.

    I'm starting to get the "loading ..." thing now - in a new window, the map never shows up for me (I waited 5 minutes - that's as good as never, as no-one will read a single posting that long), but in a reply, or if I return to the posting in a window that has showed it before, the map shows up right away.

    It seems strange that attach codes show the code on the reply screens but the gmap code shows the map (for Daniel's map, that is; for my attempt at a map, the gmap code shows nothing on the page but shows the code on the reply screen).
     
  5. Daniel Mosquin

    Daniel Mosquin Paragon of Plants UBC Botanical Garden Forums Administrator Forums Moderator 10 Years

    Messages:
    10,578
    Likes Received:
    615
    Location:
    Vancouver, British Columbia, Canada
    Another attempt:

    [GMAP]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=en&amp;ie=UTF8&amp;ll=49.246293,-123.21579&amp;spn=0.071047,0.154495&amp;z=13&amp;output=embed&amp;s=AARTsJpnOA3ioEtcI9rx_v7gyZqlolGTYw"></iframe><br /><small><a href="http://maps.google.com/maps?hl=en&amp;ie=UTF8&amp;ll=49.246293,-123.21579&amp;spn=0.071047,0.154495&amp;z=13&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>[/GMAP]
     
  6. Daniel Mosquin

    Daniel Mosquin Paragon of Plants UBC Botanical Garden Forums Administrator Forums Moderator 10 Years

    Messages:
    10,578
    Likes Received:
    615
    Location:
    Vancouver, British Columbia, Canada
    [GMAP]<iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=102530710726726651981.00044746c64da246329bc&amp;s=AARTsJrCcd3CFGH6jt_CXk3cYqCz9N_-MA&amp;ll=49.278305,-123.133478&amp;spn=0.008399,0.012875&amp;z=15&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=102530710726726651981.00044746c64da246329bc&amp;ll=49.278305,-123.133478&amp;spn=0.008399,0.012875&amp;z=15&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>[/GMAP]
     
  7. Daniel Mosquin

    Daniel Mosquin Paragon of Plants UBC Botanical Garden Forums Administrator Forums Moderator 10 Years

    Messages:
    10,578
    Likes Received:
    615
    Location:
    Vancouver, British Columbia, Canada
    Give it another go-round in the test bed again. It's super-important to not have spaces or line breaks between the HTML and the gmap tags, as spaces or line breaks will be interpreted as HTML and break the exact URL used to generate the maps.

    Also, I notice there's been some URL tag insertion in the maps you've posted -- I'm not sure why that is (perhaps you were copying from an edited uncorrect version?) -- it needs to be the _exact_ code from the embed link in Google maps.
     
  8. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,877
    Likes Received:
    2,284
    Location:
    Vancouver, BC Canada
    Daniel, thanks for getting into this, and for all your hints. We seem so much further along now, but I think there are still some forum issues.

    1. It takes a long time to load the maps when they do work and I'm not sure if there are times when they just don't load, though that seems to vary by browser and whether it's already loaded some. Right now that's working fine, so maybe I've beaten the browsers into submission.

    2. It's not executing the code to make the map dimensions the selected size, nor is it executing the View Larger Map link. I've just pasted in the code from gmaps to a new webpage in Expression Web (Frontpage replacement), and from the forum page to Expression Web, and from both places, the code in Expression Web does make the map dimensions small and does produce the View Larger Map link under the map. So it's something about the forums that's keeping that code from executing. Or I suppose it could be some version of html code that's not recognized by the forums.

    3. I've just for the first time seen what you mean about the url tags. Funnily enough, they don't stop the map from displaying in the forum, but I did have to remove them to get the map to display in Expression Web. I get confused about a lot of things, but I don't think I did anything differently when those appeared. I've left them, just as a demonstration that they don't seem to be doing anything on the forum page.

    4. The resizing I mentioned in the testbed, where the correct zoom gets replaced by a city-wide view, does happen to me in the code from Expression Web, so that's not a forum issue. Except that if it happens to others viewing the maps, they'll find the maps totally useless. I think it's a Firefox/gmaps issue and I'm sure they each think it's the other's issue.
     
  9. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,877
    Likes Received:
    2,284
    Location:
    Vancouver, BC Canada
    For what it's worth, here's the current state on this subject:
    1. The Google embedded maps load quickly enough
    2. A friend who looked at this surmises that the gmap tag includes the sizing, so I cannot change the large map dimensions. It is still not executing the View Larger Map link, but I forgot to ask about that. [edited - OH - you click the "Powered by Google" box in the bottom left to get the link to the map on Google!][edited again - BUT, it just goes to the same area on Google, but not to my map with the markers - well, that's not what's required].
    3. The zoom is fine. Maybe that was a Firefox issue that they dealt with.

    I'm giving maps a year off (as the festival is taking a year off), so there's no current issue that needs resolving.
     
    Last edited: Feb 16, 2010
  10. Katalina25

    Katalina25 New Member

    Messages:
    348
    Likes Received:
    0
    Location:
    Lancashire , England
    No, it don't work for me either Wendy lol

    Daniel, what is your Code lol

    There is Wendy, we have not been able to do this!
     
  11. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,877
    Likes Received:
    2,284
    Location:
    Vancouver, BC Canada
    You don't need to write code, Katalina, to get the map embedded. Google maps supplies the code and it does work. You click the red pushpin on the posting toolbar, then in Google, click on link in the upper right corner, and copy the code they supply to embed a map, then paste it inside the gmap tags. The only issue is that you can't resize the dimensions of the map. I just posted one in the testbed and it looks just like the one below in this thread. But I had to click on Customize and Preview this map and set the zoom there.
     

Share This Page