Skip Navigation

[Résolu] The map is displaying twice

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

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

Dernière mise à jour par Adrian Il y a 7 années.

Auteur
Publications
#592985

I am trying to:

Display some pins on a map.

Link to a page where the issue can be seen:

view-source:lien caché

I expected to see:

A map with pins

Instead, I got:

Two f***ed up maps displaying someplace in the middle of the ocean (no pins).

My code:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
          [wpv-map-render map_id="map-1"]
          
          [wpv-conditional if="( $(wpcf-featured) eq '1' )"]
            [wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_icon="<em><u>lien caché</u></em>" marker_title="[wpv-post-title]" marker_field="wpcf-event-address"]
              [wpv-conditional if="( $(wpcf-conference-page) ne '' )"]
          		<!-- Start Date Found, Adding Button -->
                <a class="event_link" href="[types field='conference-page' output='raw'][/types]">Register</a>
              [/wpv-conditional]
          	  [wpv-conditional if="( $(wpcf-conference-page) eq '' )"]
          		<!-- No Start Date Found, Adding Form -->
          		[gravityform id="1" title="false" description="false" ajax="true" tabindex="9999" field_values="event_name=[wpv-post-slug]"]
          	  [/wpv-conditional]
            [/wpv-map-marker]
          [/wpv-conditional]
          
          [wpv-conditional if="( $(wpcf-featured) ne '1' )"]
          
          [wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_icon="<em><u>lien caché</u></em>" marker_title="[wpv-post-title]" marker_field="wpcf-event-address"]
              [wpv-conditional if="( $(wpcf-conference-page) ne '' )"]
          		<!-- Start Date Found, Adding Button -->
                <a class="event_link" href="[types field='conference-page' output='raw'][/types]">Register</a>
              [/wpv-conditional]
          	  [wpv-conditional if="( $(wpcf-conference-page) eq '' )"]
          		<!-- No Start Date Found, Adding Form -->
          		[gravityform id="1" title="false" description="false" ajax="true" tabindex="9999" field_values="event_name=[wpv-post-slug]"]
          	  [/wpv-conditional]
            [/wpv-map-marker]
          
          [/wpv-conditional]
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

No javascript errors on the front.

#592987

Never Mind, just realized I put the Map inside the loop.