Skip Navigation

[Resolved] Toolset Maps

This support ticket is created 4 years, 10 months 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 9 replies, has 2 voices.

Last updated by jonS-4 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1469755

Tell us what you are trying to do?
Show markers on a Google map specifically 10 miles from the entered location. The visitor mustn't be able to change the radius.

Is there any documentation that you are following?
I've used Toolset Maps plenty of times before but can't see how I can set the radius without having an input field on the page.

Is there a similar example that we can see?
hidden link (use the link below first as there is a coming soon plugin installed as the site is still under construction)

What is the link to your site?
hidden link

#1470489

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

If you do not want to allow the users to change the distance radius, you should set the default distance to 10 and remove distance drop-down from the inputs_placeholder.

For example:

[wpv-control-distance distance_unit_url_param="toolset_maps_distance_unit" distance_radius_url_param="toolset_maps_distance_radius" distance_center_url_param="toolset_maps_distance_center" compare_field="stud-address" default_distance="10" inputs_placeholder="Show results within  %%CENTER%%"]

Please check the following screenshot:
=> https://toolset.com/wp-content/uploads/2019/01/maps-distance-filter-search-posts.png
Where:
- While adding the distance filter to your view, you need to set "Default filter radius" to 10
- At the section "Text and placeholders for input fields", you should remove/delete the %%DISTANCE%% word

More info:
=> https://toolset.com/documentation/user-guides/maps/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/

#1470729

Thanks Minesh, that was a part of the shortcode I hadn't spotted.

I've done as you said but it's still not working, though. If I enter 'London' in the box, I see the marker in London. That's fine. But if I try any other location I get the whole of the UK with every marker showing.

The criteria for this page is to never show all markers. Competitors would be able to easily get access to all the data so we want to make it harder for them. I need to only show the map after a location has been entered and the map display just that area and those markers within that area.

Some example searches that should show some results are:

Helston, UK
Isle of Man, UK
Norwich, UK

#1470805

Minesh
Supporter

Languages: English (English )

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

Can you please share problem URL and access details with a few test locations to test with and let me know with what location what markers should be displayed.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1470931

Minesh
Supporter

Languages: English (English )

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

First thing - I've changed the following marker code and adjusted the marker_id attribute as:
marker_id='marker-[wpv-post-id]' because marker_id should be unique:

[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_title='RETAILER NAME' marker_field='wpcf-retailer-map-location']<strong>[wpv-post-title]</strong><br>[types field='retailer-telephone-number'][/types][/wpv-map-marker]

So, the reason why distance search was not producing the correct results because the Google Map API key you registered was not correct at:
=> hidden link

For now, I've added my test Google map API key and it's working just fine. Can you please check and confirm.

Once you check, please try to create a non-restricted google map API key and once you register it click on the button "Check API" to see if the API key you registered is correct or not.

At last, please remove my test API key from your install. 🙂

#1470949

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.

New threads created by Minesh and linked to this one are listed below:

https://toolset.com/forums/topic/split-toolset-maps-display-no-markers/

#1470977

Minesh
Supporter

Languages: English (English )

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

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?
==>
The thing is that only non-restricted Google Map API keys works. So, you need to register only non-restricted map key.

For your new question, I'm splitting the ticket and I will handle it there.

You are welcome to close this ticket 🙂

#1471091

Thanks again for all your help. Before I close the ticket, I'm concerned about not being able to restrict the API keys. Is there not a big risk of it being hijacked and lots of costs incurred?

#1471095

Minesh
Supporter

Languages: English (English )

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

You should try to create a restricted API key and if it does not work you need to go with a non-restricted API key. This is something handled by google.

#1471103

My issue is resolved now. Thank you!