Inicio › Toolset Professional Support › [Resuelto] View Toolset Map with different pointers
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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Este tema contiene 11 respuestas, tiene 2 mensajes.
Última actualización por hispavista-s.l.E hace 1 año, 8 meses.
Asistido por: Nigel.
Hello,
I am trying to create a map with different pointer according to the category that each location has.
The plugins I am working with are Toolset Type, Toolset View, Toolset Map and Elemntor Pro.
Toolset Map is configured and I get a new Custom Post Type called "OUM locations" where I find custom fields for the map.
I have already created the taxonomy for the CPT OUM locatons to have different pointers according to the terminology you select in each location.
I want to visualize the map using Elementor Pro. In the documentation I can't find the way to do this. When I go to create a View it does not show me to select the CPT of OUM locations.
How can I visualize the map?
Is there any shortcode to visualize the map?
How do I generate a View for a map?
How can I do so that depending on the terminology chosen the pointer is different?
Best regards and thanks.
Idiomas: Inglés (English ) Español (Español )
Zona horaria: Europe/London (GMT+00:00)
Hi there
It sounds like you are working with the legacy interface, and there is good description of how to implement this in another thread here: https://toolset.com/forums/topic/different-map-marker-for-each-of-the-terms-within-a-taxonomy-on-map-view/
Our documentation refers to the new Block editor, where the workflow is slightly different.
There is this old documentation page about the legacy workflow which I suggest you review: https://toolset.com/documentation/legacy-features/maps-plugin/displaying-markers-on-maps/
Regarding creating a View and not being able to see the OUM post type, how did you register the post type? Is it public?
Hi Nigel,
I'm passing you screenshot of how is my map configuration in Toolset to see if there is something wrong after following a Toolset guide.
I also send you a screenshot of how the UOM CPT does not show me the locations to generate the View. If I manage to create a View I will try the solution you send me to add more than one pointer according to the taxonomy.
Best regards and thanks
Idiomas: Inglés (English ) Español (Español )
Zona horaria: Europe/London (GMT+00:00)
>Regarding creating a View and not being able to see the OUM post type, how did you register the post type? Is it public?
Do you have any information about that?
Perhaps we could take a look at your site to see if we can identify the problem with creating a View to query the UOM post type.
Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.
Idiomas: Inglés (English ) Español (Español )
Zona horaria: Europe/London (GMT+00:00)
It looks like the OUM Location post type is registered by a plugin (Open User Map), and the post type is not public, so you cannot create a View to display OUM Location posts.
You could check with the plugin documentation or support if they have a filter available that you could use to override the settings when registering the post type to make it public.
Also, you can only create maps with Toolset with dynamic markers if the marker locations come from a Toolset address field, it does not work with other address-like fields from other plugins.
So even if you manage to change the plugin settings so that the OUM Location post type is public, you would also need to create a custom field group assigned to the OUM Location post type that includes a Toolset address field (and, because the plugin already includes an address field for the post type that will imply duplication, because you will have the existing OUM address field as well as the Toolset address field).
The simple answer is that if you want to use Toolset to generate maps with markers, then you should drop the other plugin and create a location post type with Toolset and add an address custom field from Toolset. In that way you will be able to create such maps with custom markers as described in the documentation.
Hi Nigel,
I have removed the add-on to work only with Toolset.
I want to create the custom fields as repeatable for a particular page, how can I add a conditional on the field group so that only the fields on the project page are shown?
Best regards and thanks
Idiomas: Inglés (English ) Español (Español )
Zona horaria: Europe/London (GMT+00:00)
Sorry, I'm not sure what you are aiming to do, and if it is related to maps and markers.
You want to add repeatable groups of fields to just one page (not a post, or a custom post, but to a page)? That isn't supported.
I don't understand why you would want to do that, but if you do you would need to create a Custom Field Group that you assign to Pages, and then you will be able to add Repeatable Fields Groups to this custom field group. (You can only add Repeatable Field Groups to a custom field group that is assigned to a single post type.) The data-dependent conditions tab doesn't help you here, as it affects the visibility of the custom field group on post edit screens according to some value of a custom field belonging to that same page.
Then create a content template for displaying just the page you want the field group to be available to (it can just output the post body, the same as if the template wasn't being used.) Then, when editing the custom field group, you can add a condition to only use the field group on pages that use the template you created.
That is one way of getting round the limitation that you cannot ordinarily assign a custom field group to just an individual page.
Again, I'm not sure how this is in any way related to maps and markers.
Hi Nigel, I don't think we are understanding each other. The question of how to display fields in a post from the Custom Post Type of pages, is an additional question.
What I want to do is the following:
I have created a Custom Post Type called map that contains a custom location field.
I have generated a map category taxonomy to specify each post to which group it belongs and then in the view assign a pointer to each terminology in the taxonomy.
There is a view for the map with the code you have specified to achieve this, but it does not show anything. You can see that the map is not seen accessing the Custom Post Type of pages, in the post Projects (from elementor).
I hope that with this explanation we can understand each other better.
Best regards and thanks.
Idiomas: Inglés (English ) Español (Español )
Zona horaria: Europe/London (GMT+00:00)
I checked your site and found a few issues, which I've fixed and it now appears to work (though the markers point to the same green icon, so they are not currently showing different markers per category).
One, the conditional shortcodes test the has_term function, but to be able to use a function in this way you need to register it at Toolset > Settings > Front-end content, as described here: https://toolset.com/course-lesson/using-toolset-conditional-block/#checking-for-values-from-custom-functions
Two, the View included shortcodes for the markers, but not for the map itself, which I have added (screenshot).
Three, the marker shortcodes didn't include an attribute to specify the marker address (I added the attribute marker_field='wpcf-location' to specify that the address comes from the custom field).
Can you check that it is working as expected?
The map is already displayed, but the most important part is missing, which is to show two different pointers according to the terminology selected.
I have checked the link you provided and I can't find how to do it.
Can you help me with this?
Idiomas: Inglés (English ) Español (Español )
Zona horaria: Europe/London (GMT+00:00)
I went back in to your site and you have been making changes that are problematic; I have tried to remove them so that the map works as it should.
The only thing that is missing is the different markers, and that is because both of your marker shortcodes point to the same custom green marker icon (screenshot).
It is working correctly from what I can see, you just need to change the source of one of the marker icons (maybe you have a blue one, for example).
Thank you very much! I think I understand how it works. I have made that change and it is now displaying correctly.