Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Raphaeljs library and SmartPhones

I used the worderfull javascript library called raphaeljs on my website to draw maps, animations and animated functionalities. I have noticed that the script using this library work perfectly with iPhone but not with Android.

Can someone confirm this (just going on the demo page of raphaeljs will tell you if it works of not) and if it doesn't, does someone has any idea why, and what could be tested.

Thanks

like image 828
Mermoz Avatar asked Apr 04 '11 13:04

Mermoz


2 Answers

The default Android browser did not support SVG until they recently re-introduced it with Android 2.3. One workaround is to use Opera Mobile (free from the Android Market) which will work whatever the Android version.

EDIT: My mistake, it's Android 3.0 (Honeycomb) that added SVG support in the default browser.

2ND EDIT: Better add a disclaimer that I work for Opera. There may be other non-default browsers that support SVG (but I haven't tried them).

like image 70
tagawa Avatar answered Nov 12 '22 08:11

tagawa


Actually SVG is supported by Android since 2.0 I think (with WebKit, default browser), it's just not enabled by default : http://jindroid.com/2010/02/15/svg-support-on-android-webkit/

There's a patch you can apply (quite hard to do though) to enable it but I would advice you to download Opera or Mozilla Firefox for Android (via Market), which also supports svg quite well (I tested FF4 with Raphael JS).

Regards

like image 36
acerb Avatar answered Nov 12 '22 08:11

acerb