Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi,
I need to make an icon on Google Map widget to BLINK whenever the state of the property (boolean) from an edge device is set to true & updated through edge binding.
May I know how would you normally do in order to achieve this effect in ThingWorx mashup?
Thanks in advance for the advise!
Did you ever figure out a way to achieve this? I am interested in something similar.
Thanks
Hi Yale,
I've never tried it, but you may set a MediaEntity with a Animated gif. Then create a style which contains this Media Entity.
Then on Google Maps widget on MarkerFormatting you can set a State-Based formatting that when "true/false" or other conditions, sets the animated style or a not animated one.
This should work. But I've tested it and it doesn't works doing some search here it's this article on Stack Overflow: http://stackoverflow.com/questions/23259084/can-i-use-my-own-custom-animated-gifs-as-markers-on-google-maps-api
It points that to make gif animations work you should do :
marker = new google.maps.Marker({
map:map,
draggable:false,
optimized:false, // <-- required for animated gif
animation: google.maps.Animation.DROP,
position: position,
icon: "http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-35/e8nZC.gif"
});
I've looked on the ThingWorx Google Maps Widget and it doesn't set's optimized property on the marker. Then if you want to get it working, you will need to modify ThingWorx Google Maps Widget setting this optimized:true on every Marker that's created on the extension.