Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Js error in execution on google chrome #55

Closed
candidobugarin opened this issue Mar 4, 2016 · 2 comments
Closed

Js error in execution on google chrome #55

candidobugarin opened this issue Mar 4, 2016 · 2 comments

Comments

@candidobugarin
Copy link

Hello.

I created a script using your plugin to animate the radar images to Rio de Janeiro. When I run this script in Mozilla all goes well, but the Chrome don't understand that the dates of the images are already in UTC and decreases 3 hours date I step to him . You know a way to solve this? The link to the page : http://200.20.53.8/alertadecheias/radar_animation/

Thank you

@r1m
Copy link
Contributor

r1m commented Mar 4, 2016

Are you modifying your script ?
I had different error each time I visited the page

Using momentjs
this works

getSirenaImageUrl = function(url, time){
  var date = moment.utc(time);
  return 'js/mac_s_04_'+date.format('YYYY-MM-DD-HH-mm')+'.png';
}

Please use JSBin or JSFiddle to show your code. Especially if you are working on it.

@candidobugarin
Copy link
Author

Yes. As i dont have a MapServer, i created a script in python to download
the radar imagens and mount the JS.
I'm gonna try your solution.
Thanks

2016-03-04 16:12 GMT-03:00 Ram notifications@github.com:

Are you modifying your script ?
I had different error each time I visited the page

Using momentjs http://momentjs.com/docs/#/displaying/format/
this works

function(url, time){
var date = moment(time);
return 'js/mac_s_04_'+date.format('YYYY-MM-DD-HH-mm')+'.png';
}


Reply to this email directly or view it on GitHub
#55 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants