Update projection arg for d3.geoPath(), deprecate d3.geoClipExtent()

This commit is contained in:
Bryan Housel
2016-10-29 15:27:06 -04:00
parent b7f02a5752
commit 46b6086dcf
6 changed files with 7 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ export function svgDebug(projection, context) {
showsImagery = context.getDebug('imagery'),
showsImperial = context.getDebug('imperial'),
showsDriveLeft = context.getDebug('driveLeft'),
path = d3.geoPath().projection(projection);
path = d3.geoPath(projection);
var debugData = [];

View File

@@ -68,8 +68,7 @@ export function svgGpx(projection, context, dispatch) {
.merge(paths);
var path = d3.geoPath()
.projection(projection);
var path = d3.geoPath(projection);
paths
.attr('d', path);

View File

@@ -14,7 +14,7 @@ import { utilDisplayName, utilEntitySelector } from '../util/index';
export function svgLabels(projection, context) {
var path = d3.geoPath().projection(projection),
var path = d3.geoPath(projection),
detected = utilDetect(),
baselineHack = (detected.ie || detected.browser.toLowerCase() === 'edge'),
rdrawn = rbush(),
@@ -236,7 +236,7 @@ export function svgLabels(projection, context) {
.merge(debugboxes);
debugboxes
.attr('d', d3.geoPath().projection(null));
.attr('d', d3.geoPath());
}
}

View File

@@ -9,7 +9,7 @@ export function svgOneWaySegments(projection, graph, dt) {
i = 0,
offset = dt,
segments = [],
clip = d3.geoClipExtent().extent(projection.clipExtent()).stream,
clip = d3.geoIdentity().clipExtent(projection.clipExtent()).stream,
coordinates = graph.childNodes(entity).map(function(n) {
return n.loc;
});

View File

@@ -2,7 +2,7 @@ import * as d3 from 'd3';
export function svgPath(projection, graph, polygon) {
var cache = {},
clip = d3.geoClipExtent().extent(projection.clipExtent()).stream,
clip = d3.geoIdentity().clipExtent(projection.clipExtent()).stream,
project = projection.stream,
path = d3.geoPath()
.projection({stream: function(output) { return polygon ? project(output) : project(clip(output)); }});

View File

@@ -237,7 +237,7 @@ export function uiMapInMap(context) {
// redraw viewport bounding box
if (gesture !== 'pan') {
var getPath = d3.geoPath().projection(projection),
var getPath = d3.geoPath(projection),
bbox = { type: 'Polygon', coordinates: [context.map().extent().polygon()] };
viewport = wrap.selectAll('.map-in-map-viewport')