code: function(context, geometry, style, featureId, type) {
          var components = geometry.components;
          var len = components.length;
          context.beginPath();
          var start = this.getLocalXY(components[0]);
          var x = start[0];
          var y = start[1];
          if (!isNaN(x) && !isNaN(y)) {
              context.moveTo(start[0], start[1]);
              for (var i=1; i<len; ++i) {
                  var pt = this.getLocalXY(components[i]);
                  context.lineTo(pt[0], pt[1]);
              }
              if (type === "fill") {
                  context.fill();
              } else {
                  context.stroke();
              }
          }
      }
docs: Method: renderPath
  Render a path with stroke and optional fill.