Clicking on marker listing zooms map waaayyy out

New home Forums Pro Add-on Clicking on marker listing zooms map waaayyy out

Tagged: ,

  • This topic has 8 replies, 2 voices, and was last updated 1 year ago by Matthew.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #27781
    WPMonkey
    Member

    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?

    Thanks

    #27783
    SupportTeam
    Moderator

    Hi there

    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?

    #27788
    WPMonkey
    Member

    Certainly, point me to it.

    If I change that code, will it get blown out with a plugin update?

    #27789
    WPMonkey
    Member

    Would the max zoom out influence the zoom when a listing is clicked on?

    #27793
    SupportTeam
    Moderator

    Hi there

    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:

    MYMAP[map_id].map.setZoom(13);

    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?

    #27797
    WPMonkey
    Member

    Feature request to turn that into an option to toggle on or off?

    #27800
    SupportTeam
    Moderator

    Hi there

    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?

    #74541
    [email protected]
    Participant

    Hi guys.

    Was this ever implemented as an update to toggle instead of altering code as suggested above?

    #74567
    Matthew
    Moderator

    Hi there,

    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.

    Kindest Regards,
    Matthew

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.