Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Problem with embedded map zooming in iframe

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #177071
    mintdesigner
    Participant

    I am using the google map iframe code. I want to disable map zooming when the user uses mousewheel to scroll the page but the map should be interactive when the user clicks on the map. I tried disabling by giving pointer-events: none , but it disables the zooming completely.
    Please help.

    I have a reference similar to which I want the map to function

    Reference Link : http://www.salttechno.com/contact-top-web-designers-pune-india/

    My website link : http://fiveonlineclient.in/project/vizcom/

    #177892
    mintdesigner
    Participant

    Thanks for the reply. I am clueless about the api thing. I guess there has to be some specific code with api key which will be mentioned in the javascript source. If yes, how to find out the api key? Even in documentation, they have mentioned in second line of javascript. If I implement as it is, I am getting a london map. I need the one I registered for. Please help.

    <script type=”text/javascript” src=”http://maps.google.com/maps/api/js?sensor=true”></script&gt;

    #177896
    Paulie_D
    Member

    I need the one I registered for.

    You didn’t note it when you registered?

    Better go look again.

    #178289
    mintdesigner
    Participant

    The registration has been done by the client. He has just sent me the link for the map from where I can use the embed code.

    #178292
    Paulie_D
    Member

    The registration has been done by the client.

    Then you know where to get the Key….

    #178870
    mintdesigner
    Participant

    Thanks @ Soronbe. I found the solution.

    #246788
    n00bctrl
    Participant

    I used &lt;div class="overlay" onClick="style.pointerEvents='none'"&gt;&lt;/div&gt;
    [googlemaps https://mapsengine.google.com/map/embed?mid=some_map_id&w=100%&h=480]
    .overlay {
    background:transparent;
    position:relative;
    width:100%; /* your iframe width */
    height:480px; /* your iframe height */
    top:480px; /* your iframe height */
    margin-top:-480px; /* your iframe height */
    }

    There a good tutorial on it here: https://jonnyjordan.com/blog/disable-mouse-scroll-wheel-zoom-embedded-google-map-iframes/

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.