Skip Navigation

[Resolved] The map is displaying twice

This support ticket is created 7 years 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.

This topic contains 1 reply, has 1 voice.

Last updated by Adrian 7 years ago.

Author
Posts
#592985

I am trying to:

Display some pins on a map.

Link to a page where the issue can be seen:

view-source:hidden link

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