Camille V
Forum Replies Created
-
Forum: Plugins
In reply to: [Travelers' Map] Some items are not displayed on the mapOkay, I had a look tonight, and you have indeed some shortcode parameters filtering out the post you are refering to:
[travelers-map cats=activite,balade,balade-ludique,hebergement,restaurant post_types=post]
This is your shortcode, the categories after “cats=” are filters, and all the posts that are not in any of those are filtered out. The Mexico post for example is only set to the “Mexique” and “Les Tops” categories, so it’s filtered out the map 🙂
You have three choices :
- Add new cats to the shortcode above,
- set categories from the shortcode on your posts
- or remove all the cats on the shortcode so it’s loading every post (with a pin set) :
[travelers-map post_types=post]
I did not fix the error on your site, I let you do it because I don’t know if you prefer to change the shortcode, or if you want to add categories to the posts you mentionned.
- This reply was modified 4 weeks ago by Camille V.
Forum: Plugins
In reply to: [Travelers' Map] Some items are not displayed on the mapDear @jtanovan,
Could you try those things please?
- Do you have a caching plugin? If so, can you clear the cache to see if that fixes the problem?
- Could you resave your posts not appearing? Just go to the edition page and save.
- Does your shortcode have some parameters that could hide some posts?
If nothing works, would it be possible to have an admin account created so I can check what’s wrong?
Use this email for my account : contact@camilles-travels.comForum: Plugins
In reply to: [Travelers' Map] Uncaught ReferenceError: L is not definedLeaflet is indeed missing if you have this message !
It’s strange because the plugin is supposed to load it, can you try deactivating and activating it again?Or maybe you have a caching plugin that you need to be cleared? Or another plugin loading leaflet ? Or maybe a RGPD cookie manager plugin that disable some script from your pages?
Let me know 🙂
Forum: Plugins
In reply to: [Travelers' Map] zooming on archive pageDear @agthalim,
Your shortcode is not exactly the same, I can see on your archive page that there is a
maxzoom=3
defined, and aminzoom=3
on both maps.Thats why you can’t zoom / unzoom 🙂
Forum: Plugins
In reply to: [Travelers' Map] use a map for some custom WP_QueryHi again, sorry for my late reply I did not see your answer 🙂
I opened your website and saw you are reloading the page on category change. That’s a good thing, because I think what you are looking for in ajax is not possible.
If I remember well I tried it on a personal project, but never succeeded. The cause is that the markers are loaded withwp_localize_script
which inject javascript variables to the page so the markers can load.
I’m not saying it’s impossible but it seems a lot of work for nothing important to me, a page refresh is not bad in that case 🙂Forum: Plugins
In reply to: [Travelers' Map] world-wide nipticky observationDear @agthalim,
Yes indeed, it’s a Leaflet limitation 🙂
Forum: Plugins
In reply to: [Travelers' Map] Leaflet – changement de fond de carteBonjour @chaosad2,
Désolé pour le temps de réponse,
Non malheureusement ce n’est pas possible avec l’extension, c’est un usage trop spécifique pour que j’ajoute cette fonctionnalité.
Bonne journée,
CamilleForum: Plugins
In reply to: [Travelers' Map] position, zoom : how to get the information ?Dear @agthalim,
First, you can domap.getZoom()
andmap.getCenter()
on the leaflet map object with javascript to get what you need. Here is a reminder on how to get access to the map object : https://camilles-travels.com/get-started-with-travelers-map-wordpress-plugin/#Interact-with-the-maps-objectsThen you could dynamically store this information into localstorage maybe, so that when you reload this page, it finds it again, get the leaflet map object and do map.setView(…)
Forum: Plugins
In reply to: [Travelers' Map] Problem with displaying custom post on global mapDear @mpojalow , did you succeed to fix the issue ? I can see both maps on your page 🙂
Forum: Plugins
In reply to: [Travelers' Map] custom style for popoversDear @agthalim ,
Leaflet default CSS is taking priority over your css, add this instead 🙂 :
.travelersmap-container .leaflet-popup-content-wrapper { background-color: #c9c5c2; }
It’s because of CSS specificity, you can learn more if you want, here : https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#tips_for_handling_specificity_headaches
- This reply was modified 6 months, 3 weeks ago by Camille V. Reason: Added link for CSS specificity documentation
Forum: Plugins
In reply to: [Travelers' Map] Another leafletsjs problemDear @constp, sorry for the delay, I’m glad you succeeded 🙂
Forum: Plugins
In reply to: [Travelers' Map] Markers’ libraryHello 🙂
You can go in Travelers Map > Personnaliser les marqueurs and remove them, or change the broken images by modifying them
Forum: Plugins
In reply to: [Travelers' Map] use a map for some custom WP_QueryI will add that the first solution would be possible if you don’t use
tax_query
but'tag' => $tags
and'category_name' => $cats,
but your taxonomies Algérie and Nucléaire would need to be native categories or tagsForum: Plugins
In reply to: [Travelers' Map] use a map for some custom WP_QueryDear @agthalim ,
Here is how current_query_markers works :
global $wp_query; $cttm_global_query_args = $wp_query->query_vars; $cttm_options_args = array_replace($cttm_global_query_args, array('nopaging' => true, 'tax_query' => array( array( 'taxonomy' => 'cttm-markers-tax', 'field' => 'name', 'terms' => 'hasmarker', ), ), ));
What is does is it’s taking the global object $wp_query, takes its
query_vars
and modify them to fetch only the posts with markers. (custom private taxonomycttm-markers-tax
).
I think even if you succeed to change the global query post (with pre_get_post, I think it won’t work due to the fact that Travelers’ Map is overring thetax_query
parameter :/
So your only solution for now is to use the shortcode with tax parameters.
Outside of your loop, so before the query or afterwp_reset_postdata()
, you should add the shortcode with your attributes, use the shortcode Helper in the plugin to create the custom attributes of the shortcode :echo do_shortcode( '[travelers-map attribute=value]' );
Dear @kukiko ,
I think the issue might be that the maps are not shown and hidden behind a button. It’s a leaflet bug and not a Travelers Map bug 🙂
You have to refresh the map with javascript once you click on a button, do you know how to do that ?
here is the developers doc : https://camilles-travels.com/get-started-with-travelers-map-wordpress-plugin/#Interact-with-the-maps-objects
You can use the leaflet methodmap.invalidatesize();
to refresh the map : https://leafletjs.com/reference.html#map-invalidatesize
If you have no idea of what I’m saying, I suggest you change the way your website works and don’t hide the maps behind buttons 🙂