diff --git a/index.html b/index.html index 798ce1acc..f45f10d6c 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,6 @@ - diff --git a/js/id/services/mapillary.js b/js/id/services/mapillary.js index 8a98e9dbb..c224540c1 100644 --- a/js/id/services/mapillary.js +++ b/js/id/services/mapillary.js @@ -9,6 +9,16 @@ iD.services.mapillary = function() { tileZoom = 14; + function loadSignStyles(context) { + d3.select('head').selectAll('#traffico') + .data([0]) + .enter() + .append('link') + .attr('id', 'traffico') + .attr('rel', 'stylesheet') + .attr('href', context.assetPath() + 'traffico/stylesheets/traffico.css'); + } + function loadSignDefs(context) { if (!iD.services.mapillary.sign_defs) { iD.services.mapillary.sign_defs = {}; @@ -121,6 +131,7 @@ iD.services.mapillary = function() { mapillary.loadSigns = function(context, projection, dimensions) { var url = apibase + 'search/im/geojson/or?'; + loadSignStyles(context); loadSignDefs(context); loadTiles('signs', url, projection, dimensions); }; diff --git a/test/spec/services/mapillary.js b/test/spec/services/mapillary.js index cea1274ed..787c54295 100644 --- a/test/spec/services/mapillary.js +++ b/test/spec/services/mapillary.js @@ -3,7 +3,7 @@ describe('iD.services.mapillary', function() { context, server, mapillary; beforeEach(function() { - context = iD(); + context = iD().assetPath('../dist/'); context.projection.scale(667544.214430109); // z14 server = sinon.fakeServer.create();