Skip Navigation

[Resolved] Split: Toolset Maps – display no markers

This support ticket is created 5 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by jonS-4 5 years ago.

Assisted by: Minesh.

Author
Posts
#1470979

Excellent! Many thanks for that. I've now removed the API restrictions on my key and put it back instead of yours. I will need to restrict it, though. What's the best method for this?

Finally, how can I prevent a view where all markers are shown? I only want to show markers within the set radius of the location entered and never show them all.

Thanks again.

#1471051

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Do you mean that by default when the page loads the first time there should not be a map displayed with the pins?

#1471053

Hi Minesh

Yes. I don't want visitors to be able to see all the pins, only pins within the radius of the entered location.

#1471073

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok great.

I've added the following code to "Custom Code" section offered by Toolset:
=> hidden link

add_filter( 'wpv_filter_query', 'func_no_results_first', 99, 3 );
function func_no_results_first( $query_args, $view_settings, $views_id  ) {
    if ( $views_id == 2348 && !isset($_GET['wpv_view_count']) ) { // if it is specific view and by default
        $query_args['post__in'] = array(0);
    }
    return $query_args;
}

You can customize the "No Items found" message within your view's Loop Editor section with some fancy text 🙂

#1471089

My issue is resolved now. Thank you!