Skip Navigation

[Resolved] Current user location

This support ticket is created 5 years, 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1306767

I need to mark on the map the current user location.

I am using the code bellow:
[wpv-geolocation]
[wpv-map-marker map_id='feed-map-filter' marker_id='marker-6' marker_field='visitor_location' map_width="100%" map_height="600"]
[/wpv-map-marker]
[/wpv-geolocation]

But it did not work.

Question: on the marker_field I am using 'visitor_location'. Is that correct ?

Tks,

Guido.

#1307051

Hi, first you need to be sure your site is served on HTTPS. Without HTTPS, the browser's geolocation API will not work. The documentation here contains some additional information about displaying the User's current location: https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#displaying-current-visitor-location

The marker_field attribute should not be used here. The shortcode looks something like this:

[wpv-map-marker map_render='immediate' current_visitor_location='true' map_id='feed-map-filter' marker_id='marker-6'][/wpv-map-marker]