Can't use scrollwheel to zoom, nor can zoom out once zoomed in
This topic contains 18 replies, has 4 voices, and was last updated by Alex Rollin 5 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: map, mouse, pinch to zoom, scroll, scrollwheel, wheel, zoom
-
AuthorPosts
-
February 3, 2020 at 6:04 pm #528575
1. I found documentation about enabling mouse scrollwheel (https://wpgeodirectory.com/docs-v2/design/maps/) but I still don’t understand what to do; I want to enable it on my standard archive and details pages (the latter of which I’m using the archive page template for).
2. On mobile, I can pinch to zoom, but if I tap on a bubble on the map, it enlarges the map area around that bubble, but I can’t then pinch to zoom OUT, only further in?!
The site is https://WorldSchoolingHub.com
February 3, 2020 at 7:01 pm #528583Hi Romeo Crow,
THank for your post. Please allow me to answer your questions accordingly.
1. You need to edit the map shortcode and insert the parameter below to enable scrollwheel.
scrollwheel="1"2. Where can I see the map on your Website? It says I need to login. Does it work correctly on our demo? https://wpgeo.directory/supreme-directory/
February 3, 2020 at 8:21 pm #528589This reply has been marked as private.February 3, 2020 at 10:37 pm #528612Where can I see the map on your Website?
February 3, 2020 at 10:38 pm #528614February 7, 2020 at 10:05 pm #529351This reply has been marked as private.February 9, 2020 at 5:02 pm #529539Apologies for that, please try again using the log in details above.
February 9, 2020 at 6:31 pm #529561This reply has been marked as private.February 10, 2020 at 2:15 pm #529665This reply has been marked as private.February 10, 2020 at 7:26 pm #529717Changing the Supreme Archive template map shortcode requires a customization of the template php file.
The developers have been alerted and will let us know if there another workaround for that.
February 12, 2020 at 6:28 am #529925Hi Romeo ,
You can use following code snippet to change the map shortcode.
add_filter('sd_archive_gd_map_shortcode', 'sd_archive_gd_map_shortcode_custom_callback', 10, 1); function sd_archive_gd_map_shortcode_custom_callback( $shortcode ){ $shortcode = '[gd_map width="100%" height="425px" maptype="ROADMAP" zoom="0" map_type="directory" post_settings="1" post_type="gd_families" scrollwheel="1"] '; return $shortcode; }Thanks
February 12, 2020 at 12:52 pm #529961Thanks for the code. It worked – scrollwheel is enabled – but it also made the map smaller by half a screen.
Here’s a quick video: https://drops.audience.ninja/Qwu7Wv8z
Is there an additional/amended code that would sort that?
Also, not the same point, but connected (happy to make another thread if you want); can you also provide a code/way to enable mouse scrolling on the maps on the Details page? (see above link/video to see what I mean)
February 12, 2020 at 1:59 pm #529969Hi Romeo ,
try it.
add_filter('sd_archive_gd_map_shortcode', 'sd_archive_gd_map_shortcode_custom_callback', 10, 1); function sd_archive_gd_map_shortcode_custom_callback( $shortcode ){ $shortcode = '[gd_map width="100%" height="100vh" maptype="ROADMAP" zoom="0" map_type="auto" scrollwheel="1"]'; return $shortcode; }Thanks
February 12, 2020 at 2:33 pm #529980That works like a charm, thanks!
Should I open a separate ticket about getting the mouse scrollwheel to work on the Details page maps too, or can you supply the code here?
February 12, 2020 at 2:42 pm #529984This reply has been marked as private. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket