• Currently, the plugin does only display the search results from the filter.

    But when the user zooms out, I want the plugin to load all available locations currently available within the current map area.

    How can I do that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Zoker

    (@zoker)

    Any answere here?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    This is unfortunately not possible without modifying the core files.

    If you’re comfortable with code, then I can point you in the right direction.

    Thread Starter Zoker

    (@zoker)

    Yes, I’m comfortable with code, but in my opinion, this is a very basic function and should be included in the plugin.

    Since this is the standard way, google maps works and most people are familiar with google maps, they might be misled by the result without this function.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The search results you see are there because they fall withing the set search radius in combination with the searched location

    If I search for Pizza Rotterdam and zoom out, then Google Maps doesn’t suddenly shows pizza restaurants in nearby cities for me.

    It’s on the todo list for the 2.3 update, so I will make this an optional feature.

    What you need to do is use the zoom_changed event listener.

    
    google.maps.event.addListener( map, "zoom_changed", function() {
       // your custom code.
    });
    

    In the custom code section call makeAjaxRequest and pass a param when it’s done from withing in the event listener. If this is set, then use a make sure to modify the ajaxData values. So set the search radius to 10000 or so to make sure everything is included.

    You may also want to disable the zoom button, when the new data is loaded to prevent people triggering several ajax requests at the same time when the for example zoom back from level 5 to 10 or so.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dynamically load more locations on zoom-out’ is closed to new replies.