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)
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%%"]
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:
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.
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:
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. 🙂
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:
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.
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?
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.