Just tried to set the map pin ICON by using a custom ACF value (icon field) in the custom url field of the address marker but it does not seem to work, When i use the same bricks dynamic field in a simple text to see what it is outputting it seems to just be the image title but if I use it within an image element for the source it outputs the correct icon/image.
Hi @SpinDreams,
you mean this control, right? The dynamic data should return the URL to the image/svg, then it will work. Can you try?
Or you mean some other control?
Matej
Just realised what’s likely wrong, Picking the pin icon using image ACF element and it is a .png file, does it only support svg? It is working in a custom google maps script I am using. You can see here Attività ed esperienze nei dintorni di Cagliari Sardegna (switch to english to see the bricks version).
Maybe not, I tried using an SVG for one of the pins but it still only shows the default icon.
Have you tried with dynamic tag that will return a string/URL to the icon. Then it should work.
Let me know if it’s working that way.
Matej
The same tag I am using here works fine when used in the bricks image element in the same page so I think this is a bug.
Yes, I understand. That’s why I’m asking if it’s working with a dynamic tag that returns a URL to the image, because the icon fields it’s not supported - see the placeholder in the field, it says “Custom URL”
So, this is not a bug, but rather a future request. I’ve created and task for this internally, and I’ve also move this topic to the Feature Requests / Improvements.
Best regards,
Matej
I tried again by adding the tag {acf_mapicon:array_value|url} which outputs just the absolute url if placed directly into the loop (as a text field) but still if I add that to the map for the icon under custom url it does not work. In my book this is a bug not a feature request but semantics aside.
Can you screenshot the ACF icon field settings, so I can replicate it? I tested, but did not get a string as a result.
Thanks,
Matej
Tag used in the icon field.
same tag using is a basic text element within the card loop showing the url output.
Make sure your acf field is outputting an array.
We added this improvement in Bricks 2.0 RC, which is now available in your account.
Changelog: Bricks 2.0-rc Changelog – Bricks
Please let us know if you are still experiencing issues.
As with any pre-stable release, please do not use it on a production/live website. It is only meant for testing in a local or staging environment.
Using the tag above and also just {acf_mapicon} it is till not showing the images I have assigned in ACF. ACF field is in Array output mode but I also tried just URL output mode.
Okay so I think the issue here is that the dynamic setting for the map only takes values from the current page rather than values from the loop containing the map connector when used to populate multiple marker pins. Logic would expect it to take those values from the loop. the same can be said for all the dynamic fields in the marker settings.