I am trying to: ensure all google map markers are displaying for each user/users have multiple CPTs with markers
Link to a page where the issue can be seen:hidden link
I expected to see: lets focus on Poland. There is a user who has submitted 6 CPT that correspond to a address in poland but only one of their CPTs is showing on the map. I have other examples from users who have submitted CPT and only one of their markers is showing up.
Instead, I got: I am hoping that when a user submits a CPT that has an address, all of their published CPT will show on the map. I have tested if it is related to similar addresses being submitted but this did not result in a change. Our users submit daily CPT (gives) and attach an address to where they completed this action and I had hoped that each published CPT (action) would show up on the map. Just not sure what is wrong in the configuration. I also think that the posts stopped posting on the map a while ago...as of a certain date, have tested if there is a conflict with a plug in and i have not found one yet...
Hi, can you provide more information?
- Take a screenshot or screenshots showing the entire Map View editor screen in wp-admin. Expand any sections so I can see their contents.
- Copy any markup code in the Loop Output and any code included in Content Templates and paste it all here for me to review.
- Disable all other plugins except Types, Views, and Maps. Test again. If the missing results begin to appear, reactivate plugins one by one until the conflict is revealed.
- Find one of the missing posts in wp-admin and check the value of the location field. Let me know what you find.
Christian,
I have disabled all the plugins and i did not get a change..
Here is all in the code in the loop output editor
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
[wpv-map-render map_id="map-1" map_width="100%" map_height="600" map_type_control="off" street_view_control="off" marker_icon="<em><u>hidden link</u></em>"]
<wpv-loop>
[wpv-conditional if="(has_term('animal-gives', 'type-of-give', null) eq '1')"]
[wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_icon="<em><u>hidden link</u></em>" marker_field="wpcf-address-where-you-completed-your-give"][/wpv-map-marker]
[/wpv-conditional]
[wpv-conditional if="(has_term('environment-gives', 'type-of-give', null) eq '1')"]
[wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_icon="<em><u>hidden link</u></em>" marker_field="wpcf-address-where-you-completed-your-give"][/wpv-map-marker]
[/wpv-conditional]
[wpv-conditional if="(has_term('people-gives', 'type-of-give', null) eq '1')"]
[wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_icon="<em><u>hidden link</u></em>" marker_field="wpcf-address-where-you-completed-your-give"][/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]
Where we seem to be getting stuck, though it did work at one point, is when a user submits multiple CPT (which show on the map) it is only showing one of their submitted cpt not all of their submissions (users can submit cpt through a form and their submission is to show up on the map - users submit more than one cpt but only one cpt is showing on the map) so i am not sure if this is designed to only show one icon at one time for one user or if one user can post multiple icons on the map...
hope that makes sense....
I don't see anything in the View that would prevent multiple icons for a single User, unless the User includes the exact same address in multiple CPTs. I suspect that could be happening here. Please locate some CPTs that seem to be missing in the map, and check the address field for each one. My guess is that several CPTs use the same address, and the icons are all placed on top of one another. You can use icon clustering or Spiderfy features to help differentiate multiple icons in a single area: https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/
If the addresses are different yet the icons do not appear, then please add some code to the end of your map View's Loop so we can investigate in more detail. This code will add some text to the page source without displaying it to your site visitors:
<wpv-loop>
...
<div style="display:none;">
[wpv-post-title]: [wpv-post-field name="wpcf-address-where-you-completed-your-give"]
</div>
</wpv-loop>
We can then inspect the page source and see what's going on.
Christian
Boy do i ever feel dumb...you are right they were on top of each other....feel silly for even asking and did not zoom in enough to see all of them....the owners of the site do not want to spiderfy or cluster the icons so we will just leave it as it is...but at least i can now explain it to people....
so sorry for my dumb question and thanks for showing me the way.....