Skip Navigation

[Resolved] Split: converting markers from multiple maps into a single map

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 7 replies, has 2 voices.

Last updated by martinP-13 1 month, 4 weeks ago.

Assigned support staff: Waqar.

Author
Posts
#2152607

i have made progress on the maps
i have ad category as follows

Dogs Lost And Found
--lost
--found
--Suspicious Activity
--stolen

the 4 sub ad categories have
a post form each which post to the correct sub ad cat automatically
a view each so I can have different map icons

the parent ad cat is here hidden link
it uses the view hidden link

here are the problems
there are 6 ads in the parent ad cat ,all six show on the maps , but not on one map ?
for some reason there are 6 maps with a pin on each advert ?
so basically there are 6 maps ,1 for each advert the pins for each map is correct.

so the questions are , how do i make the 6 maps into 1 map with all 6 icons on that map ,and use the map icon that is assghned to the sub category .

the end goal is to add a distance filter and a filter to select which pins to see on the map

thank you waqar sorry for the long post.

#2152649

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

When I checked the view "map for lost and found top level" the map's shortcode was placed inside the loop item content, which is why it was repeating for each result.
Before Screenshot: hidden link

I've moved it out from the view's loop and now it is showing only once and all result markers are showing on that same map.
After Screenshot: hidden link

To show a different marker icon for each result, you can pass the target image/logo in the map marker's shortcode through the "marker_icon" attribute, for example:
( ref: https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker )


[wpv-map-marker map_id='map-35' marker_id='marker-[wpv-post-id]' marker_field='wpcf-google_address-6c98f428' marker_icon='//gundog.world/wp-content/plugins/toolset-maps/resources/images/markers/Buildings.png'][/wpv-map-marker]

I'm not sure exactly using which plugin have you added the category icon field for the Ad category terms, but you can use that plugin's own method to get the image from that field and then use it in the map marker shortcode.

regards,
Waqar

#2153213

thankyou for that , i have tried numerous conditions etc , how ever i either have no pins or all pins are the buildings , im unsure what you mean by

I'm not sure exactly using which plugin have you added the category icon field for the Ad category terms, but you can use that plugin's own method to get the image from that field and then use it in the map marker shortcode.

in my theme i added a parent ad category and 4 childs , each child has a view with the map and icon ,all 4 have different icons,
i have 4 post forms in toolset to post to the child ad categories, , im totaly lost how to have different icons for each , do i need to use 4 condition using has _term ? have you any working examples to look at?
thank you

#2153713

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

I understand that you'd like to link the map marker icon with the icon/image set in the "Google Map Icon URL" term field.
( screenshot: hidden link )

However, I'm not sure whether this field is added by the theme or any third-party plugin. It is not added using the Toolset Types plugin.

Do you have any information about this field's background/origin?

#2153743

ah i see , sorry that is from the plugin mappress....

#2153745

ah i see sorry that is from the plugin mappress , hidden link thanks

#2155017

now i understand what you ask....

i had set 4 views for the single ads in each sub category so each had a different marker on the post.
the parent category had a view and a map (now working thanks to you )

from here i made a error , i had left a old plugin loafing the map on the 4 sub ad categories (responsible for the star marker) , i have now unloaded this map .
i have now made 4 new vies for the 4 sub ad categories , they work fine , and show unique icons
parent hidden link view as above
sub 1 hidden link view map-for-lost-sub-category
sub 2 hidden link viewmap-for-suspicious-sub-category
sub 3 hidden link view map-for-found-sub-category
sub 4 hidden link view map-for-stolen-sub-category

i wish to have the relevant markers show on the top level , with a filter to show the pins from each sub category.
also i cant seem to get the map to be more than 250px high...

many many thanks

#2155623

My issue is not resolved i surrender!