I have some minor issues/questions with the Toolset maps plugin:
1. The Google maps filter should show only results form the Netherlands, is that possible?
2. The icon on the button "Use my location" shows an square box and no icon when I change the font-face?
3. The unit for distance in Holland is km, so there's no need voor MI to be available in the dropdown. Can I turn this of? Or should I just hide it with CSS?
Thanks, Jelle
Hi, please find some answers below.
1. The Google maps filter should show only results form the Netherlands, is that possible?
This is possible but it requires some custom JavaScript that interacts with the Google Maps JS API. You can add some code in the View's Loop Editor JS panel to limit the filter results to a specific country. Here's an example:
jQuery(".js-toolset-maps-distance-center").geocomplete({country: 'US',type: []});
Two letter country codes are ISO 3166-1, you can see the list here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
I think the Netherlands is NL but please check the list to be sure.
2. The icon on the button "Use my location" shows an square box and no icon when I change the font-face?
Yes, the icon is provided by the FontAwesome 4 library. If you want to display the icon, that library should be enqueued. It should look like the screenshot here. In any other font-face, the square character represents a missing glyph. I would not expect the icon to work with any other font-face, so you could change the value of that button with JavaScript to remove the missing character.
3. The unit for distance in Holland is km, so there's no need voor MI to be available in the dropdown. Can I turn this of? Or should I just hide it with CSS?
Toolset Maps does not provide a way to remove the "mi" option, so a CSS solution to hide the input and show a text replacement might be best.
Hi Christian,
Thanks for solving the issues mentoined.
1. Solved with the snippet for NL
2. Oke, wil hide it with CSS
3. Same, hidden with CSS
Thank you!