var config = require('config');
var convert = require('convert');
var parse = require('color-parser');

exports.segments = {
  stroke: function(display, segment) {
    if (!segment.focused) return;

    switch (segment.type) {
      case 'CAR':
        return '#888';
      case 'WALK':
        return 'none';
      case 'TRANSIT':
        var route = segment.patterns[0].route;
        var id = route.route_id.split(':');
        return convert.routeToColor(route.route_type, id[0].toLowerCase(), id[1]
          .toLowerCase(), route.route_color);
    }
  }
};

exports.places = {
  stroke: 1
};

exports.places_icon = {
  x: -8,
  y: -8,
  width: 16,
  height: 16,
  'xlink:href': function(display, data) {
    if (data.owner.getId() === 'from') return config.static_url() +
      '/build/planner-app/transitive-view/start.svg';
    if (data.owner.getId() === 'to') return config.static_url() +
      '/build/planner-app/transitive-view/end.svg';
  },
  stroke: 1,
  visibility: 'visible'
};

exports.multipoints_pattern = exports.multipoints_merged = exports.stops_pattern =
  exports.stops_merged = {
    r: function(display, data, index, utils) {
      return utils.pixels(display.zoom.scale(), 4, 6, 8);
    }
};

@@ -97,16 +97,17 @@
 ser');%0A%0A
+%0A
 exports.
@@ -193,16 +193,83 @@
 eturn;%0A%0A
+// taking this value and testing other values for that property //%0A
     swit
@@ -327,11 +327,11 @@
 n '#
-888
+000
 ';%0A 
@@ -621,24 +621,80 @@
   %7D%0A  %7D%0A%7D;%0A%0A
+// start/end icons and eventually points of interest// %0A
 exports.plac

test color change in trasitive