Hello Everyone, I'm trying to remove the default Pin Icon the Maps Component has but I have been unsuccessful. Also, I'm trying to keep the popup info always on without the user clicking the pin.
Thanks in advance.
I wasn't capable to replicate the issue, but I was capable to trigger the popup using the search.
I Just changed the ListSort By to something like "Description = TextVar" and I have edit the js function to a simple timeout (some milliseconds since we are rendering the DOM) that pops the Marker[0].
Hope this helps you,João Ferreira
Hi @Paulo Ribeiro,
I don't know if I understand all the context of your use case. But on OutSystemsMaps component is possible to change the markerIcon or even hide it, and it's possible to open the Popup via JavaScript API (you have to make sure the marker is rendered).
I've built a sample illustrating this, let me know if this helps you.
Best Regards,João Ferreira
Hello, this is for Mobile, for some reason I can't replicate the MarkerPopup.Id in the WidgetId Input from the JS script. Any idea why? It only shows up to the list the Marker is in. i figured it's because it's inside of a list, any workaround?
Thanks in advance
Hi @Paulo Ribeiro,Sorry for the wait, you can get the id using JS, like so "document.querySelectorAll("[data-block='Marker.MarkerPopup']")[index].id".But we have a limitation on the component, we just allow to display a Popup at a time, so if you have more than one Popup it will just open the last one that you call.
I'll raise this use case to the team, to check if we will add it to our backlog.
Hello João,thank you for your reply, I’m bummed that this has no workaround but glad to be of help of, maybe a future feature!
Update me if you can if this turns into something in the future.
Kind regards,
Hello again João, trying out your 2 Javascript gave me this error
Any idea what it is?
It doesn't seems related with the javascript, It looks like an issue on AdvancedFormat. But I'm not sure, without more context It's difficult to give an advice.Can you share an .oml with a sample?
Hello João, here it is
kind regards
Thank you! can you show me the JS script?
Hello @Paulo Ribeiro,Here it is:
setTimeout(function(){
var MarkerPopupList = document.querySelectorAll("[data-block='Marker.MarkerPopup']")
MapAPI.MarkerManager.OpenPopup(MarkerPopupList[0].id)
}, 500);Regards,João Ferreira
I'm sorry João, but that one is only opening the first entry in the list and not the correct one.
As I said, I've change the ListSort by to "Description = TextVar", and with that the first entry will be the right one
Hello João,
I did as you instructed but it opens the same one every time, even if I search for another one.
I debugged and it returns the correct but the JS doesn't seem to go there.
Kind regards.