I have a page I am testing. It is using the REST/curl api connector to the data. The data seems to collect correctly. If the data {{out}} returned is 1 I want the map icon to be red, if it returns a 0(zero) I want the map icon to be green. I have test value under the main map at top that shows the value that is being returned. So I know what my value being returned is. Wondering what I am doing wrong? On the show/hide in the dynamic attributes I have it set like this:
alertIndicator.data.out == 1
Seems legit, but I can’t work it out. Maybe I am missing something easy? (I usually am)
I’ve tried messing with the spaces in the show also, don’t know if that matters?
alertIndicator.data.out == 1
alertIndicator.data.out== 1
alertIndicator.data.out==1
the right, and two bottom dashboards and the maps on them I am not dealing with, ie I’m only worried about the map that is next to the dock lifeguard graphic.
Thanks for any direction. I love the api connector!
I think I follow what you mean, ignoring the background info you want the map pin to change colour dependent on the value of the returned variable “alertIndicator.data.out”
Not modelled this but on a quick look over:
I’ll try that. But I have tried about every version I can think of. I won’t be back on that job till wed. I’ll give it a try. When something doesn’t work and i’ve tried a bunch of stuff, by the time I get to post to the forum, sometimes things have gotten switched around. But I will let you know. Thanks
ok, I’m back on troubleshooting this today. The logic changes didn’t change anything. I believe I had the correct logic there at one point, but I get frustrated switching stuff around testing and when I finally submit to the forum I miss a change in the code, but anyways…
I tried just adding a standard value and then check against that, thinking something might be funky with my api server connect. This also didn’t work. I’m wondering if there is some bug with the google map extension with show/hide?
Rather than showing/ hiding two different markers why not toggle the colour of a single marker based on the value
I THINK the syntax would be (sorry not in position to test) something like
When I change the code to that @patrick then I get this error in browser
googleMapsMarker.js:77 Uncaught TypeError: this.setIcon is not a function
at n.update (googleMapsMarker.js:77)
at n.$update (BaseComponent.js:303)
at BaseComponent.js:306
at Array.forEach ()
at n.$update (BaseComponent.js:305)
at BaseComponent.js:306
at Array.forEach ()
at n.$update (BaseComponent.js:305)
at Object.dmx.appConnect (appConnect.js:65)
at HTMLDocument. (appConnect.js:74)
Try changing ‘red’ to somethingelse in the wappler list, say ‘orange’. It could be because ‘red’ is not in the list or alternatively set red to ‘’ (empty string) instead