The user "Juffy" helped me out on the stackoverflow forum, and finally got it to work. Here's how he taught me how to do it, if anyone is interested: "You need to inspect the geometry object you get from the event onDrawEnd - this event is already being hooked in the example: dojo.connect(tb, "onDrawEnd", addGraphic); but all it does is add the line to the map with an basic symbol. The first trap is that the geometry object won't actually be of type geometry - that's an abstract base class that doesn't really exist. The type will depend on what tool you were using to draw the shape - in your case it sounds like it'll be of type Polyline. This Polyline object has a property paths, which is a nested array of paths (lines), each of which contains an array of points. So if you wanted to get all the points of all the paths in a Polyline object:" function addGraphic(geo) { //For each path... for ( var path = 0; path < geo.paths.length; path ++ ) { //For each point in the path... for ( var pt = 0; pt < geo.paths[path].length; pt++ ) { //Do something with each point in here... //X coordinate: geo.paths[path][pt][0] //Y coordinate: geo.paths[path][pt][1] } } } Thanks to you guys for helping me out too! Cheers, Diego.
... View more