center map by choose category

New home Forums Pro Add-on General queries center map by choose category

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #72409
    katys
    Participant

    hello,

    i have set some categories for marker. then i set categories to the markers. now, if user choose some category, can your plugin focus the map where all marker in current category are “clustered”?

    i hope you understand what i mean.

    if i choose some category at the map, the map is focused on a “empty” place (without marker) but in the category there are some markers. only on another place.

    is a automatic “cluster”/”zoom”/”focus” possible, if a user choose a category?
    i have the plugin pro and gold.

    #72418
    Matthew
    Moderator

    Hi there,

    Thank you for getting in touch, we do appreciate your time.

    Yes this is achievable by enabling the “Fit map bounds to markers after filtering” setting which can be found by navigating through to Maps -> Maps -> Edit -> Advanced Settings.

    Once you have enabled and saved the setting, please do let me know if this helps?

    Kindest Regards,
    Matthew

    #72426
    katys
    Participant

    thank you. it called in germany “Kartengrenzen nach dem Filtern an Markierungen anpassen?”

    #72427
    katys
    Participant
    This reply has been marked as private.
    #72431
    Matthew
    Moderator

    Hi again,

    Thank you for your response and time on this.

    I have run a few tests regarding the map only displaying 1 marker, and it appears that both markers are shown, however, only the exact coordinates are in view thus you cannot see the marker icon.

    This can be resolved with some custom JS code which I have written for you below:

    jQuery(function($){
        $(document).on('filteringcomplete.wpgmza', function(){
            var currentZoom = WPGMZA.maps[0].zoom;
    
            WPGMZA.maps[0].setZoom(currentZoom - 0.5);
        })
    })

    Please may you copy, paste and save the above custom JS code into the “Custom JS” setting block (Maps -> Settings -> Advanced Settings)?

    Once this has been done, please may you clear your browser cache and confirm if this helps?

    I look forward to your response.

    Kindest Regards.
    Matthew

    #72434
    katys
    Participant

    oh thank you. that work.

    #72445
    Matthew
    Moderator

    Hi there,

    Thank you for getting back to me, I really appreciate it!

    That is great to hear and it was my great pleasure assisting you with this.

    Please may you kindly consider reviewing our plugin at https://wordpress.org/support/plugin/wp-google-maps/reviews/#new-post?

    It would really mean the world to me! And if possible, please could I kindly ask you to mention both your name and mine in the review for administrative purposes as this would be a tremendous help?

    Should you ever require any further assistance, I am more than happy to help.

    Have a great day further!

    Kindest Regards,
    Matthew

    #72448
    katys
    Participant

    hello,

    can you help why the zoom-level is so deep?
    you can use the map that i send you.
    if you choose the categorie “Erzgebirge”. the zoomlevel is tooo deep. how can i change ist?

    another question:
    and how can i set, that all Markers will be show, if i visit the page without changing the catagory?
    now the category “all” is select, if i visit the page. but no marker is show.
    under “all” i understand, that no categorie is selected.

    #72470
    Matthew
    Moderator

    Hi there,

    The ‘deep zoom’ appears to be caused by the “Fit map bounds to markers after filtering” setting as it will zoom into the marker as much as it can to fit the bounds to the marker. Please may I ask if you may set the “Maximum Zoom Out Level” setting (Maps -> Maps -> Edit -> Advanced Settings) to a lower value such as ’18’ and confirm if this helps?

    With regards to no markers being shown when you load the page, this is due to the “Hide all markers until a search is done” setting being enabled (Maps -> Maps -> Edit -> Store Locator), thus please may you disable this setting to display all the markers when the page loads.

    Please do let me know if this helps?

    I look forward to hearing back from you.

    Kindest Regards,
    Matthew

    #72478
    katys
    Participant

    deep zoom:
    yes the zoom-level “Maximale Verkleinerungsstufe” is 18. But it does not change something.
    it is also deep. i have also try 10 or 20, nothing change. 🙁

    show markers:
    that work. thank you.

    #72492
    Matthew
    Moderator

    Hi again,

    Thank you for the confirmation, it appears that the Zoom level that is being retrieved from the radius is ’28’ which is is a really deep zoom level.

    I have thus written some custom JS code for you below that should resolve this deep zoom level:

    jQuery(function($){
        $(document).on('filteringcomplete.wpgmza', function(){
            const zoom = WPGMZA.maps[0].zoom;
            if(zoom > 20){
                WPGMZA.maps[0].setZoom(18);
            }
        })
    })

    Please may you copy, paste and save the above custom JS code into the “Custom JS” setting block (Maps -> Settings -> Advanced Settings)?

    Once this has been done, please may you clear your browser cache and confirm if this helps?

    I look forward to your response.

    Kindest Regards,
    Matthew

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