- This topic has 8 replies, 2 voices, and was last updated 3 months ago by Matthew.
June 8, 2017 at 10:58 pm #27781WPMonkeyMember
I am using the Advanced table marker listing style and when you click on a listing the map zooms way out so you can’t even see where the marker is located because others overlap. I would assume that the map would maintain the same zoom originally set for it, or even zoom in by one when a listing is selected.
Is there an option where I can change this behavior?
ThanksJune 8, 2017 at 11:07 pm #27783SupportTeamModerator
Thank you for getting in touch with us.
Unfortunately there isn’t an option or setting available to change this at the moment, however I can direct you to the line of code that handles this, and this can be commented out to maintain the current zoom level.
Would this perhaps be an option for you?June 8, 2017 at 11:21 pm #27788WPMonkeyMember
Certainly, point me to it.
If I change that code, will it get blown out with a plugin update?June 8, 2017 at 11:22 pm #27789WPMonkeyMember
Would the max zoom out influence the zoom when a listing is clicked on?June 8, 2017 at 11:52 pm #27793SupportTeamModerator
Unfortunately the changes would be undone after an update.
To prevent the map from changing its zoom level when clicking on a marker listing item, navigate to wp-google-maps-pro/js/core.js and scroll down to line 2814 where you will find a line of code that looks like this:
This can be commented out and will ensure that the map maintains its current zoom level. The zoom out level will not be influenced by these changes.
I hope this helps?June 9, 2017 at 12:29 am #27797WPMonkeyMember
Feature request to turn that into an option to toggle on or off?June 9, 2017 at 7:24 am #27800SupportTeamModerator
I’ve added this as a feature request to our development schedule to ensure this is considered for a near future release.
Just to confirm, did the above changes help in the meantime?August 31, 2022 at 1:15 pm #74541[email protected]Participant
Was this ever implemented as an update to toggle instead of altering code as suggested above?September 2, 2022 at 2:48 pm #74567MatthewModerator
Thank you for getting in touch with us, we do appreciate your time.
Unfortunately it appears that a setting for this was never introduced, however, we would not provide some custom JS code to be inserted into the “Custom JS” setting block to do this instead of editing the core code of the plugin which would be overridden when the plugin is updated.
I have added this as a feature request to our list so that we may look into this and add it accordingly.
With that said, if you are wanting the custom JS code to please may I ask if you would be open to providing me with the link to your map so that I may take a closer look and write the custom JS code for you?
I look forward to hearing back from you.
- You must be logged in to reply to this topic.