Map zoom in/out false and keep markers clickable

Home Forums Calendar Products Events Calendar PRO Map zoom in/out false and keep markers clickable

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1216425
    Aaron
    Participant

    Hi ,
    I want to disable the map scrollwheel .I have search out for many solutions like

    #tribe-geo-map {
    pointer-events: none;
    }

    .gmnoprint div ,.gm-style-iw {
    pointer-events: auto;
    }

    But this solution also make the venue markers UN-clickable .I want to false scrollwheel and want to make markers clickable .

    Thanks.

    #1216867
    Nico
    Member

    Hi there Aaron,

    Thanks for getting in touch with us! Hopefully you can alter the map settings via JS after it’s initialized πŸ™‚

    The code to do so is the following:

    tribe_ev.geoloc.map.set('scrollwheel',false);

    You’ll need to execute that after the page loads!

    Please let me know if you still need further help on this,
    Best,
    Nico

    #1216980
    Thomas
    Participant

    Hi Nico,

    thx for your code. can you please give me a little bit more information about the javascript file. Do you mean the following file?

    /events-calendar-pro/src/resources/js/tribe-events-ajax-maps.js

    thx in advanced,
    best wishes Tom

    #1216985
    Thomas
    Participant

    Works, with coding the file above. πŸ˜‰

    #1217164
    Aaron
    Participant

    Thanks Nico , this works for me .

    #1217190
    Aaron
    Participant

    I would like to change the map marker icon ,how to set this ?

    #1217673
    Nico
    Member

    Hey folks, thanks for following up!

    I’m glad this worked for both of you πŸ™‚

    Some comments before I close out the thread:

    @ Thomas, there’s no need to edit the file. You can use that code from an existing theme (or child theme) JS file. In any case here’s a sample snippet you can paste in your theme’s (or child theme’s) functions.php file, which inserts the JS snippet in the head tag if you are viewing map view (uses jQuery):
    https://gist.github.com/niconerd/301cd35ada82e5ae77a5a311df573f10

    If you need further help, please open up a new thread for this and include a link back to this one!

    @ Aaron, hopefully it’s now possible to change the map pin via customizer. I’ve answered this in the original thread β†’ https://theeventscalendar.com/support/forums/topic/change-events-google-map-icon/#post-1217662

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Map zoom in/out false and keep markers clickable’ is closed to new replies.