Home › Forums › Calendar Products › Events Calendar PRO › Map zoom in/out false and keep markers clickable
- This topic has 7 replies, 4 voices, and was last updated 7 years, 3 months ago by Aaron.
-
AuthorPosts
-
January 11, 2017 at 2:22 am #1216425AaronParticipant
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.
January 11, 2017 at 12:58 pm #1216867NicoMemberHi 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,
NicoJanuary 11, 2017 at 3:08 pm #1216980ThomasParticipantHi 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 TomJanuary 11, 2017 at 3:17 pm #1216985ThomasParticipantWorks, with coding the file above. π
January 11, 2017 at 8:41 pm #1217164AaronParticipantThanks Nico , this works for me .
January 11, 2017 at 9:37 pm #1217190AaronParticipantI would like to change the map marker icon ,how to set this ?
January 12, 2017 at 1:29 pm #1217673NicoMemberHey 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/301cd35ada82e5ae77a5a311df573f10If 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 -
AuthorPosts
- The topic ‘Map zoom in/out false and keep markers clickable’ is closed to new replies.