Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9103409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:37:31+00:00 2026-06-17T01:37:31+00:00

I am trying to display a google static map, which when clicked, will open

  • 0

I am trying to display a google static map, which when clicked, will open up a larger iframe, where the user can pan, zoom, etc.

JSFiddle here

Code below:

<div>
    <a class="various fancybox.iframe" title="Whitehouse - USA" href="https://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=&amp;daddr=1600+Pennsylvania+Ave+NW,+White+House,+Washington,+DC+20500&amp;hl=en&amp;geocode=Ca3jx5Eq6BcjFQ6IUQIdG4Ro-ynPaZnjvLe3iTGGOSyaFzTP2g&amp;sll=38.897678,-77.036517&amp;sspn=0.009644,0.01443&amp;g=1600+Pennsylvania+Avenue+Northwest,+Washington,+DC&amp;mra=ls&amp;ie=UTF8&amp;t=m&amp;ll=38.89768,-77.036519&amp;spn=0.008016,0.013733&amp;z=16&amp;output=embed">

        <img src="http://maps.googleapis.com/maps/api/staticmap?center=1600+Pennsylvania+Ave+NW,+White+House,+Washington,+DC+20500&markers=1600+Pennsylvania+Ave+NW,+White+House,+Washington,+DC+20500&size=300x300&sensor=false">

    </a>
</div>

I have tried to look for the non-javascript documentation relating to the iframe,but haven’t come across anything. I would like to add the following to the iframe:

Center on the marker – The JSFiddle appears centered, but the exact same code run on the production site renders an iframe with the marker appearing in the top left.

Remove the marker label “B”

Input my own coordinates from my database – for example… do the same for New York City, Chicago, etc.. However, I have tried changing the daddr (destination address), but am unsure what the other variable stand for (i.e. sll, sspn, g, mra, ll, etc.)

Get directions – insert starting point, and get directions to pre-determined destination

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T01:37:33+00:00Added an answer on June 17, 2026 at 1:37 am

    At first a explanation of the parameters you need:

    • f
      has to be d for directions

    • saddr
      the start-address, may be a string(would be geolocated) or a latLng

    • daddr
      the destination-address, may be a string(would be geolocated) or a latLng

    • ll
      where to center the map(latlng) .when ommited, the map will be centered based on the markers

    • z
      the zoom of the map. When ommitted the map will be zoomed based on the direction

    • output
      has to be embed for iframe

    A detailed list and explanation of the parameters you’ll find at http://www.seomoz.org/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters

    However: you should note that none of the parameters is a part of any official API, it may change every day


    The issues:

    1. Center on the marker:
      the marker could not be centered, because the iframe isn’t visible when the map starts loading, unable to determine the size of the iframe . You could use a workaround:

      First load a dummy-page into the iframe, when the fancybox is open, load the map.

      This can be done by adding this to the fancybox-options:

      beforeLoad: function(){
        //store the original href for later use
       this.oldhref=this.href;
        //replace the href with some dummy-page
       this.href='wait.htm';
       return true;
      },
      afterLoad:function(){
        //load the originally requested page to the iframe
       $('.fancybox-iframe').attr('src',this.oldhref);
      }
      
    2. Remove the marker label “B”
      there is no option to remove the B, all you can to is replace it with an A .
      Therefore you must set the marker as the marker for the start-destination (saddr)

    3. Input my own coordinates from my database
      apply the coordinates to saddr or daddr(depending on what it should be, start or destination)

    4. Get directions – insert starting point, and get directions to pre-determined destination
      see 3.


    Finally: you should consider to create a own map using the Maps-Javascript-API to get a map that you can handle yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to display a Google Map inside a drupal page. The map will
I am trying to display google map on my application.. For this I am
With google maps api (utlizing there new Places Library)Im trying to: Display a map
Im trying to display some files in a web page so the user can
I'm trying to display google map, with a form beside it in another div
I am trying to display google map as a tooltip using qTip jquery plugin.
I am trying to display markers on a Google Map from a PHP array
I am simply trying to display a google map within a jquery mobile page.
I'm trying to display a Google Map on a JQuery Mobile page, but am
i am trying to display google map on Android refering to this tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.