Skip Navigation

[Resolved] Display Current location with Map focus on marker.

This support ticket is created 6 years, 3 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 6 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#607197
img.jpg

This is what I want to do.
(1) Press "Map focus on marker"
(2) Display current_visitor_location.

Currently, location shows immediately when opening page. I want to make it stop until pressing a Map focus on marker button.
I try to hide with CSS and display with JS not working. I couldn't hide with CSS.

#607219

Hi, Maps does not offer the ability to show or hide the User Location pin on demand. You have two options available for showing the User's Location on the map:
- Render the map immediately without the User's Location marker, then add the User Location marker once the User's Location has been determined by the browser.
- Wait to render the map until the User's Location has been determined, then render the map with the User's Location marker

Any other customization will require custom code. We do not offer that type of customization here in the support forums, but I can give you some guidance. To access the Map JavaScript object, use the WPViews.view_addon_maps.get_map function like this:

WPViews.view_addon_maps.get_map('map-123');

hidden link

You can access the Map Marker objects using this syntax:

WPViews.view_addon_maps.markers.['map-123']['marker-456'];

hidden link

If you need professional assistance with this code, you may be able to connect with a consultant over in our Contractors portal: https://toolset.com/contractors/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.