cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Achieve icon blinking effect in ThingWorx mashup

ptc-6291975
1-Newbie

Achieve icon blinking effect in ThingWorx mashup

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!

2 REPLIES 2
yevans
4-Participant
(To:ptc-6291975)

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.



Top Tags