Skip Navigation

[Resolved] Toolset Maps Pin colours

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display different map marker pins with Toolset maps

Solution:
you can display different map markers using [wpv-conditional] conditional shortcode.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/toolset-maps-pin-colours/#post-855057

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/
=> https://toolset.com/documentation/user-guides/maps-shortcodes/#wpv-map-marker

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

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 6 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#854693

Hello,

I need to create a map with properties. The properties will be inserting by two types of users (simple users and constructors).
May i use a category or a custom field to separate which building is registered from whom on properties taxonomy.

This that i need is to have a map at my home page which will have all properties (from simple users or constructors), but the buildings from simple users will be marked with green pin and the building for constructors with blue pin.

Is there any way to do this?

Please advive,

Kind regards,
Soileme Elissavet

#855057

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you can display different map markers using conditional display. You can use either custom field or taxonomy which suits best for you. You can find following example with taxonomy term.

For example:

[wpv-conditional if="( has_term('simple', 'user-type', null) eq '1' )" ]
 [wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_field='wpcf-address' marker_icon=''][wpv-post-link][/wpv-map-marker]
[/wpv-conditional]

[wpv-conditional if="( has_term('constructors', 'user-type', null) eq '1' )" ]
 [wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_field='wpcf-address' marker_icon=''][wpv-post-link][/wpv-map-marker]
[/wpv-conditional]


Where:
- User type is a taxonomy and "simple" is term
- set different marker_icon image when you add marker.
- adjust map_id accordingly

You can use "marker_icon" attribute to display different icon images.

Here is the details attributes available with [wpv-map-marker] shortcode:
https://toolset.com/documentation/user-guides/maps-shortcodes/#wpv-map-marker

More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/