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.
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/