Skip Navigation

[Résolu] Display Current location with Map focus on marker.

This support ticket is created Il y a 6 années et 10 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Christian Cox Il y a 6 années et 10 mois.

Assisté par: Christian Cox.

Auteur
Publications
#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');

lien caché

You can access the Map Marker objects using this syntax:

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

lien caché

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/