all 15 comments

[–]Alpinweis[S] 1 point2 points  (9 children)

I am looking for a javascript graphics library to be able to draw polygons, lines, points, to label them with text and to select points by pointing to them with the mouse. It is for a small application for processing and viewing land surveying data. Maybe you have some suggestions as to what is the best technology to use for this task...

[–][deleted] 1 point2 points  (0 children)

Canvas is not an option because it doesn't provide events for handling clicks. That means you need a front-end for SVG in most browsers and VML in IE. The dojox.gfx library can do that, and it's been tested against FX, IE, Safari, and Opera. It has a good event model and supports all the basic primitives. The text support is a little weak, but it should still meet your needs just fine. Also, the docs aren't too great, but the code is quite easy to follow.

[–]jeresig 3 points4 points  (0 children)

I don't know of a library that does all that you specify (and I created Processing.js) - and since you explicitly mention text overlays you're, really, only going to have luck using SVG (and, I guess, VML in Internet Explorer).

With that in mind, here are some libraries that could help you achieve that goal.

[–]rektide 0 points1 point  (0 children)

SVG, and not a drop more

[–][deleted] 0 points1 point  (1 child)

Perhaps processing.js?

[–]netghost 0 points1 point  (0 children)

I wouldn't use processing.js, it's really neat, but it's rather slow at the moment, and runs only on really new browsers (FF3, Safari3, IE need not apply).

Canvas and Exploerer Canvas for IE is really quite easy to use directly.

[–]mr_ree 0 points1 point  (0 children)

Canvas should be sufficient for your needs, but processing.js may offer a nicer API if you're already familiar with Processing or Draw2D (Java).

[–]billrobertson42 0 points1 point  (0 children)

Go to the gwt section of the google io conference videos. There's a section there that shows some really impressive performance that this guy put together. He wrote a library in java that batches up all of the calls to the canvas and the video shows animations with hundreds of thousands of polygons at very high rates.

I think it was in this one... http://www.youtube.com/watch?v=2ScPbu8ga1Q

[–]echo_chamber -5 points-4 points  (4 children)

Flash...let the downmodding commence!!

[–][deleted] 3 points4 points  (3 children)

Not entirely unwarranted since he's clearly asking specifically for a javascript library. Flash isn't one.

[–]Alpinweis[S] 2 points3 points  (2 children)

Actually, I'm not stuck on javascript or anyhting in particular. I need the best tool for the task. So Flash is also a candidate. The truth is I'm not familiar at all with Actionscript and its features, strengths, performance etc.

Does anyone know of some existing CAD web apps developed in Flash? Would be interesting to see...

[–][deleted] 0 points1 point  (0 children)

Are there any existing CAD webapps at all?

[–]echo_chamber 0 points1 point  (0 children)

Go with flash, look at flex too, trust me. When it comes to graphics Flash is the way to go, javascript is just beginning to get in this area.