Decenter marker of Google maps in an iFrame

Posted on 2012-08-13
Last Modified: 2012-08-18

I'm trying to decenter the marker of google maps which is in an iframe. It always marks 1 and the same address, but the marker always shows in the center, i would like to move it to a defined position.

Is this possible?
If yes, how?

Question by:peps03
    LVL 107

    Expert Comment

    by:Ray Paseur
    In the static mapping class shown here you have a setCenter() method.  You can use that to set the center point, then put the marker wherever you want it (off center).

    Author Comment

    Is there no iframe method to achieve this?

    all this extra code for 1 setting..

    Accepted Solution

    I fixed it. Dragging the map to the correct center position before creating the embed link (iframe) does the trick.

    Hopefully somebody will find this post useful.

    Author Closing Comment

    see answer

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now