Skip Navigation

[Closed] Map search distance taking wrong adress

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

Last updated by Minesh 2 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#2405413

We have a Google Map where people can locate their therapist.
When they search for example 'fysiotherapeut 25 km from Ede, the Netherlands, you get to many results.

We found the reason: people did only enter their adress and not their City in the Custom Post Type.
So Google Maps is choosing the city for them with a same adress.

But:
In the Custom Post we have 2 fields with adressess, both using Google Maps.

For the searchform, we need the second adress field, with the slug adres-voor-maps.
This is also used in the View:

...
[wpv-control-distance default_distance="25" compare_field="adres-voor-maps" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit" inputs_placeholder="Toon de resultaten binnen %%DISTANCE%% KM van de volgende plaats of POSTCODE, aangevuld met de twee LETTERS: %%CENTER%%"]
...

But the form is taking the first adressfield with Google Maps, named adres.

Link to the site: hidden link

Q: how can we make sure the distance checker in the View is using the right (second) Maps field of the Custom Post Type to calculate and show the distance?

#2405681

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

In order to check whats wrong with your setup, I will require admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2405851

Minesh
Supporter

Languages: English (English )

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

I see within the view's loop there are two marker shortcodes are added:
=> hidden link

 [wpv-map-marker map_id="map-2" marker_id="marker-[wpv-post-id]" marker_icon='//reumanetnl78.e.wpstage.net/wp-content/plugins/toolset-maps/resources/images/markers/Shop-2.png' marker_field="wpcf-adres-voor-maps"]
          <strong>Bekijk gegevens: [wpv-post-link]</strong>
      [/wpv-map-marker]
      [wpv-map-marker map_id="map-2" marker_id="marker-2-[wpv-post-id]" marker_icon='//reumanetnl78.e.wpstage.net/wp-content/plugins/toolset-maps/resources/images/markers/Shop-2.png' marker_field="wpcf-adres-voor-maps-2"]

Is it by mistake or you added it as you want two markers for one post?

Also, if I check with the same address string "'fysiotherapeut 25 km from Ede, the Netherlands" I got 17 results. Is this correct?

In addition to that, how you do that it queries the address field "adres" instead of "adres-voor-maps.".

What if you try to re-add the distance filter. Remove existing distance filter and re-add it using the field "adres-voor-maps.".

The topic ‘[Closed] Map search distance taking wrong adress’ is closed to new replies.