From 7600257d34baa6305ee1da58245242926960d5a8 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Mon, 30 Mar 2015 14:55:16 -0400 Subject: [PATCH 001/137] Update d3.d.ts --- d3.cloud.layout/d3.cloud.layout.d.ts | 102 +- d3/d3-tests.ts | 575 +-- d3/d3.d.ts | 6729 +++++++++++++------------- d3/plugins/d3.superformula-tests.ts | 4 +- d3/plugins/d3.superformula.d.ts | 57 +- 5 files changed, 3665 insertions(+), 3802 deletions(-) diff --git a/d3.cloud.layout/d3.cloud.layout.d.ts b/d3.cloud.layout/d3.cloud.layout.d.ts index 5ac3aced8..1e41ecbc2 100644 --- a/d3.cloud.layout/d3.cloud.layout.d.ts +++ b/d3.cloud.layout/d3.cloud.layout.d.ts @@ -5,41 +5,77 @@ /// -declare module D3 { - export module Layout { - export interface IRotate { - (number:number) : CloudLayout; - (number:()=>number) : CloudLayout; +declare module d3 { + module layout { + export function cloud(): Cloud; + export function cloud(): Cloud; + + module cloud { + interface Word { + text?: string; + font?: string; + style?: string; + weight?: string | number; + rotate?: number; + size?: number; + padding?: number; + x?: number; + y?: number; + } } + interface Cloud { + start(): Cloud; + stop(): Cloud; + timeInterval(): number; + timeInterval(interval: number): Cloud; - export interface CloudLayout { - (layers: any[], index?: number): any[]; - values(accessor?: (d: any) => any): CloudLayout; - offset(offset: string): CloudLayout; - size: { - /** - * Gets the available layout size - */ - (): Array; - /** - * Sets the available layout size - */ - (size: Array): CloudLayout; - }; - words: (inputArray: Array) => CloudLayout; - rotate:IRotate; - padding: (number:number) => CloudLayout; - font: (string:string) => CloudLayout; - fontSize(fctn: (d: any) => number): CloudLayout; - on: (eventname: string, callee: (words: any[]) => void) => CloudLayout; - start: () => CloudLayout; + words(): T[]; + words(words: T[]): Cloud; + + size(): [number, number]; + size(size: [number, number]): Cloud; + + font(): (datum: T, index: number) => string; + font(font: string): Cloud; + font(font: (datum: T, index: number) => string): Cloud; + + fontStyle(): (datum: T, index: number) => string; + fontStyle(style: string): Cloud; + fontStyle(style: (datum: T, index: number) => string): Cloud; + + fontWeight(): (datum: T, index: number) => string | number; + fontWeight(weight: string | number): Cloud; + fontWeight(weight: (datum: T, index: number) => string | number): Cloud; + + rotate(): (datum: T, index: number) => number; + rotate(rotate: number): Cloud; + rotate(rotate: (datum: T, index: number) => number): Cloud; + + text(): (datum: T, index: number) => string; + text(text: string): Cloud; + text(text: (datum: T, index: number) => string): Cloud; + + spiral(): (size: number) => (t: number) => [number, number]; + spiral(name: string): Cloud; + spiral(spiral: (size: number) => (t: number) => [number, number]): Cloud; + + fontSize(): (datum: T, index: number) => number; + fontSize(size: number): Cloud; + fontSize(size: (datum: T, index: number) => number): Cloud; + + padding(): (datum: T, index: number) => number; + padding(padding: number): Cloud; + padding(padding: (datum: T, index: number) => number): Cloud; + + on(type: "word", listener: (word: T) => void): Cloud; + on(type: "end", listener: (tags: T[], bounds: { x: number; y: number }[]) => void): Cloud; + on(type: string, listener: (...args: any[]) => void): Cloud; + + on(type: "word"): (word: T) => void; + on(type: "end"): (tags: T[], bounds: { x: number; y: number }[]) => void; + on(type: string): (...args: any[]) => void; + } } - - - export interface Layout { - cloud(): CloudLayout; - } - } -} \ No newline at end of file +} diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts index 51c51f608..70e4036dd 100644 --- a/d3/d3-tests.ts +++ b/d3/d3-tests.ts @@ -1,19 +1,23 @@ /// //Example from http://bl.ocks.org/3887235 +interface TestPieChartData { + population: number; + age: string; +} function testPieChart() { var width = 960, height = 500, radius = Math.min(width, height) / 2; - var color = d3.scale.ordinal() + var color = d3.scale.ordinal() .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]); - var arc = d3.svg.arc() + var arc = d3.svg.arc>() .outerRadius(radius - 10) .innerRadius(0); - var pie = d3.layout.pie() + var pie = d3.layout.pie() .sort(null) .value(function (d) { return d.population; }); @@ -23,12 +27,7 @@ function testPieChart() { .append("g") .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); - d3.csv("data.csv", function (error, data) { - - data.forEach(function (d) { - d.population = +d.population; - }); - + d3.csv("data.csv", d => ({ population: +d['population'], age: d['age'] }), function (error, data) { var g = svg.selectAll(".arc") .data(pie(data)) .enter().append("g") @@ -91,12 +90,12 @@ function groupedBarChart() { var x0 = d3.scale.ordinal() .rangeRoundBands([0, width], .1); - var x1 = d3.scale.ordinal(); + var x1 = d3.scale.ordinal(); var y = d3.scale.linear() .range([height, 0]); - var color = d3.scale.ordinal() + var color = d3.scale.ordinal() .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]); var xAxis = d3.svg.axis() @@ -114,7 +113,7 @@ function groupedBarChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.csv("data.csv", function (error, data: Array) { + d3.csv("data.csv", function (error, data: Array) { var ageNames = d3.keys(data[0]).filter(function (key) { return key !== "State"; }); data.forEach(function (d) { @@ -146,7 +145,7 @@ function groupedBarChart() { .attr("class", "g") .attr("transform", function (d) { return "translate(" + x0(d.State) + ",0)"; }); - state.selectAll("rect") + state.selectAll("rect") .data(function (d) { return d.ages; }) .enter().append("rect") .attr("width", x1.rangeBand()) @@ -189,7 +188,7 @@ function stackedBarChart() { var y = d3.scale.linear() .rangeRound([height, 0]); - var color = d3.scale.ordinal() + var color = d3.scale.ordinal() .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]); var xAxis = d3.svg.axis() @@ -207,7 +206,7 @@ function stackedBarChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.csv("data.csv", function (error, data) { + d3.csv("data.csv", function (error, data: any) { color.domain(d3.keys(data[0]).filter(function (key) { return key !== "State"; })); data.forEach(function (d) { @@ -219,7 +218,7 @@ function stackedBarChart() { data.sort(function (a, b) { return b.total - a.total; }); x.domain(data.map(function (d) { return d.State; })); - y.domain([0, d3.max(data, function (d) { return d.total; })]); + y.domain([0, d3.max(data, function (d: { total: number }) { return d.total; })]); svg.append("g") .attr("class", "x axis") @@ -240,15 +239,15 @@ function stackedBarChart() { .data(data) .enter().append("g") .attr("class", "g") - .attr("transform", function (d) { return "translate(" + x(d.State) + ",0)"; }); + .attr("transform", function (d: any) { return "translate(" + x(d.State) + ",0)"; }); state.selectAll("rect") - .data(function (d) { return d.ages; }) + .data(function (d: any) { return d.ages; }) .enter().append("rect") .attr("width", x.rangeBand()) - .attr("y", function (d) { return y(d.y1); }) - .attr("height", function (d) { return y(d.y0) - y(d.y1); }) - .style("fill", function (d) { return color(d.name); }); + .attr("y", function (d: any) { return y(d.y1); }) + .attr("height", function (d: any) { return y(d.y0) - y(d.y1); }) + .style("fill", function (d: any) { return color(d.name); }); var legend = svg.selectAll(".legend") .data(color.domain().reverse()) @@ -284,7 +283,7 @@ function normalizedBarChart() { var y = d3.scale.linear() .rangeRound([height, 0]); - var color = d3.scale.ordinal() + var color = d3.scale.ordinal() .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]); var xAxis = d3.svg.axis() @@ -328,21 +327,21 @@ function normalizedBarChart() { .data(data) .enter().append("g") .attr("class", "state") - .attr("transform", function (d) { return "translate(" + x(d.State) + ",0)"; }); + .attr("transform", function (d: any) { return "translate(" + x(d.State) + ",0)"; }); state.selectAll("rect") .data(function (d) { return d.ages; }) .enter().append("rect") .attr("width", x.rangeBand()) - .attr("y", function (d) { return y(d.y1); }) - .attr("height", function (d) { return y(d.y0) - y(d.y1); }) - .style("fill", function (d) { return color(d.name); }); + .attr("y", function (d: any) { return y(d.y1); }) + .attr("height", function (d: any) { return y(d.y0) - y(d.y1); }) + .style("fill", function (d: any) { return color(d.name); }); var legend = svg.select(".state:last-child").selectAll(".legend") - .data(function (d) { return d.ages; }) + .data(function (d: any) { return d.ages; }) .enter().append("g") .attr("class", "legend") - .attr("transform", function (d) { return "translate(" + x.rangeBand() / 2 + "," + y((d.y0 + d.y1) / 2) + ")"; }); + .attr("transform", function (d: any) { return "translate(" + x.rangeBand() / 2 + "," + y((d.y0 + d.y1) / 2) + ")"; }); legend.append("line") .attr("x2", 10); @@ -350,7 +349,7 @@ function normalizedBarChart() { legend.append("text") .attr("x", 13) .attr("dy", ".35em") - .text(function (d) { return d.name; }); + .text(function (d: any) { return d.name; }); }); } @@ -384,14 +383,14 @@ function sortablebarChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.tsv("data.tsv", function (error, data) { + d3.tsv("data.tsv", function (error, data: any) { data.forEach(function (d) { d.frequency = +d.frequency; }); x.domain(data.map(function (d) { return d.letter; })); - y.domain([0, d3.max(data, function (d) { return d.frequency; })]); + y.domain([0, d3.max(data, function (d: any) { return d.frequency; })]); svg.append("g") .attr("class", "x axis") @@ -412,10 +411,10 @@ function sortablebarChart() { .data(data) .enter().append("rect") .attr("class", "bar") - .attr("x", function (d) { return x(d.letter); }) + .attr("x", function (d: any) { return x(d.letter); }) .attr("width", x.rangeBand()) - .attr("y", function (d) { return y(d.frequency); }) - .attr("height", function (d) { return height - y(d.frequency); }); + .attr("y", function (d: any) { return y(d.frequency); }) + .attr("height", function (d: any) { return height - y(d.frequency); }); d3.select("input").on("change", change); @@ -497,8 +496,8 @@ function callenderView() { d3.csv("dji.csv", function (error, csv) { var data = d3.nest() - .key(function (d) { return d.Date; }) - .rollup(function (d) { return (d[0].Close - d[0].Open) / d[0].Open; }) + .key(function (d: any) { return d.Date; }) + .rollup(function (d: any) { return (d[0].Close - d[0].Open) / d[0].Open; }) .map(csv); rect.filter(function (d) { return d in data; }) @@ -529,7 +528,7 @@ function lineChart() { var parseDate = d3.time.format("%d-%b-%y").parse; - var x = d3.time.scale() + var x = d3.time.scale() .range([0, width]); var y = d3.scale.linear() @@ -543,7 +542,7 @@ function lineChart() { .scale(y) .orient("left"); - var line = d3.svg.line() + var line = d3.svg.line<{ date: Date; close: number }>() .x(function (d) { return x(d.date); }) .y(function (d) { return y(d.close); }); @@ -559,8 +558,8 @@ function lineChart() { d.close = +d.close; }); - x.domain(d3.extent(data, function (d) { return d.date; })); - y.domain(d3.extent(data, function (d) { return d.close; })); + x.domain(d3.extent(data, function (d: any) { return d.date; })); + y.domain(d3.extent(data, function (d: any) { return d.close; })); svg.append("g") .attr("class", "x axis") @@ -606,7 +605,7 @@ function bivariateAreaChart() { .scale(y) .orient("left"); - var area = d3.svg.area() + var area = d3.svg.area<{ date: Date; low: number; high: number }>() .x(function (d) { return x(d.date); }) .y0(function (d) { return y(d.low); }) .y1(function (d) { return y(d.high); }); @@ -617,15 +616,15 @@ function bivariateAreaChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.tsv("data.tsv", function (error, data) { + d3.tsv("data.tsv", function (error, data: any) { data.forEach(function (d) { d.date = parseDate(d.date); d.low = +d.low; d.high = +d.high; }); - x.domain(d3.extent(data, function (d) { return d.date; })); - y.domain([d3.min(data, function (d) { return d.low; }), d3.max(data, function (d) { return d.high; })]); + x.domain(d3.extent(data, function (d: any) { return d.date; })); + y.domain([d3.min(data, function (d: any) { return d.low; }), d3.max(data, function (d: any) { return d.high; })]); svg.append("path") .datum(data) @@ -673,8 +672,8 @@ function dragMultiples() { function dragmove(d) { d3.select(this) - .attr("cx", d.x = Math.max(radius, Math.min(width - radius, d3.event.x))) - .attr("cy", d.y = Math.max(radius, Math.min(height - radius, d3.event.y))); + .attr("cx", d.x = Math.max(radius, Math.min(width - radius, ( d3.event).x))) + .attr("cy", d.y = Math.max(radius, Math.min(height - radius, ( d3.event).y))); } } @@ -806,31 +805,31 @@ function populationPyramid() { .attr("dy", ".71em") .text(2000); - d3.csv("population.csv", function (error, data: Array) { + d3.csv("population.csv", function (error, rows: Array) { // Convert strings to numbers. - data.forEach(function (d) { + rows.forEach(function (d) { d.people = +d.people; d.year = +d.year; d.age = +d.age; } ); // Compute the extent of the data set in age and years. - var age1 = d3.max(data, function (d) { return d.age; } ), - year0 = d3.min(data, function (d) { return d.year; } ), - year1 = d3.max(data, function (d) { return d.year; } ), + var age1 = d3.max(rows, function (d) { return d.age; } ), + year0 = d3.min(rows, function (d) { return d.year; } ), + year1 = d3.max(rows, function (d) { return d.year; } ), year = year1; // Update the scale domains. x.domain([year1 - age1, year1]); - y.domain([0, d3.max(data, function (d) { return d.people; } )]); + y.domain([0, d3.max(rows, function (d) { return d.people; } )]); // Produce a map from year and birthyear to [male, female]. - data = d3.nest() - .key(function (d) { return d.year; } ) + var data = d3.nest() + .key(function (d) { return '' + d.year; } ) .key(function (d) { return '' + (d.year - d.age); } ) .rollup(function (v) { return v.map(function (d) { return d.people; } ); } ) - .map(data); + .map(rows); // Add an axis to show the population values. svg.append("g") @@ -849,7 +848,7 @@ function populationPyramid() { .attr("transform", function (birthyear) { return "translate(" + x(birthyear) + ",0)"; } ); birthyear.selectAll("rect") - .data(function (birthyear) { return data[year][birthyear] || [0, 0]; } ) + .data(function (birthyear): number[] { return data[year][birthyear] || [0, 0]; } ) .enter().append("rect") .attr("x", -barWidth / 2) .attr("width", barWidth) @@ -874,7 +873,7 @@ function populationPyramid() { // Allow the arrow keys to change the displayed year. window.focus(); d3.select(window).on("keydown", function () { - switch (d3.event.keyCode) { + switch (( d3.event).keyCode) { case 37: year = Math.max(year0, year - 10); break; case 39: year = Math.min(year1, year + 10); break; } @@ -890,7 +889,7 @@ function populationPyramid() { .attr("transform", "translate(" + (x(year1) - x(year)) + ",0)"); birthyear.selectAll("rect") - .data(function (birthyear) { return data[year][birthyear] || [0, 0]; } ) + .data(function (birthyear): number[] { return data[year][birthyear] || [0, 0]; } ) .transition() .duration(750) .attr("y", y) @@ -900,17 +899,31 @@ function populationPyramid() { } //Example from http://bl.ocks.org/MoritzStefaner/1377729 -function forcedBasedLabelPlacemant() { +module forcedBasedLabelPlacemant { + interface Node extends d3.layout.force.Node { + label: string; + } + + interface LabelAnchor extends d3.layout.force.Node { + node: Node; + } + + interface LabelAnchorLink extends d3.layout.force.Link { + source: Node; + target: Node; + weight: number; + } + var w = 960, h = 500; var labelDistance = 0; var vis = d3.select("body").append("svg:svg").attr("width", w).attr("height", h); - var nodes = []; - var labelAnchors = []; - var labelAnchorLinks = []; - var links = []; + var nodes: Node[] = []; + var labelAnchors: LabelAnchor[] = []; + var labelAnchorLinks: { source: number; target: number }[] = []; + var links: typeof labelAnchorLinks = []; for (var i = 0; i < 30; i++) { var nodeLabel = { @@ -941,14 +954,14 @@ function forcedBasedLabelPlacemant() { }); }; - var force = d3.layout.force().size([w, h]).nodes(nodes).links(links).gravity(1).linkDistance(50).charge(-3000).linkStrength(function (x) { + var force = d3.layout.force().size([w, h]).nodes(nodes).links(links).gravity(1).linkDistance(50).charge(-3000).linkStrength(function (x) { return x.weight * 10 } ); force.start(); - var force2 = d3.layout.force().nodes(labelAnchors).links(labelAnchorLinks).gravity(0).linkDistance(0).linkStrength(8).charge(-100).size([w, h]); + var force2 = d3.layout.force().nodes(labelAnchors).links(labelAnchorLinks).gravity(0).linkDistance(0).linkStrength(8).charge(-100).size([w, h]); force2.start(); var link = vis.selectAll("line.link").data(links).enter().append("svg:line").attr("class", "link").style("stroke", "#CCC"); @@ -1021,14 +1034,21 @@ function forcedBasedLabelPlacemant() { } //Example from http://bl.ocks.org/mbostock/1125997 -function forceCollapsable() { +module forceCollapsable { + interface Node extends d3.layout.force.Node { + id: string; + _children: Node[]; + children?: Node[]; + size: number; + } + var w = 1280, h = 800, node, link, root; - var force = d3.layout.force() + var force = d3.layout.force() .on("tick", tick) .charge(function (d) { return d._children ? -d.size / 100 : -30; } ) .linkDistance(function (d) { return d.target._children ? 80 : 30; } ) @@ -1048,7 +1068,7 @@ function forceCollapsable() { function update() { var nodes = flatten(root), - links = d3.layout.tree().links(nodes); + links = d3.layout.tree().links(nodes); // Restart the force layout. force @@ -1195,7 +1215,7 @@ function voronoiTesselation() { var width = 960, height = 500; - var vertices = >d3.range(100).map(function (d) { + var vertices = d3.range(100).map(function (d): [number, number] { return [Math.random() * width, Math.random() * height]; } ); @@ -1208,7 +1228,7 @@ function voronoiTesselation() { .attr("class", "PiYG") .on("mousemove", function () { vertices[0] = d3.mouse(this); redraw(); } ); - var path = svg.append("g").selectAll("path"); + var path = >svg.append("g").selectAll("path"); svg.selectAll("circle") .data(vertices.slice(1)) @@ -1234,50 +1254,50 @@ function forceDirectedVoronoi() { links = [], simulate = true, zoomToAdd = true, - color = d3.scale.quantize().domain([10000, 7250]).range(["#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]) + color = d3.scale.quantize().domain([10000, 7250]).range(["#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]) var numVertices = (w*h) / 3000; var vertices = d3.range(numVertices).map(function(i) { var angle = radius * (i+10); - return {x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)}; + return {x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)}; }); - var d3_geom_voronoi = d3.geom.voronoi() + var d3_geom_voronoi = d3.geom.voronoi<{ x: number; y: number }>() .x(function(d) { return d.x; }) .y(function(d) { return d.y; }) var prevEventScale = 1; var zoom = d3.behavior.zoom().on("zoom", function(d,i) { if (zoomToAdd){ - if (d3.event.scale > prevEventScale) { + if (( d3.event).scale > prevEventScale) { var angle = radius * vertices.length; - vertices.push({x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)}) - } else if (vertices.length > 2 && d3.event.scale != prevEventScale) { + vertices.push({x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)}) + } else if (vertices.length > 2 && ( d3.event).scale != prevEventScale) { vertices.pop(); } force.nodes(vertices).start() } else { - if (d3.event.scale > prevEventScale) { + if (( d3.event).scale > prevEventScale) { radius+= .01 } else { radius -= .01 } vertices.forEach(function(d, i) { var angle = radius * (i+10); - vertices[i] = {x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)}; + vertices[i] = {x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)}; }); force.nodes(vertices).start() } - prevEventScale = d3.event.scale; + prevEventScale = ( d3.event).scale; }); d3.select(window) .on("keydown", function() { // shift - if(d3.event.keyCode == 16) { + if(( d3.event).keyCode == 16) { zoomToAdd = false } // s - if(d3.event.keyCode == 83) { + if(( d3.event).keyCode == 83) { simulate = !simulate if(simulate) { force.start() @@ -1303,9 +1323,9 @@ function forceDirectedVoronoi() { force.nodes(vertices).start(); - var circle = svg.selectAll("circle"); - var path = svg.selectAll("path"); - var link = svg.selectAll("line"); + var circle = > svg.selectAll("circle"); + var path = > svg.selectAll("path"); + var link = > svg.selectAll("line"); function update() { path = path.data(d3_geom_voronoi(vertices)); @@ -1313,7 +1333,7 @@ function forceDirectedVoronoi() { // drag node by dragging cell .call(d3.behavior.drag() .on("drag", function(d, i) { - vertices[i] = {x: vertices[i].x + d3.event.dx, y: vertices[i].y + d3.event.dy} + vertices[i] = {x: vertices[i].x + ( d3.event).dx, y: vertices[i].y + ( d3.event).dy} }) ) .style("fill", function(d, i) { return color(0) }) @@ -1347,7 +1367,7 @@ function delaunayTesselation() { var width = 960, height = 500; - var vertices = >d3.range(100).map(function (d) { + var vertices = d3.range(100).map(function (d): [number, number] { return [Math.random() * width, Math.random() * height]; } ); @@ -1357,7 +1377,7 @@ function delaunayTesselation() { .attr("class", "PiYG") .on("mousemove", function () { vertices[0] = d3.mouse(this); redraw(); } ); - var path = svg.append("g").selectAll("path"); + var path = >svg.append("g").selectAll("path"); svg.selectAll("circle") .data(vertices.slice(1)) @@ -1379,11 +1399,13 @@ function quadtree() { var width = 960, height = 500; - var data = d3.range(5000).map(function () { - return { x: Math.random() * width, y: Math.random() * width }; - } ); + var data = d3.range(5000).map(function(): [number, number] { + return [Math.random() * width, Math.random() * width]; + }); - var quadtree = d3.geom.quadtree(data, -1, -1, width + 1, height + 1); + var quadtree = d3.geom.quadtree() + .extent([[-1, -1], [width + 1, height + 1]]) + (data); var brush = d3.svg.brush() .x(d3.scale.identity().domain([0, width])) @@ -1405,11 +1427,11 @@ function quadtree() { .attr("height", function (d) { return d.height; } ); var point = svg.selectAll(".point") - .data(data) + .data(<{ scanned?: boolean; selected?: boolean; 0: number; 1: number }[]> data) .enter().append("circle") .attr("class", "point") - .attr("cx", function (d) { return d.x; } ) - .attr("cy", function (d) { return d.y; } ) + .attr("cx", function (d) { return d[0]; } ) + .attr("cy", function (d) { return d[1]; } ) .attr("r", 4); svg.append("g") @@ -1455,7 +1477,7 @@ function convexHull() { var randomX = d3.random.normal(width / 2, 60), randomY = d3.random.normal(height / 2, 60), - vertices = d3.range(100).map(function () { return [randomX(), randomY()]; } ); + vertices = d3.range(100).map(function (): [number, number] { return [randomX(), randomY()]; } ); var svg = d3.select("body").append("svg") .attr("width", width) @@ -1470,7 +1492,7 @@ function convexHull() { var hull = svg.append("path") .attr("class", "hull"); - var circle = svg.selectAll("circle"); + var circle = > svg.selectAll("circle"); redraw(); @@ -1483,19 +1505,25 @@ function convexHull() { } // example from http://bl.ocks.org/mbostock/1044242 -function hierarchicalEdgeBundling() { +module hierarchicalEdgeBundling { + interface Result extends d3.layout.cluster.Result { + parent: Result; + size: number; + key: string; + } + var diameter = 960, radius = diameter / 2, innerRadius = radius - 120; - var cluster = d3.layout.cluster() + var cluster = d3.layout.cluster() .size([360, innerRadius]) .sort(null) .value(function (d) { return d.size; } ); - var bundle = d3.layout.bundle(); + var bundle = d3.layout.bundle(); - var line = d3.svg.line.radial() + var line = d3.svg.line.radial() .interpolate("bundle") .tension(.85) .radius(function (d) { return d.y; } ) @@ -1604,7 +1632,7 @@ function roundedRectangles() { .attr("transform", function (d, i) { return "scale(" + (1 - d / 25) * 20 + ")"; } ) .style("fill", d3.scale.category20c()); - g.map(function (d) { + var g0 = g.datum(function (d) { return { center: [0, 0], angle: 0 }; } ); @@ -1614,7 +1642,7 @@ function roundedRectangles() { d3.timer(function () { count++; - g.attr("transform", function (d, i) { + g0.attr("transform", function (d, i) { d.center[0] += (mouse[0] - d.center[0]) / (i + 5); d.center[1] += (mouse[1] - d.center[1]) / (i + 5); d.angle += Math.sin((count + i) / 10) * 7; @@ -1643,10 +1671,10 @@ function streamGraph() { .domain([0, d3.max(layers0.concat(layers1), function (layer) { return d3.max(layer, function (d) { return d.y0 + d.y; }); })]) .range([height, 0]); - var color = d3.scale.linear() + var color = d3.scale.linear() .range(["#aad", "#556"]); - var area = d3.svg.area() + var area = d3.svg.area<{ x: number; y: number; y0: number }>() .x(function (d) { return x(d.x); }) .y0(function (d) { return y(d.y0); }) .y1(function (d) { return y(d.y0 + d.y); }); @@ -1694,14 +1722,20 @@ function streamGraph() { } // example from http://mbostock.github.io/d3/talk/20111116/force-collapsible.html -function forceCollapsable2() { +module forceCollapsable2 { + interface Node extends d3.layout.force.Node { + _children: Node[]; + size: number; + id: string; + } + var w = 1280, h = 800, node, link, root; - var force = d3.layout.force() + var force = d3.layout.force() .on("tick", tick) .charge(function (d) { return d._children ? -d.size / 100 : -30; } ) .linkDistance(function (d) { return d.target._children ? 80 : 30; } ) @@ -1721,7 +1755,7 @@ function forceCollapsable2() { function update() { var nodes = flatten(root), - links = d3.layout.tree().links(nodes); + links = d3.layout.tree().links(nodes); // Restart the force layout. force @@ -1828,7 +1862,7 @@ function chordDiagram() { innerRadius = Math.min(width, height) * .41, outerRadius = innerRadius * 1.1; - var fill = d3.scale.ordinal() + var fill = d3.scale.ordinal() .domain(d3.range(4)) .range(["#000000", "#FFDD89", "#957244", "#F26223"]); @@ -1843,7 +1877,7 @@ function chordDiagram() { .enter().append("path") .style("fill", function (d) { return fill(d.index); } ) .style("stroke", function (d) { return fill(d.index); } ) - .attr("d", d3.svg.arc().innerRadius(innerRadius).outerRadius(outerRadius)) + .attr("d", d3.svg.arc().innerRadius(innerRadius).outerRadius(outerRadius)) .on("mouseover", fade(.1)) .on("mouseout", fade(1)); @@ -1876,7 +1910,7 @@ function chordDiagram() { .selectAll("path") .data(chord.chords) .enter().append("path") - .attr("d", d3.svg.chord().radius(innerRadius)) + .attr("d", d3.svg.chord().radius(innerRadius)) .style("fill", function (d) { return fill(d.target.index); } ) .style("opacity", 1); @@ -1925,14 +1959,12 @@ function irisParallel() { .attr("transform", "translate(" + m[3] + "," + m[0] + ")"); d3.csv("iris.csv", function (flowers) { + var i: number; // Create a scale and brush for each trait. traits.forEach(function (d) { - // Coerce values to numbers. - flowers.forEach(function (p) { p[d] = +p[d]; } ); - - y[d] = d3.scale.linear() - .domain(d3.extent(flowers, function (p) { return p[d]; } )) + y[d] = d3.scale.linear() + .domain(d3.extent(flowers, function (p) { return +p[d]; } )) .range([h, 0]); y[d].brush = d3.svg.brush() @@ -1963,7 +1995,7 @@ function irisParallel() { .data(flowers) .enter().append("svg:path") .attr("d", path) - .attr("class", function (d) { return d.species; } ); + .attr("class", function (d) { return d['species']; } ); // Add a group element for each trait. var g = svg.selectAll(".trait") @@ -1971,8 +2003,8 @@ function irisParallel() { .enter().append("svg:g") .attr("class", "trait") .attr("transform", function (d) { return "translate(" + x(d) + ")"; } ) - .call(d3.behavior.drag() - .origin(function (d) { return { x: x(d) }; } ) + .call(d3.behavior.drag() + .origin(function (d) { return { x: x(d), y: undefined }; } ) .on("dragstart", dragstart) .on("drag", drag) .on("dragend", dragend)); @@ -1994,12 +2026,12 @@ function irisParallel() { .attr("x", -8) .attr("width", 16); - function dragstart(d, i?) { + function dragstart(d) { i = traits.indexOf(d); } - function drag(d, i?) { - x.range()[i] = d3.event.x; + function drag(d) { + x.range()[i] = ( d3.event).x; traits.sort(function (a, b) { return x(a) - x(b); } ); g.attr("transform", function (d) { return "translate(" + x(d) + ")"; } ); foreground.attr("d", path); @@ -2015,7 +2047,7 @@ function irisParallel() { // Returns the path for a given data point. function path(d) { - return line(traits.map(function (p) { return [x(p), y[p](d[p])]; } )); + return line(traits.map(function (p): [number, number] { return [x(p), y[p](d[p])]; } )); } // Handles a brush event, toggling the display of foreground lines. @@ -2098,7 +2130,7 @@ function healthAndWealth() { .text(1800); // Load the data. - d3.json("nations.json", function (nations) { + d3.json("nations.json", function (nations: any[]) { // A bisector since many nation's data is sparsely-defined. var bisect = d3.bisector(function (d) { return d[0]; } ); @@ -2219,7 +2251,7 @@ function healthAndWealth() { // Test for d3.functor function functorTest () { - var f = d3.functor(10); + var f: (n: number) => number = d3.functor(10); var g = d3.functor(function (v) { return v; }); return f(10) === g(10); @@ -2243,68 +2275,68 @@ function nestTest () { } ]; - var n1 = d3.nest() - .key(function (d) { return d.a; }) + var n1 = d3.nest<{a: number; b: number[] }>() + .key(function (d) { return String(d.a); }) .sortKeys(d3.descending) .rollup(function (vals) { - return d3.sum(vals); + return d3.sum(vals[0].b); }); n1.map(data); n1.entries(data); - var n2 = d3.nest() - .key(function (d) { return d.a; }) + var n2 = d3.nest<{ a: number; b: number[] }>() + .key(function (d) { return String(d.a); }) .sortValues(function (x1, x2) { return x1[0] < x1[1] ? -1 : (x1[0] > x1[0] ? 1 : 0); }); n2.map(data); n2.entries(data); // Tests adopted from d3's tests. - var keys = d3.nest() - .key(function(d) { return d.foo; }) + var keys = d3.nest<{ foo: number; }>() + .key(function(d) { return String(d.foo); }) .entries([{foo: 1}, {foo: 1}, {foo: 2}]) .map(function(d) { return d.key; }) .sort(d3.ascending); - var entries = d3.nest() - .key(function(d) { return d.foo; }) + var entries = d3.nest<{foo: number; bar?: number}>() + .key(function(d) { return String(d.foo); }) .entries([{foo: 1, bar: 0}, {foo: 2}, {foo: 1, bar: 1}]); - keys = d3.nest() - .key(function(d) { return d.foo; }).sortKeys(d3.descending) + keys = d3.nest<{foo: number}>() + .key(function(d) { return String(d.foo); }).sortKeys(d3.descending) .entries([{foo: 1}, {foo: 1}, {foo: 2}]) .map(function(d) { return d.key; }); - entries = d3.nest() - .key(function(d) { return d.foo; }) + entries = d3.nest<{ foo: number; bar?: number }>() + .key(function(d) { return String(d.foo); }) .sortValues(function(a, b) { return a.bar - b.bar; }) .entries([{foo: 1, bar: 2}, {foo: 1, bar: 0}, {foo: 1, bar: 1}, {foo: 2}]); - entries = d3.nest() - .key(function(d) { return d.foo; }) + entries = d3.nest<{ foo: number; bar?: number }>() + .key(function(d) { return String(d.foo); }) .rollup(function(values) { return d3.sum(values, function(d) { return d.bar; }); }) .entries([{foo: 1, bar: 2}, {foo: 1, bar: 0}, {foo: 1, bar: 1}, {foo: 2}]); - entries = d3.nest() - .key(function(d) { return d[0]; }).sortKeys(d3.ascending) - .key(function(d) { return d[1]; }).sortKeys(d3.ascending) + entries = d3.nest<[number, number]>() + .key(function(d) { return String(d[0]); }).sortKeys(d3.ascending) + .key(function(d) { return String(d[1]); }).sortKeys(d3.ascending) .entries([[0, 1], [0, 2], [1, 1], [1, 2], [0, 2]]); - entries = d3.nest() - .key(function(d) { return d[0]; }).sortKeys(d3.ascending) - .key(function(d) { return d[1]; }).sortKeys(d3.ascending) + entries = d3.nest<[number, number]>() + .key(function(d) { return String(d[0]); }).sortKeys(d3.ascending) + .key(function(d) { return String(d[1]); }).sortKeys(d3.ascending) .rollup(function(values) { return values.length; }) .entries([[0, 1], [0, 2], [1, 1], [1, 2], [0, 2]]); - entries = d3.nest() - .key(function(d) { return d[0]; }).sortKeys(d3.ascending) - .key(function(d) { return d[1]; }).sortKeys(d3.ascending) + entries = d3.nest<{ 0: number; 1: number; 2?: number }>() + .key(function(d) { return String(d[0]); }).sortKeys(d3.ascending) + .key(function(d) { return String(d[1]); }).sortKeys(d3.ascending) .sortValues(function(a, b) { return a[2] - b[2]; }) .entries([[0, 1], [0, 2, 1], [1, 1], [1, 2], [0, 2, 0]]); - var map = d3.nest() - .key(function(d) { return d[0]; }).sortKeys(d3.ascending) - .key(function(d) { return d[1]; }).sortKeys(d3.ascending) + var map = d3.nest<{ 0: number; 1: number; 2?: number }>() + .key(function(d) { return String(d[0]); }).sortKeys(d3.ascending) + .key(function(d) { return String(d[1]); }).sortKeys(d3.ascending) .sortValues(function(a, b) { return a[2] - b[2]; }) .map([[0, 1], [0, 2, 1], [1, 1], [1, 2], [0, 2, 0]]); } @@ -2344,7 +2376,7 @@ function brushTest() { var brush1 = d3.svg.brush() .x(xScale) .on('brush', function () { - var extent = brush1.extent(); + var extent = <[number, number]> brush1.extent(); xMin = Math.max(extent[0], 0); xMax = Math.min(extent[1], 1); brush1.extent([xMin, xMax]); @@ -2373,186 +2405,155 @@ function brushTest() { // Tests for area // Adopted from: https://github.com/mbostock/d3/blob/master/test/svg/area-test.js function svgAreaTest () { - var a = d3.svg.area(); + var a = d3.svg.area(), + f: () => number, + n: number; - a.x()([0, 1]); - a.x()([0, 1], 1); + a.x(f).x() === f; + a.x(n).x() === n; a.x(0); - a.x(function (d) { return d.x * 10; }); + a.x(function (d) { return d[0] * 10; }); a.x(function (d, i) { return i * 10; }); - a.x0()([0, 1]); - a.x0()([0, 1], 1); + a.x(f).x0() === f; + a.x(n).x0() === n; a.x0(0); - a.x0(function (d) { return d.x * 10; }); + a.x0(function (d) { return d[0] * 10; }); a.x0(function (d, i) { return i * 10; }); - a.x1()([0, 1]); - a.x1()([0, 1], 1); + a.x(f).x1() === f; + a.x(n).x1() === n; a.x1(0); - a.x1(function (d) { return d.x * 10; }); + a.x1(function (d) { return d[0] * 10; }); a.x1(function (d, i) { return i * 10; }); - a.y()([0, 1]); - a.y()([0, 1], 1); + a.y(f).y() === f; + a.y(n).y() === n; a.y(0); - a.y(function (d) { return d.x * 10; }); + a.y(function (d) { return d[0] * 10; }); a.y(function (d, i) { return i * 10; }); - a.y0()([0, 1]); - a.y0()([0, 1], 1); + a.y(f).y0() === f; + a.y(n).y0() === n; a.y0(0); - a.y0(function (d) { return d.x * 10; }); + a.y0(function (d) { return d[0] * 10; }); a.y0(function (d, i) { return i * 10; }); - a.y1()([0, 1]); - a.y1()([0, 1], 1); + a.y(f).y1() === f; + a.y(n).y1() === n; a.y1(0); - a.y1(function (d) { return d.x * 10; }); + a.y1(function (d) { return d[0] * 10; }); a.y1(function (d, i) { return i * 10; }); } // Tests for areaRadial // Adopted from: https://github.com/mbostock/d3/blob/master/test/svg/area-radial-test.js function svgAreaRadialTest () { - var a = d3.svg.area.radial(); + var a = d3.svg.area.radial(), + f: () => number, + n: number; - a.x()([0, 1]); - a.x()([0, 1], 1); - a.x(0); - a.x(function (d) { return d.x * 10; }); - a.x(function (d, i) { return i * 10; }); - - a.x0()([0, 1]); - a.x0()([0, 1], 1); - a.x0(0); - a.x0(function (d) { return d.x * 10; }); - a.x0(function (d, i) { return i * 10; }); - - a.x1()([0, 1]); - a.x1()([0, 1], 1); - a.x1(0); - a.x1(function (d) { return d.x * 10; }); - a.x1(function (d, i) { return i * 10; }); - - a.y()([0, 1]); - a.y()([0, 1], 1); - a.y(0); - a.y(function (d) { return d.x * 10; }); - a.y(function (d, i) { return i * 10; }); - - a.y0()([0, 1]); - a.y0()([0, 1], 1); - a.y0(0); - a.y0(function (d) { return d.x * 10; }); - a.y0(function (d, i) { return i * 10; }); - - a.y1()([0, 1]); - a.y1()([0, 1], 1); - a.y1(0); - a.y1(function (d) { return d.x * 10; }); - a.y1(function (d, i) { return i * 10; }); - - a.radius(function () { return 10; }); - a.radius(function (d) { return d.x * 10; }); + a.radius(f).radius() === f; + a.radius(n).radius() === n; + a.radius(0); + a.radius(function (d) { return d[0] * 10; }); a.radius(function (d, i) { return i * 10; }); - a.innerRadius(function () { return 10; }); - a.innerRadius(function (d) { return d.x * 10; }); + a.radius(f).innerRadius() === f; + a.radius(n).innerRadius() === n; + a.innerRadius(0); + a.innerRadius(function (d) { return d[0] * 10; }); a.innerRadius(function (d, i) { return i * 10; }); - a.outerRadius(function () { return 10; }); - a.outerRadius(function (d) { return d.x * 10; }); + a.radius(f).outerRadius() === f; + a.radius(n).outerRadius() === n; + a.outerRadius(0); + a.outerRadius(function (d) { return d[1] * 10; }); a.outerRadius(function (d, i) { return i * 10; }); - a.angle(function () { return 10; }); - a.angle(function (d) { return d.x * 10; }); + a.angle(f).angle() === f; + a.angle(n).angle() === n; + a.angle(0); + a.angle(function (d) { return d[0] * 10; }); a.angle(function (d, i) { return i * 10; }); - a.startAngle(function () { return 10; }); - a.startAngle(function (d) { return d.x * 10; }); + a.angle(f).startAngle() === f; + a.angle(n).startAngle() === n; + a.startAngle(0); + a.startAngle(function (d) { return d[0] * 10; }); a.startAngle(function (d, i) { return i * 10; }); - a.endAngle(function () { return 10; }); - a.endAngle(function (d) { return d.x * 10; }); + a.angle(f).endAngle() === f; + a.angle(n).endAngle() === n; + a.endAngle(0); + a.endAngle(function (d) { return d[1] * 10; }); a.endAngle(function (d, i) { return i * 10; }); } // Tests for d3.svg.line // Adopted from: https://github.com/mbostock/d3/blob/master/test/svg/line-test.js function svgLineTest () { - var l = d3.svg.line(); + var l = d3.svg.line(), + f: () => number, + n: number; - l.x()([0, 1]); - l.x()([0, 1], 0); + l.x(f).x() === f; + l.x(n).x() === n; l.x(0); - l.x(function (d) { return d.x; }); + l.x(function (d) { return d[0]; }); l.x(function (d, i) { return i; }); - l.y()([0, 1]); - l.y()([0, 1], 0); + l.y(f).y() === f; + l.y(n).y() === n; l.y(0); - l.y(function (d) { return d.y; }); + l.y(function (d) { return d[1]; }); l.y(function (d, i) { return i; }); } // Tests for d3.svg.line.radial // Adopted from: https://github.com/mbostock/d3/blob/master/test/svg/line-radial-test.js function svgLineRadialTest () { - var l = d3.svg.line.radial(); + var l = d3.svg.line.radial(), + f: () => number, + n: number; - l.x()([0, 1]); - l.x()([0, 1], 0); - l.x(0); - l.x(function (d) { return d.x; }); - l.x(function (d, i) { return i; }); - - l.y()([0, 1]); - l.y()([0, 1], 0); - l.y(0); - l.y(function (d) { return d.y; }); - l.y(function (d, i) { return i; }); - - l.radius()([0, 1]); - l.radius()([0, 1], 0); + l.radius(f).radius() === f; + l.radius(n).radius() === n; l.radius(0); - l.radius(function (d) { return d.x; }); + l.radius(function (d) { return d[0]; }); l.radius(function (d, i) { return i; }); - l.angle()([0, 1]); - l.angle()([0, 1], 0); + l.angle(f).angle() === f; + l.angle(n).angle() === n; l.angle(0); - l.angle(function (d) { return d.y; }); + l.angle(function (d) { return d[1]; }); l.angle(function (d, i) { return i; }); } // Tests for d3.svg.arc // Adopted from: https://github.com/mbostock/d3/blob/master/test/svg/arc-test.js function svgArcTest () { - var l = d3.svg.arc(); + var l = d3.svg.arc(), + f: () => number; - l.innerRadius()([0, 1]); - l.innerRadius()([0, 1], 0); + l.innerRadius(f).innerRadius() === f; l.innerRadius(0); - l.innerRadius(function (d) { return d.x; }); + l.innerRadius(function (d) { return d[0]; }); l.innerRadius(function (d, i) { return i; }); - l.outerRadius()([0, 1]); - l.outerRadius()([0, 1], 0); + l.outerRadius(f).outerRadius() === f; l.outerRadius(0); - l.outerRadius(function (d) { return d.x; }); + l.outerRadius(function (d) { return d[1]; }); l.outerRadius(function (d, i) { return i; }); - l.startAngle()([0, 1]); - l.startAngle()([0, 1], 0); + l.startAngle(f).startAngle() === f; l.startAngle(0); - l.startAngle(function (d) { return d.x; }); + l.startAngle(function (d) { return d[0]; }); l.startAngle(function (d, i) { return i; }); - l.endAngle()([0, 1]); - l.endAngle()([0, 1], 0); + l.endAngle(f).endAngle() === f; l.endAngle(0); - l.endAngle(function (d) { return d.x; }); + l.endAngle(function (d) { return d[1]; }); l.endAngle(function (d, i) { return i; }); } @@ -2561,28 +2562,28 @@ function svgArcTest () { function svgDiagonalTest () { var d = d3.svg.diagonal(); - d.projection()({ x: 0, y: 1}); d.projection()({ x: 0, y: 1}, 0); d.projection(function (d) { return [d.x, d.y]; }); d.projection(function (d, i) { return [i, i + 1]; }); - d.source()({x: 0, y: 1}); - d.source()({x: 0, y: 1}, 0); + d.source()({ source: {x: 0, y: 1}, target: null }, 0); d.source({x: 0, y: 1}); - d.source(function (d) { return {x: d.x, y: d.y}; }); - d.source(function (d, i) { return {x: d.x * i, y: d.y * i}; }); + d.source(function (d) { return {x: d.source.x, y: d.source.y}; }); + d.source(function (d, i) { return {x: d.source.x * i, y: d.source.y * i}; }); - d.target()({x: 0, y: 1}); - d.target()({x: 0, y: 1}, 0); + d.target()({ target: {x: 0, y: 1}, source: null }, 0); d.target({x: 0, y: 1}); - d.target(function (d) { return {x: d.x, y: d.y}; }); - d.target(function (d, i) { return {x: d.x * i, y: d.y * i}; }); + d.target(function (d) { return {x: d.target.x, y: d.target.y}; }); + d.target(function (d, i) { return {x: d.target.x * i, y: d.target.y * i}; }); } // Tests for d3.extent // Adopted from: https://github.com/mbostock/d3/blob/master/test/arrays/extent-test.js function extentTest() { + // usages of `o' suppressed as well as mixed-type comparisons + // see https://github.com/Microsoft/TypeScript/commit/c0db7ffe8f55b6ec335880482ca43b93b066689d var o = { valueOf: function () { return NaN; } }; + d3.extent([1]); d3.extent([5, 1, 2, 3, 4]); d3.extent([20, 3]); @@ -2591,15 +2592,15 @@ function extentTest() { d3.extent(["20", "3"]); d3.extent(["3", "20"]); d3.extent([NaN, 1, 2, 3, 4, 5]); - d3.extent([o, 1, 2, 3, 4, 5]); + // d3.extent([o, 1, 2, 3, 4, 5]); d3.extent([1, 2, 3, 4, 5, NaN]); - d3.extent([1, 2, 3, 4, 5, o]); + // d3.extent([1, 2, 3, 4, 5, o]); d3.extent([10, null, 3, undefined, 5, NaN]); d3.extent([-1, null, -3, undefined, -5, NaN]); - d3.extent([20, "3"]); - d3.extent(["20", 3]); - d3.extent([3, "20"]); - d3.extent(["3", 20]); + // d3.extent([20, "3"]); + // d3.extent(["20", 3]); + // d3.extent([3, "20"]); + // d3.extent(["3", 20]); d3.extent([1], (d) => { return d; }); d3.extent([5, 1, 2, 3, 4], (d) => { return d; }); @@ -2609,28 +2610,28 @@ function extentTest() { d3.extent(["20", "3"], (d) => { return d; }); d3.extent(["3", "20"], (d) => { return d; }); d3.extent([NaN, 1, 2, 3, 4, 5], (d) => { return d; }); - d3.extent([o, 1, 2, 3, 4, 5], (d) => { return d; }); + // d3.extent([o, 1, 2, 3, 4, 5], (d) => { return d; }); d3.extent([1, 2, 3, 4, 5, NaN], (d) => { return d; }); - d3.extent([1, 2, 3, 4, 5, o], (d) => { return d; }); + // d3.extent([1, 2, 3, 4, 5, o], (d) => { return d; }); d3.extent([10, null, 3, undefined, 5, NaN], (d) => { return d; }); d3.extent([-1, null, -3, undefined, -5, NaN], (d) => { return d; }); - d3.extent([20, "3"], (d) => { return d; }); - d3.extent(["20", 3], (d) => { return d; }); - d3.extent([3, "20"], (d) => { return d; }); - d3.extent(["3", 20], (d) => { return d; }); + // d3.extent([20, "3"], (d) => { return d; }); + // d3.extent(["20", 3], (d) => { return d; }); + // d3.extent([3, "20"], (d) => { return d; }); + // d3.extent(["3", 20], (d) => { return d; }); } // Tests for d3.time.format.multi // Adopted from http://bl.ocks.org/mbostock/4149176 function multiTest() { var customTimeFormat = d3.time.format.multi([ - [".%L", function(d) { return d.getMilliseconds(); }], - [":%S", function(d) { return d.getSeconds(); }], - ["%I:%M", function(d) { return d.getMinutes(); }], - ["%I %p", function(d) { return d.getHours(); }], - ["%a %d", function(d) { return d.getDay() && d.getDate() != 1; }], + [".%L", function(d) { return !!d.getMilliseconds(); }], + [":%S", function(d) { return !!d.getSeconds(); }], + ["%I:%M", function(d) { return !!d.getMinutes(); }], + ["%I %p", function(d) { return !!d.getHours(); }], + ["%a %d", function(d) { return !!d.getDay() && d.getDate() != 1; }], ["%b %d", function(d) { return d.getDate() != 1; }], - ["%B", function(d) { return d.getMonth(); }], + ["%B", function(d) { return !!d.getMonth(); }], ["%Y", function() { return true; }] ]); @@ -2656,4 +2657,4 @@ function multiTest() { .attr("class", "x axis") .attr("transform", "translate(0," + height + ")") .call(xAxis); -} \ No newline at end of file +} diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 57e817818..dddef751b 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -1,3451 +1,3278 @@ -// Type definitions for d3JS -// Project: http://d3js.org/ -// Definitions by: Boris Yankov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module D3 { - export interface Selectors { - /** - * Select an element from the current document - */ - select: { - /** - * Returns the empty selection - */ - (): Selection; - /** - * Selects the first element that matches the specified selector string - * - * @param selector Selection String to match - */ - (selector: string): Selection; - /** - * Selects the specified node - * - * @param element Node element to select - */ - (element: EventTarget): Selection; - }; - - /** - * Select multiple elements from the current document - */ - selectAll: { - /** - * Selects all elements that match the specified selector - * - * @param selector Selection String to match - */ - (selector: string): Selection; - /** - * Selects the specified array of elements - * - * @param elements Array of node elements to select - */ - (elements: EventTarget[]): Selection; - }; - } - - export interface D3Event extends Event{ - dx: number; - dy: number; - clientX: number; - clientY: number; - translate: number[]; - scale: number; - sourceEvent: D3Event; - x: number; - y: number; - keyCode: number; - altKey: any; - type: string; - } - - export interface Base extends Selectors { - /** - * Create a behavior - */ - behavior: Behavior.Behavior; - /** - * Access the current user event for interaction - */ - event: D3Event; - - /** - * Compare two values for sorting. - * Returns -1 if a is less than b, or 1 if a is greater than b, or 0 - * - * @param a First value - * @param b Second value - */ - ascending(a: T, b: T): number; - /** - * Compare two values for sorting. - * Returns -1 if a is greater than b, or 1 if a is less than b, or 0 - * - * @param a First value - * @param b Second value - */ - descending(a: T, b: T): number; - /** - * Find the minimum value in an array - * - * @param arr Array to search - * @param map Accsessor function - */ - min(arr: T[], map: (v?: T, i?: number) => U): U; - /** - * Find the minimum value in an array - * - * @param arr Array to search - */ - min(arr: T[]): T; - /** - * Find the maximum value in an array - * - * @param arr Array to search - * @param map Accsessor function - */ - max(arr: T[], map: (v?: T, i?: number) => U): U; - /** - * Find the maximum value in an array - * - * @param arr Array to search - */ - max(arr: T[]): T; - /** - * Find the minimum and maximum value in an array - * - * @param arr Array to search - * @param map Accsessor function - */ - extent(arr: T[], map: (v: T) => U): U[]; - /** - * Find the minimum and maximum value in an array - * - * @param arr Array to search - */ - extent(arr: T[]): T[]; - /** - * Compute the sum of an array of numbers - * - * @param arr Array to search - * @param map Accsessor function - */ - sum(arr: T[], map: (v: T) => number): number; - /** - * Compute the sum of an array of numbers - * - * @param arr Array to search - */ - sum(arr: number[]): number; - /** - * Compute the arithmetic mean of an array of numbers - * - * @param arr Array to search - * @param map Accsessor function - */ - mean(arr: T[], map: (v: T) => number): number; - /** - * Compute the arithmetic mean of an array of numbers - * - * @param arr Array to search - */ - mean(arr: number[]): number; - /** - * Compute the median of an array of numbers (the 0.5-quantile). - * - * @param arr Array to search - * @param map Accsessor function - */ - median(arr: T[], map: (v: T) => number): number; - /** - * Compute the median of an array of numbers (the 0.5-quantile). - * - * @param arr Array to search - */ - median(arr: number[]): number; - /** - * Compute a quantile for a sorted array of numbers. - * - * @param arr Array to search - * @param p The quantile to return - */ - quantile: (arr: number[], p: number) => number; - /** - * Locate the insertion point for x in array to maintain sorted order - * - * @param arr Array to search - * @param x Value to search for insertion point - * @param low Minimum value of array subset - * @param hihg Maximum value of array subset - */ - bisect(arr: T[], x: T, low?: number, high?: number): number; - /** - * Locate the insertion point for x in array to maintain sorted order - * - * @param arr Array to search - * @param x Value to serch for insertion point - * @param low Minimum value of array subset - * @param high Maximum value of array subset - */ - bisectLeft(arr: T[], x: T, low?: number, high?: number): number; - /** - * Locate the insertion point for x in array to maintain sorted order - * - * @param arr Array to search - * @param x Value to serch for insertion point - * @param low Minimum value of array subset - * @param high Maximum value of array subset - */ - bisectRight(arr: T[], x: T, low?: number, high?: number): number; - /** - * Bisect using an accessor. - * - * @param accessor Accessor function - */ - bisector(accessor: (data: any, index: number) => any): any; - /** - * Randomize the order of an array. - * - * @param arr Array to randomize - */ - shuffle(arr: T[]): T[]; - /** - * Reorder an array of elements according to an array of indexes - * - * @param arr Array to reorder - * @param indexes Array containing the order the elements should be returned in - */ - permute(arr: any[], indexes: any[]): any[]; - /** - * Transpose a variable number of arrays. - * - * @param arrs Arrays to transpose - */ - zip(...arrs: any[]): any[]; - /** - * Parse the given 2D affine transform string, as defined by SVG's transform attribute. - * - * @param definition 2D affine transform string - */ - transform(definition: string): any; - /** - * Transpose an array of arrays. - * - * @param matrix Two dimensional array to transpose - */ - transpose(matrix: any[]): any[]; - /** - * Creates an array containing tuples of adjacent pairs - * - * @param arr An array containing entries to pair - * @returns any[][] An array of 2-element tuples for each pair - */ - pairs(arr: any[]): any[][]; - /** - * List the keys of an associative array. - * - * @param map Array of objects to get the key values from - */ - keys(map: any): string[]; - /** - * List the values of an associative array. - * - * @param map Array of objects to get the values from - */ - values(map: any): any[]; - /** - * List the key-value entries of an associative array. - * - * @param map Array of objects to get the key-value pairs from - */ - entries(map: any): any[]; - /** - * merge multiple arrays into one array - * - * @param map Arrays to merge - */ - merge(...map: any[]): any[]; - /** - * Generate a range of numeric values. - */ - range: { - /** - * Generate a range of numeric values from 0. - * - * @param stop Value to generate the range to - * @param step Step between each value - */ - (stop: number, step?: number): number[]; - /** - * Generate a range of numeric values. - * - * @param start Value to start - * @param stop Value to generate the range to - * @param step Step between each value - */ - (start: number, stop?: number, step?: number): number[]; - }; - /** - * Create new nest operator - */ - nest(): Nest; - /** - * Request a resource using XMLHttpRequest. - */ - xhr: { - /** - * Creates an asynchronous request for specified url - * - * @param url Url to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - (url: string, callback?: (xhr: XMLHttpRequest) => void ): Xhr; - /** - * Creates an asynchronous request for specified url - * - * @param url Url to request - * @param mime MIME type to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - (url: string, mime: string, callback?: (xhr: XMLHttpRequest) => void ): Xhr; - }; - /** - * Request a text file - */ - text: { - /** - * Request a text file - * - * @param url Url to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - (url: string, callback?: (response: string) => void ): Xhr; - /** - * Request a text file - * - * @param url Url to request - * @param mime MIME type to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - (url: string, mime: string, callback?: (response: string) => void ): Xhr; - }; - /** - * Request a JSON blob - * - * @param url Url to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - json: (url: string, callback?: (error: any, data: any) => void ) => Xhr; - /** - * Request an HTML document fragment. - */ - xml: { - /** - * Request an HTML document fragment. - * - * @param url Url to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - (url: string, callback?: (response: Document) => void ): Xhr; - /** - * Request an HTML document fragment. - * - * @param url Url to request - * @param mime MIME type to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - (url: string, mime: string, callback?: (response: Document) => void ): Xhr; - }; - /** - * Request an XML document fragment. - * - * @param url Url to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - html: (url: string, callback?: (response: DocumentFragment) => void ) => Xhr; - /** - * Request a comma-separated values (CSV) file. - */ - csv: Dsv; - /** - * Request a tab-separated values (TSV) file - */ - tsv: Dsv; - /** - * Time Functions - */ - time: Time.Time; - /** - * Scales - */ - scale: Scale.ScaleBase; - /* - * Interpolate two values - */ - interpolate: Transition.BaseInterpolate; - /* - * Interpolate two numbers - */ - interpolateNumber: Transition.BaseInterpolate; - /* - * Interpolate two integers - */ - interpolateRound: Transition.BaseInterpolate; - /* - * Interpolate two strings - */ - interpolateString: Transition.BaseInterpolate; - /* - * Interpolate two RGB colors - */ - interpolateRgb: Transition.BaseInterpolate; - /* - * Interpolate two HSL colors - */ - interpolateHsl: Transition.BaseInterpolate; - /* - * Interpolate two HCL colors - */ - interpolateHcl: Transition.BaseInterpolate; - /* - * Interpolate two L*a*b* colors - */ - interpolateLab: Transition.BaseInterpolate; - /* - * Interpolate two arrays of values - */ - interpolateArray: Transition.BaseInterpolate; - /* - * Interpolate two arbitary objects - */ - interpolateObject: Transition.BaseInterpolate; - /* - * Interpolate two 2D matrix transforms - */ - interpolateTransform: Transition.BaseInterpolate; - /* - * The array of built-in interpolator factories - */ - interpolators: Transition.InterpolateFactory[]; - /** - * Layouts - */ - layout: Layout.Layout; - /** - * Svg's - */ - svg: Svg.Svg; - /** - * Random number generators - */ - random: Random; - /** - * Create a function to format a number as a string - * - * @param specifier The format specifier to use - */ - format(specifier: string): (value: number) => string; - /** - * Returns the SI prefix for the specified value at the specified precision - */ - formatPrefix(value: number, precision?: number): MetricPrefix; - /** - * The version of the d3 library - */ - version: string; - /** - * Returns the root selection - */ - selection(): Selection; - ns: { - /** - * The map of registered namespace prefixes - */ - prefix: { - svg: string; - xhtml: string; - xlink: string; - xml: string; - xmlns: string; - }; - /** - * Qualifies the specified name - */ - qualify(name: string): { space: string; local: string; }; - }; - /** - * Returns a built-in easing function of the specified type - */ - ease: (type: string, ...arrs: any[]) => D3.Transition.Transition; - /** - * Constructs a new RGB color. - */ - rgb: { - /** - * Constructs a new RGB color with the specified r, g and b channel values - */ - (r: number, g: number, b: number): D3.Color.RGBColor; - /** - * Constructs a new RGB color by parsing the specified color string - */ - (color: string): D3.Color.RGBColor; - }; - /** - * Constructs a new HCL color. - */ - hcl: { - /** - * Constructs a new HCL color. - */ - (h: number, c: number, l: number): Color.HCLColor; - /** - * Constructs a new HCL color by parsing the specified color string - */ - (color: string): Color.HCLColor; - }; - /** - * Constructs a new HSL color. - */ - hsl: { - /** - * Constructs a new HSL color with the specified hue h, saturation s and lightness l - */ - (h: number, s: number, l: number): Color.HSLColor; - /** - * Constructs a new HSL color by parsing the specified color string - */ - (color: string): Color.HSLColor; - }; - /** - * Constructs a new RGB color. - */ - lab: { - /** - * Constructs a new LAB color. - */ - (l: number, a: number, b: number): Color.LABColor; - /** - * Constructs a new LAB color by parsing the specified color string - */ - (color: string): Color.LABColor; - }; - geo: Geo.Geo; - geom: Geom.Geom; - /** - * gets the mouse position relative to a specified container. - */ - mouse(container: any): number[]; - /** - * gets the touch positions relative to a specified container. - */ - touches(container: any): number[][]; - - /** - * If the specified value is a function, returns the specified value. - * Otherwise, returns a function that returns the specified value. - */ - functor(value: (p : R) => T): (p : R) => T; - functor(value: T): (p : any) => T; - - map: { - (): Map; - (object: {[key: string]: T; }): Map; - (map: Map): Map; - (array: T[]): Map; - (array: T[], keyFn: (object: T, index?: number) => string): Map; - }; - set: { - (): Set; - (array: T[]): Set; - }; - dispatch(...types: string[]): Dispatch; - rebind(target: any, source: any, ...names: any[]): any; - requote(str: string): string; - timer: { - (funct: () => boolean, delay?: number, mark?: number): void; - flush(): void; - } - transition(): Transition.Transition; - - round(x: number, n: number): number; - } - - export interface Dispatch { - [event: string]: any; - on: { - (type: string): any; - (type: string, listener: any): any; - } - } - - export interface MetricPrefix { - /** - * the scale function, for converting numbers to the appropriate prefixed scale. - */ - scale: (d: number) => number; - /** - * the prefix symbol - */ - symbol: string; - } - - export interface Xhr { - /** - * Get or set request header - */ - header: { - /** - * Get the value of specified request header - * - * @param name Name of header to get the value for - */ - (name: string): string; - /** - * Set the value of specified request header - * - * @param name Name of header to set the value for - * @param value Value to set the header to - */ - (name: string, value: string): Xhr; - }; - /** - * Get or set MIME Type - */ - mimeType: { - /** - * Get the current MIME Type - */ - (): string; - /** - * Set the MIME Type for the request - * - * @param type The MIME type for the request - */ - (type: string): Xhr; - }; - /* - * Get or Set the function used to map the response to the associated data value - */ - response: { - /** - * Get function used to map the response to the associated data value - */ - (): (xhr: XMLHttpRequest) => any; - /** - * Set function used to map the response to the associated data value - * - * @param value The function used to map the response to a data value - */ - (value: (xhr: XMLHttpRequest) => any): Xhr; - }; - /** - * Issue the request using the GET method - * - * @param callback Function to invoke on completion of request - */ - get(callback?: (xhr: XMLHttpRequest) => void ): Xhr; - /** - * Issue the request using the POST method - */ - post: { - /** - * Issue the request using the POST method - * - * @param callback Function to invoke on completion of request - */ - (callback?: (xhr: XMLHttpRequest) => void ): Xhr; - /** - * Issue the request using the POST method - * - * @param data Data to post back in the request - * @param callback Function to invoke on completion of request - */ - (data: any, callback?: (xhr: XMLHttpRequest) => void ): Xhr; - }; - /** - * Issues this request using the specified method - */ - send: { - /** - * Issues this request using the specified method - * - * @param method Method to use to make the request - * @param callback Function to invoke on completion of request - */ - (method: string, callback?: (xhr: XMLHttpRequest) => void ): Xhr; - /** - * Issues this request using the specified method - * - * @param method Method to use to make the request - * @param data Data to post back in the request - * @param callback Function to invoke on completion of request - */ - (method: string, data: any, callback?: (xhr: XMLHttpRequest) => void ): Xhr; - }; - /** - * Aborts this request, if it is currently in-flight - */ - abort(): Xhr; - /** - * Registers a listener to receive events - * - * @param type Enent name to attach the listener to - * @param listener Function to attach to event - */ - on: (type: string, listener: (data: any, index?: number) => any) => Xhr; - } - - export interface Dsv { - /** - * Request a delimited values file - * - * @param url Url to request - * @param callback Function to invoke when resource is loaded or the request fails - */ - (url: string, callback?: (error: any, response: any[]) => void ): Xhr; - /** - * Parse a delimited string into objects using the header row. - * - * @param string delimited formatted string to parse - * @param accessor to modify properties of each row - */ - parse(string: string, accessor?: (row: any, index?: number) => any): any[]; - /** - * Parse a delimited string into tuples, ignoring the header row. - * - * @param string delimited formatted string to parse - */ - parseRows(string: string, accessor: (row: any[], index: number) => any): any; - /** - * Format an array of tuples into a delimited string. - * - * @param rows Array to convert to a delimited string - */ - format(rows: any[]): string; - } - - export interface Selection extends Selectors, Array { - attr: { - (name: string): string; - (name: string, value: any): Selection; - (name: string, valueFunction: (data: any, index: number) => any): Selection; - (attrValueMap : Object): Selection; - }; - - classed: { - (name: string): boolean; - (name: string, value: any): Selection; - (name: string, valueFunction: (data: any, index: number) => any): Selection; - (classValueMap: Object): Selection; - }; - - style: { - (name: string): string; - (name: string, value: any, priority?: string): Selection; - (name: string, valueFunction: (data: any, index: number) => any, priority?: string): Selection; - (styleValueMap : Object): Selection; - }; - - property: { - (name: string): void; - (name: string, value: any): Selection; - (name: string, valueFunction: (data: any, index: number) => any): Selection; - (propertyValueMap : Object): Selection; - }; - - text: { - (): string; - (value: any): Selection; - (valueFunction: (data: any, index: number) => any): Selection; - }; - - html: { - (): string; - (value: any): Selection; - (valueFunction: (data: any, index: number) => any): Selection; - }; - - append: (name: string) => Selection; - insert: (name: string, before: string) => Selection; - remove: () => Selection; - empty: () => boolean; - - data: { - (values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => any): UpdateSelection; - (values: any[], key?: (data: any, index?: number) => any): UpdateSelection; - (): any[]; - }; - - datum: { - /** - * Sets the element's bound data to the return value of the specified function evaluated - * for each selected element. - * Unlike the D3.Selection.data method, this method does not compute a join (and thus - * does not compute enter and exit selections). - * @param values The function to be evaluated for each selected element, being passed the - * previous datum d and the current index i, with the this context as the current DOM - * element. The function is then used to set each element's data. A null value will - * delete the bound data. This operator has no effect on the index. - */ - (values: (data: any, index: number) => any): UpdateSelection; - /** - * Sets the element's bound data to the specified value on all selected elements. - * Unlike the D3.Selection.data method, this method does not compute a join (and thus - * does not compute enter and exit selections). - * @param values The same data to be given to all elements. - */ - (values: any): UpdateSelection; - /** - * Returns the bound datum for the first non-null element in the selection. - * This is generally useful only if you know the selection contains exactly one element. - */ - (): any; - /** - * Returns the bound datum for the first non-null element in the selection. - * This is generally useful only if you know the selection contains exactly one element. - */ - (): T; - }; - - filter: { - (filter: (data: any, index: number) => boolean, thisArg?: any): UpdateSelection; - (filter: string): UpdateSelection; - }; - - call(callback: (selection: Selection, ...args: any[]) => void, ...args: any[]): Selection; - each(eachFunction: (data: any, index: number) => any): Selection; - on: { - (type: string): (data: any, index: number) => any; - (type: string, listener: (data: any, index: number) => any, capture?: boolean): Selection; - }; - - /** - * Returns the total number of elements in the current selection. - */ - size(): number; - - /** - * Starts a transition for the current selection. Transitions behave much like selections, - * except operators animate smoothly over time rather than applying instantaneously. - */ - transition(): Transition.Transition; - - /** - * Sorts the elements in the current selection according to the specified comparator - * function. - * - * @param comparator a comparison function, which will be passed two data elements a and b - * to compare, and should return either a negative, positive, or zero value to indicate - * their relative order. - */ - sort(comparator?: (a: T, b: T) => number): Selection; - - /** - * Re-inserts elements into the document such that the document order matches the selection - * order. This is equivalent to calling sort() if the data is already sorted, but much - * faster. - */ - order: () => Selection; - - /** - * Returns the first non-null element in the current selection. If the selection is empty, - * returns null. - */ - node: () => T; - } - - export interface EnterSelection { - append: (name: string) => Selection; - insert: (name: string, before?: string) => Selection; - select: (selector: string) => Selection; - empty: () => boolean; - node: () => Element; - call: (callback: (selection: EnterSelection) => void) => EnterSelection; - size: () => number; - } - - export interface UpdateSelection extends Selection { - enter: () => EnterSelection; - update: () => Selection; - exit: () => Selection; - } - - export interface NestKeyValue { - key: string; - values: any; - } - - export interface Nest { - key(keyFunction: (data: any, index: number) => string): Nest; - sortKeys(comparator: (d1: any, d2: any) => number): Nest; - sortValues(comparator: (d1: any, d2: any) => number): Nest; - rollup(rollupFunction: (data: any, index: number) => any): Nest; - map(values: any[], mapType?: any): any; - entries(values: any[]): NestKeyValue[]; - } - - export interface MapKeyValue { - key: string; - value: T; - } - - export interface Map { - has(key: string): boolean; - get(key: string): T; - set(key: string, value: T): T; - remove(key: string): boolean; - keys(): string[]; - values(): T[]; - entries(): MapKeyValue[]; - forEach(func: (key: string, value: T) => void ): void; - empty(): boolean; - size(): number; - } - - export interface Set { - has(value: T): boolean; - add(value: T): T; - remove(value: T): boolean; - values(): string[]; - forEach(func: (value: string) => void ): void; - empty(): boolean; - size(): number; - } - - export interface Random { - /** - * Returns a function for generating random numbers with a normal distribution - * - * @param mean The expected value of the generated pseudorandom numbers - * @param deviation The given standard deviation - */ - normal(mean?: number, deviation?: number): () => number; - /** - * Returns a function for generating random numbers with a log-normal distribution - * - * @param mean The expected value of the generated pseudorandom numbers - * @param deviation The given standard deviation - */ - logNormal(mean?: number, deviation?: number): () => number; - /** - * Returns a function for generating random numbers with an Irwin-Hall distribution - * - * @param count The number of independent variables - */ - irwinHall(count: number): () => number; - } - - // Transitions - export module Transition { - export interface Transition { - duration: { - (duration: number): Transition; - (duration: (data: any, index: number) => any): Transition; - }; - delay: { - (delay: number): Transition; - (delay: (data: any, index: number) => any): Transition; - }; - attr: { - (name: string): string; - (name: string, value: any): Transition; - (name: string, valueFunction: (data: any, index: number) => any): Transition; - (attrValueMap : any): Transition; - }; - style: { - (name: string): string; - (name: string, value: any, priority?: string): Transition; - (name: string, valueFunction: (data: any, index: number) => any, priority?: string): Transition; - }; - call(callback: (transition: Transition, ...args: any[]) => void, ...args: any[]): Transition; - /** - * Select an element from the current document - */ - select: { - /** - * Selects the first element that matches the specified selector string - * - * @param selector Selection String to match - */ - (selector: string): Transition; - /** - * Selects the specified node - * - * @param element Node element to select - */ - (element: EventTarget): Transition; - }; - - /** - * Select multiple elements from the current document - */ - selectAll: { - /** - * Selects all elements that match the specified selector - * - * @param selector Selection String to match - */ - (selector: string): Transition; - /** - * Selects the specified array of elements - * - * @param elements Array of node elements to select - */ - (elements: EventTarget[]): Transition; - } - each: { - /** - * Immediately invokes the specified function for each element in the current - * transition, passing in the current datum and index, with the this context - * of the current DOM element. Similar to D3.Selection.each. - * - * @param eachFunction The function to be invoked for each element in the - * current transition, passing in the current datum and index, with the this - * context of the current DOM element. - */ - (eachFunction: (data: any, index: number) => any): Transition; - /** - * Adds a listener for transition events, supporting "start", "end" and - * "interrupt" events. The listener will be invoked for each individual - * element in the transition. - * - * @param type Type of transition event. Supported values are "start", "end" - * and "interrupt". - * @param listener The listener to be invoked for each individual element in - * the transition. - */ - (type: string, listener: (data: any, index: number) => any): Transition; - } - transition: () => Transition; - ease: (value: string, ...arrs: any[]) => Transition; - attrTween(name: string, tween: (d: any, i: number, a: any) => BaseInterpolate): Transition; - styleTween(name: string, tween: (d: any, i: number, a: any) => BaseInterpolate, priority?: string): Transition; - text: { - (text: string): Transition; - (text: (d: any, i: number) => string): Transition; - } - tween(name: string, factory: InterpolateFactory): Transition; - filter: { - (selector: string): Transition; - (selector: (data: any, index: number) => boolean): Transition; - }; - remove(): Transition; - } - - export interface InterpolateFactory { - (a?: any, b?: any): BaseInterpolate; - } - - export interface BaseInterpolate { - (a: any, b?: any): any; - } - - export interface Interpolate { - (t: any): any; - } - } - - //Time - export module Time { - export interface Time { - second: Interval; - minute: Interval; - hour: Interval; - day: Interval; - week: Interval; - sunday: Interval; - monday: Interval; - tuesday: Interval; - wednesday: Interval; - thursday: Interval; - friday: Interval; - saturday: Interval; - month: Interval; - year: Interval; - - seconds: Range; - minutes: Range; - hours: Range; - days: Range; - weeks: Range; - months: Range; - years: Range; - - sundays: Range; - mondays: Range; - tuesdays: Range; - wednesdays: Range; - thursdays: Range; - fridays: Range; - saturdays: Range; - format: { - /** - * Constructs a new local time formatter using the given specifier. - */ - (specifier: string): TimeFormat; - /** - * Returns a new multi-resolution time format given the specified array of predicated formats. - */ - multi: (formats: any[][]) => TimeFormat; - - utc: { - /** - * Constructs a new local time formatter using the given specifier. - */ - (specifier: string): TimeFormat; - /** - * Returns a new multi-resolution UTC time format given the specified array of predicated formats. - */ - multi: (formats: any[][]) => TimeFormat; - }; - - /** - * The full ISO 8601 UTC time format: "%Y-%m-%dT%H:%M:%S.%LZ". - */ - iso: TimeFormat; - }; - - scale: { - /** - * Constructs a new time scale with the default domain and range; - * the ticks and tick format are configured for local time. - */ - (): Scale.TimeScale; - /** - * Constructs a new time scale with the default domain and range; - * the ticks and tick format are configured for UTC time. - */ - utc(): Scale.TimeScale; - }; - } - - export interface Range { - (start: Date, end: Date, step?: number): Date[]; - } - - export interface Interval { - (date: Date): Date; - floor: (date: Date) => Date; - round: (date: Date) => Date; - ceil: (date: Date) => Date; - range: Range; - offset: (date: Date, step: number) => Date; - utc?: Interval; - } - - export interface TimeFormat { - (date: Date): string; - parse: (string: string) => Date; - } - } - - // Layout - export module Layout { - export interface Layout { - /** - * Creates a new Stack layout - */ - stack(): StackLayout; - /** - * Creates a new pie layout - */ - pie(): PieLayout; - /** - * Creates a new force layout - */ - force(): ForceLayout; - /** - * Creates a new tree layout - */ - tree(): TreeLayout; - bundle(): BundleLayout; - chord(): ChordLayout; - cluster(): ClusterLayout; - hierarchy(): HierarchyLayout; - histogram(): HistogramLayout; - pack(): PackLayout; - partition(): PartitionLayout; - treemap(): TreeMapLayout; - } - - export interface StackLayout { - (layers: T[], index?: number): T[]; - values(accessor?: (d: any) => any): StackLayout; - offset(offset: string): StackLayout; - x(accessor: (d: any, i: number) => any): StackLayout; - y(accessor: (d: any, i: number) => any): StackLayout; - out(setter: (d: any, y0: number, y: number) => void): StackLayout; - } - - export interface TreeLayout { - /** - * Gets or sets the sort order of sibling nodes for the layout using the specified comparator function - */ - sort: { - /** - * Gets the sort order function of sibling nodes for the layout - */ - (): (d1: any, d2: any) => number; - /** - * Sets the sort order of sibling nodes for the layout using the specified comparator function - */ - (comparator: (d1: any, d2: any) => number): TreeLayout; - }; - /** - * Gets or sets the specified children accessor function - */ - children: { - /** - * Gets the children accessor function - */ - (): (d: any) => any; - /** - * Sets the specified children accessor function - */ - (children: (d: any) => any): TreeLayout; - }; - /** - * Runs the tree layout - */ - nodes(root: GraphNode): GraphNode[]; - /** - * Given the specified array of nodes, such as those returned by nodes, returns an array of objects representing the links from parent to child for each node - */ - links(nodes: GraphNode[]): GraphLink[]; - /** - * If separation is specified, uses the specified function to compute separation between neighboring nodes. If separation is not specified, returns the current separation function - */ - separation: { - /** - * Gets the current separation function - */ - (): (a: GraphNode, b: GraphNode) => number; - /** - * Sets the specified function to compute separation between neighboring nodes - */ - (separation: (a: GraphNode, b: GraphNode) => number): TreeLayout; - }; - /** - * Gets or sets the available layout size - */ - size: { - /** - * Gets the available layout size - */ - (): number[]; - /** - * Sets the available layout size - */ - (size: number[]): TreeLayout; - }; - /** - * Gets or sets the available node size - */ - nodeSize: { - /** - * Gets the available node size - */ - (): number[]; - /** - * Sets the available node size - */ - (size: number[]): TreeLayout; - }; - } - - export interface PieLayout { - (values: any[], index?: number): ArcDescriptor[]; - value: { - (): (d: any, index: number) => number; - (accessor: (d: any, index: number) => number): PieLayout; - }; - sort: { - (): (d1: any, d2: any) => number; - (comparator: (d1: any, d2: any) => number): PieLayout; - }; - startAngle: { - (): number; - (angle: number): PieLayout; - (angle: () => number): PieLayout; - (angle: (d : any) => number): PieLayout; - (angle: (d : any, i: number) => number): PieLayout; - }; - endAngle: { - (): number; - (angle: number): PieLayout; - (angle: () => number): PieLayout; - (angle: (d : any) => number): PieLayout - (angle: (d : any, i: number) => number): PieLayout; - }; - } - - export interface ArcDescriptor { - value: any; - data: any; - startAngle: number; - endAngle: number; - index: number; - } - - export interface GraphNode { - id?: number; - index?: number; - name?: string; - px?: number; - py?: number; - size?: number; - weight?: number; - x?: number; - y?: number; - subindex?: number; - startAngle?: number; - endAngle?: number; - value?: number; - fixed?: boolean; - children?: GraphNode[]; - _children?: GraphNode[]; - parent?: GraphNode; - depth?: number; - } - - export interface GraphLink { - source: GraphNode; - target: GraphNode; - } - - export interface GraphNodeForce { - index?: number; - x?: number; - y?: number; - px?: number; - py?: number; - fixed?: boolean; - weight?: number; - } - - export interface GraphLinkForce { - source: GraphNodeForce; - target: GraphNodeForce; - } - - export interface ForceLayout { - (): ForceLayout; - size: { - (): number[]; - (mysize: number[]): ForceLayout; - }; - linkDistance: { - (): number; - (number:number): ForceLayout; - (accessor: (d: any, index: number) => number): ForceLayout; - }; - linkStrength: - { - (): number; - (number:number): ForceLayout; - (accessor: (d: any, index: number) => number): ForceLayout; - }; - friction: - { - (): number; - (number:number): ForceLayout; - (accessor: (d: any, index: number) => number): ForceLayout; - }; - alpha: { - (): number; - (number:number): ForceLayout; - (accessor: (d: any, index: number) => number): ForceLayout; - }; - charge: { - (): number; - (number:number): ForceLayout; - (accessor: (d: any, index: number) => number): ForceLayout; - }; - - theta: { - (): number; - (number:number): ForceLayout; - (accessor: (d: any, index: number) => number): ForceLayout; - }; - - gravity: { - (): number; - (number:number): ForceLayout; - (accessor: (d: any, index: number) => number): ForceLayout; - }; - - links: { - (): GraphLinkForce[]; - (arLinks: GraphLinkForce[]): ForceLayout; - - }; - nodes: - { - (): GraphNodeForce[]; - (arNodes: GraphNodeForce[]): ForceLayout; - - }; - start(): ForceLayout; - resume(): ForceLayout; - stop(): ForceLayout; - tick(): ForceLayout; - on(type: string, listener: () => void ): ForceLayout; - drag(): ForceLayout; - } - - export interface BundleLayout{ - (links: GraphLink[]): GraphNode[][]; - } - - export interface ChordLayout { - matrix: { - (): number[][]; - (matrix: number[][]): ChordLayout; - } - padding: { - (): number; - (padding: number): ChordLayout; - } - sortGroups: { - (): (a: number, b: number) => number; - (comparator: (a: number, b: number) => number): ChordLayout; - } - sortSubgroups: { - (): (a: number, b: number) => number; - (comparator: (a: number, b: number) => number): ChordLayout; - } - sortChords: { - (): (a: number, b: number) => number; - (comparator: (a: number, b: number) => number): ChordLayout; - } - chords(): GraphLink[]; - groups(): ArcDescriptor[]; - } - - export interface ClusterLayout{ - sort: { - (): (a: GraphNode, b: GraphNode) => number; - (comparator: (a: GraphNode, b: GraphNode) => number): ClusterLayout; - } - children: { - (): (d: any, i?: number) => GraphNode[]; - (children: (d: any, i?: number) => GraphNode[]): ClusterLayout; - } - nodes(root: GraphNode): GraphNode[]; - links(nodes: GraphNode[]): GraphLink[]; - separation: { - (): (a: GraphNode, b: GraphNode) => number; - (separation: (a: GraphNode, b: GraphNode) => number): ClusterLayout; - } - size: { - (): number[]; - (size: number[]): ClusterLayout; - } - value: { - (): (node: GraphNode) => number; - (value: (node: GraphNode) => number): ClusterLayout; - } - } - - export interface HierarchyLayout { - sort: { - (): (a: GraphNode, b: GraphNode) => number; - (comparator: (a: GraphNode, b: GraphNode) => number): HierarchyLayout; - } - children: { - (): (d: any, i?: number) => GraphNode[]; - (children: (d: any, i?: number) => GraphNode[]): HierarchyLayout; - } - nodes(root: GraphNode): GraphNode[]; - links(nodes: GraphNode[]): GraphLink[]; - value: { - (): (node: GraphNode) => number; - (value: (node: GraphNode) => number): HierarchyLayout; - } - reValue(root: GraphNode): HierarchyLayout; - } - - export interface Bin extends Array { - x: number; - dx: number; - y: number; - } - - export interface HistogramLayout { - (values: any[], index?: number): Bin[]; - value: { - (): (value: any) => any; - (accessor: (value: any) => any): HistogramLayout - } - range: { - (): (value: any, index: number) => number[]; - (range: (value: any, index: number) => number[]): HistogramLayout; - (range: number[]): HistogramLayout; - } - bins: { - (): (range: any[], index: number) => number[]; - (bins: (range: any[], index: number) => number[]): HistogramLayout; - (bins: number): HistogramLayout; - (bins: number[]): HistogramLayout; - } - frequency: { - (): boolean; - (frequency: boolean): HistogramLayout; - } - } - - export interface PackLayout { - sort: { - (): (a: GraphNode, b: GraphNode) => number; - (comparator: (a: GraphNode, b: GraphNode) => number): PackLayout; - } - children: { - (): (d: any, i?: number) => GraphNode[]; - (children: (d: any, i?: number) => GraphNode[]): PackLayout; - } - nodes(root: GraphNode): GraphNode[]; - links(nodes: GraphNode[]): GraphLink[]; - value: { - (): (node: GraphNode) => number; - (value: (node: GraphNode) => number): PackLayout; - } - size: { - (): number[]; - (size: number[]): PackLayout; - } - padding: { - (): number; - (padding: number): PackLayout; - } - } - - export interface PartitionLayout { - sort: { - (): (a: GraphNode, b: GraphNode) => number; - (comparator: (a: GraphNode, b: GraphNode) => number): PackLayout; - } - children: { - (): (d: any, i?: number) => GraphNode[]; - (children: (d: any, i?: number) => GraphNode[]): PackLayout; - } - nodes(root: GraphNode): GraphNode[]; - links(nodes: GraphNode[]): GraphLink[]; - value: { - (): (node: GraphNode) => number; - (value: (node: GraphNode) => number): PackLayout; - } - size: { - (): number[]; - (size: number[]): PackLayout; - } - } - - export interface TreeMapLayout { - sort: { - (): (a: GraphNode, b: GraphNode) => number; - (comparator: (a: GraphNode, b: GraphNode) => number): TreeMapLayout; - } - children: { - (): (d: any, i?: number) => GraphNode[]; - (children: (d: any, i?: number) => GraphNode[]): TreeMapLayout; - } - nodes(root: GraphNode): GraphNode[]; - links(nodes: GraphNode[]): GraphLink[]; - value: { - (): (node: GraphNode) => number; - (value: (node: GraphNode) => number): TreeMapLayout; - } - size: { - (): number[]; - (size: number[]): TreeMapLayout; - } - padding: { - (): number; - (padding: number): TreeMapLayout; - } - round: { - (): boolean; - (round: boolean): TreeMapLayout; - } - sticky: { - (): boolean; - (sticky: boolean): TreeMapLayout; - } - mode: { - (): string; - (mode: string): TreeMapLayout; - } - } - } - - // Color - export module Color { - export interface Color { - /** - * increase lightness by some exponential factor (gamma) - */ - brighter(k?: number): Color; - /** - * decrease lightness by some exponential factor (gamma) - */ - darker(k?: number): Color; - /** - * convert the color to a string. - */ - toString(): string; - } - - export interface RGBColor extends Color{ - /** - * the red color channel. - */ - r: number; - /** - * the green color channel. - */ - g: number; - /** - * the blue color channel. - */ - b: number; - /** - * convert from RGB to HSL. - */ - hsl(): HSLColor; - } - - export interface HSLColor extends Color{ - /** - * hue - */ - h: number; - /** - * saturation - */ - s: number; - /** - * lightness - */ - l: number; - /** - * convert from HSL to RGB. - */ - rgb(): RGBColor; - } - - export interface LABColor extends Color{ - /** - * lightness - */ - l: number; - /** - * a-dimension - */ - a: number; - /** - * b-dimension - */ - b: number; - /** - * convert from LAB to RGB. - */ - rgb(): RGBColor; - } - - export interface HCLColor extends Color{ - /** - * hue - */ - h: number; - /** - * chroma - */ - c: number; - /** - * luminance - */ - l: number; - /** - * convert from HCL to RGB. - */ - rgb(): RGBColor; - } - } - - // SVG - export module Svg { - export interface Svg { - /** - * Create a new symbol generator - */ - symbol(): Symbol; - /** - * Create a new axis generator - */ - axis(): Axis; - /** - * Create a new arc generator - */ - arc(): Arc; - /** - * Create a new line generator - */ - line: { - (): Line; - radial(): LineRadial; - } - /** - * Create a new area generator - */ - area: { - (): Area; - radial(): AreaRadial; - } - /** - * Create a new brush generator - */ - brush(): Brush; - /** - * Create a new chord generator - */ - chord(): Chord; - /** - * Create a new diagonal generator - */ - diagonal: { - (): Diagonal; - radial(): Diagonal; - } - /** - * The array of supported symbol types. - */ - symbolTypes: string[]; - } - - export interface Symbol { - type: (symbolType: string | ((datum: any, index: number) => string)) => Symbol; - size: (size: number | ((datum: any, index: number) => number)) => Symbol; - (datum:any, index:number): string; - } - - export interface Brush { - /** - * Draws or redraws this brush into the specified selection of elements - */ - (selection: Selection): void; - /** - * Gets or sets the x-scale associated with the brush - */ - x: { - /** - * Gets the x-scale associated with the brush - */ - (): D3.Scale.Scale; - /** - * Sets the x-scale associated with the brush - * - * @param accessor The new Scale - */ - (scale: D3.Scale.Scale): Brush; - }; - /** - * Gets or sets the x-scale associated with the brush - */ - y: { - /** - * Gets the x-scale associated with the brush - */ - (): D3.Scale.Scale; - /** - * Sets the x-scale associated with the brush - * - * @param accessor The new Scale - */ - (scale: D3.Scale.Scale): Brush; - }; - /** - * Gets or sets the current brush extent - */ - extent: { - /** - * Gets the current brush extent - */ - (): any[]; - /** - * Sets the current brush extent - */ - (values: any[]): Brush; - }; - /** - * Clears the extent, making the brush extent empty. - */ - clear(): Brush; - /** - * Returns true if and only if the brush extent is empty - */ - empty(): boolean; - /** - * Gets or sets the listener for the specified event type - */ - on: { - /** - * Gets the listener for the specified event type - */ - (type: string): (data: any, index: number) => any; - /** - * Sets the listener for the specified event type - */ - (type: string, listener: (data: any, index: number) => any, capture?: boolean): Brush; - }; - } - - export interface Axis { - (selection: Selection): void; - (transition: Transition.Transition): void; - - scale: { - (): any; - (scale: any): Axis; - }; - - orient: { - (): string; - (orientation: string): Axis; - }; - - ticks: { - (): any[]; - (...arguments: any[]): Axis; - }; - - tickPadding: { - (): number; - (padding: number): Axis; - }; - - tickValues: { - (): any[]; - (values: any[]): Axis; - }; - tickSubdivide(count: number): Axis; - tickSize: { - (): number; - (inner: number, outer?: number): Axis; - } - innerTickSize: { - (): number; - (value: number): Axis; - } - outerTickSize: { - (): number; - (value: number): Axis; - } - tickFormat(formatter: (value: any, index?: number) => string): Axis; - nice(count?: number): Axis; - } - - export interface Arc { - /** - * Returns the path data string - * - * @param data Array of data elements - * @param index Optional index - */ - (data: any, index?: number): string; - innerRadius: { - (): (data: any, index?: number) => number; - (radius: number): Arc; - (radius: () => number): Arc; - (radius: (data: any) => number): Arc; - (radius: (data: any, index: number) => number): Arc; - }; - outerRadius: { - (): (data: any, index?: number) => number; - (radius: number): Arc; - (radius: () => number): Arc; - (radius: (data: any) => number): Arc; - (radius: (data: any, index: number) => number): Arc; - }; - startAngle: { - (): (data: any, index?: number) => number; - (angle: number): Arc; - (angle: () => number): Arc; - (angle: (data: any) => number): Arc; - (angle: (data: any, index: number) => number): Arc; - }; - endAngle: { - (): (data: any, index?: number) => number; - (angle: number): Arc; - (angle: () => number): Arc; - (angle: (data: any) => number): Arc; - (angle: (data: any, index: number) => number): Arc; - }; - centroid(data: any, index?: number): number[]; - } - - export interface Line { - /** - * Returns the path data string - * - * @param data Array of data elements - * @param index Optional index - */ - (data: any[], index?: number): string; - /** - * Get or set the x-coordinate accessor. - */ - x: { - /** - * Get the x-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Line; - (accessor: (data: any, index: number) => number): Line; - /** - * Set the x-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): Line; - }; - /** - * Get or set the y-coordinate accessor. - */ - y: { - /** - * Get the y-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Line; - (accessor: (data: any, index: number) => number): Line; - /** - * Set the y-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): Line; - }; - /** - * Get or set the interpolation mode. - */ - interpolate: { - /** - * Get the interpolation accessor. - */ - (): string; - /** - * Set the interpolation accessor. - * - * @param interpolate The interpolation mode - */ - (interpolate: string): Line; - }; - /** - * Get or set the cardinal spline tension. - */ - tension: { - /** - * Get the cardinal spline accessor. - */ - (): number; - /** - * Set the cardinal spline accessor. - * - * @param tension The Cardinal spline interpolation tension - */ - (tension: number): Line; - }; - /** - * Control whether the line is defined at a given point. - */ - defined: { - /** - * Get the accessor function that controls where the line is defined. - */ - (): (data: any, index?: number) => boolean; - /** - * Set the accessor function that controls where the area is defined. - * - * @param defined The new accessor function - */ - (defined: (data: any, index?: number) => boolean): Line; - }; - } - - export interface LineRadial { - /** - * Returns the path data string - * - * @param data Array of data elements - * @param index Optional index - */ - (data: any[], index?: number): string; - /** - * Get or set the x-coordinate accessor. - */ - x: { - /** - * Get the x-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): LineRadial; - (accessor: (data: any, index: number) => number): LineRadial; - - /** - * Set the x-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): LineRadial; - }; - /** - * Get or set the y-coordinate accessor. - */ - y: { - /** - * Get the y-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): LineRadial; - (accessor: (data: any, index: number) => number): LineRadial; - /** - * Set the y-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): LineRadial; - }; - /** - * Get or set the interpolation mode. - */ - interpolate: { - /** - * Get the interpolation accessor. - */ - (): string; - /** - * Set the interpolation accessor. - * - * @param interpolate The interpolation mode - */ - (interpolate: string): LineRadial; - }; - /** - * Get or set the cardinal spline tension. - */ - tension: { - /** - * Get the cardinal spline accessor. - */ - (): number; - /** - * Set the cardinal spline accessor. - * - * @param tension The Cardinal spline interpolation tension - */ - (tension: number): LineRadial; - }; - /** - * Control whether the line is defined at a given point. - */ - defined: { - /** - * Get the accessor function that controls where the line is defined. - */ - (): (data: any) => any; - /** - * Set the accessor function that controls where the area is defined. - * - * @param defined The new accessor function - */ - (defined: (data: any) => any): LineRadial; - }; - radius: { - (): (d: any, i?: number) => number; - (radius: number): LineRadial; - (radius: (d: any) => number): LineRadial; - (radius: (d: any, i: number) => number): LineRadial; - } - angle: { - (): (d: any, i?: any) => number; - (angle: number): LineRadial; - (angle: (d: any) => number): LineRadial; - (angle: (d: any, i: any) => number): LineRadial; - } - } - - export interface Area { - /** - * Generate a piecewise linear area, as in an area chart. - */ - (data: any[], index?: number): string; - /** - * Get or set the x-coordinate accessor. - */ - x: { - /** - * Get the x-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Area; - (accessor: (data: any, index: number) => number): Area; - /** - * Set the x-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): Area; - }; - /** - * Get or set the x0-coordinate (baseline) accessor. - */ - x0: { - /** - * Get the x0-coordinate (baseline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x0-coordinate (baseline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Area; - (accessor: (data: any, index: number) => number): Area; - /** - * Set the x0-coordinate (baseline) to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): Area; - }; - /** - * Get or set the x1-coordinate (topline) accessor. - */ - x1: { - /** - * Get the x1-coordinate (topline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x1-coordinate (topline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Area; - (accessor: (data: any, index: number) => number): Area; - /** - * Set the x1-coordinate (topline) to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): Area; - }; - /** - * Get or set the y-coordinate accessor. - */ - y: { - /** - * Get the y-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Area; - (accessor: (data: any, index: number) => number): Area; - /** - * Set the y-coordinate to a constant. - * - * @param cnst The constant value - */ - (cnst: number): Area; - }; - /** - * Get or set the y0-coordinate (baseline) accessor. - */ - y0: { - /** - * Get the y0-coordinate (baseline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y0-coordinate (baseline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Area; - (accessor: (data: any, index: number) => number): Area; - /** - * Set the y0-coordinate (baseline) to a constant. - * - * @param cnst The constant value - */ - (cnst: number): Area; - }; - /** - * Get or set the y1-coordinate (topline) accessor. - */ - y1: { - /** - * Get the y1-coordinate (topline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y1-coordinate (topline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): Area; - (accessor: (data: any, index: number) => number): Area; - /** - * Set the y1-coordinate (baseline) to a constant. - * - * @param cnst The constant value - */ - (cnst: number): Area; - }; - /** - * Get or set the interpolation mode. - */ - interpolate: { - /** - * Get the interpolation accessor. - */ - (): string; - /** - * Set the interpolation accessor. - * - * @param interpolate The interpolation mode - */ - (interpolate: string): Area; - }; - /** - * Get or set the cardinal spline tension. - */ - tension: { - /** - * Get the cardinal spline accessor. - */ - (): number; - /** - * Set the cardinal spline accessor. - * - * @param tension The Cardinal spline interpolation tension - */ - (tension: number): Area; - }; - /** - * Control whether the area is defined at a given point. - */ - defined: { - /** - * Get the accessor function that controls where the area is defined. - */ - (): (data: any, index?: number) => any; - /** - * Set the accessor function that controls where the area is defined. - * - * @param defined The new accessor function - */ - (defined: (data: any, index?: number) => any): Area; - }; - } - - export interface AreaRadial { - /** - * Generate a piecewise linear area, as in an area chart. - */ - (data: any[], index?: number): string; - /** - * Get or set the x-coordinate accessor. - */ - x: { - /** - * Get the x-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): AreaRadial; - (accessor: (data: any, index: number) => number): AreaRadial; - /** - * Set the x-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): AreaRadial; - }; - /** - * Get or set the x0-coordinate (baseline) accessor. - */ - x0: { - /** - * Get the x0-coordinate (baseline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x0-coordinate (baseline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): AreaRadial; - (accessor: (data: any, index: number) => number): AreaRadial; - /** - * Set the x0-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): AreaRadial; - }; - /** - * Get or set the x1-coordinate (topline) accessor. - */ - x1: { - /** - * Get the x1-coordinate (topline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the x1-coordinate (topline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): AreaRadial; - (accessor: (data: any, index: number) => number): AreaRadial; - /** - * Set the x1-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): AreaRadial; - }; - /** - * Get or set the y-coordinate accessor. - */ - y: { - /** - * Get the y-coordinate accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): AreaRadial; - (accessor: (data: any, index: number) => number): AreaRadial; - /** - * Set the y-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): AreaRadial; - }; - /** - * Get or set the y0-coordinate (baseline) accessor. - */ - y0: { - /** - * Get the y0-coordinate (baseline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y0-coordinate (baseline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): AreaRadial; - (accessor: (data: any, index: number) => number): AreaRadial; - /** - * Set the y0-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): AreaRadial; - }; - /** - * Get or set the y1-coordinate (topline) accessor. - */ - y1: { - /** - * Get the y1-coordinate (topline) accessor. - */ - (): (data: any, index ?: number) => number; - /** - * Set the y1-coordinate (topline) accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: any) => number): AreaRadial; - (accessor: (data: any, index: number) => number): AreaRadial; - /** - * Set the y1-coordinate to a constant. - * - * @param cnst The new constant value. - */ - (cnst: number): AreaRadial; - }; - /** - * Get or set the interpolation mode. - */ - interpolate: { - /** - * Get the interpolation accessor. - */ - (): string; - /** - * Set the interpolation accessor. - * - * @param interpolate The interpolation mode - */ - (interpolate: string): AreaRadial; - }; - /** - * Get or set the cardinal spline tension. - */ - tension: { - /** - * Get the cardinal spline accessor. - */ - (): number; - /** - * Set the cardinal spline accessor. - * - * @param tension The Cardinal spline interpolation tension - */ - (tension: number): AreaRadial; - }; - /** - * Control whether the area is defined at a given point. - */ - defined: { - /** - * Get the accessor function that controls where the area is defined. - */ - (): (data: any) => any; - /** - * Set the accessor function that controls where the area is defined. - * - * @param defined The new accessor function - */ - (defined: (data: any) => any): AreaRadial; - }; - radius: { - (): number; - (radius: number): AreaRadial; - (radius: () => number): AreaRadial; - (radius: (data: any) => number): AreaRadial; - (radius: (data: any, index: number) => number): AreaRadial; - }; - innerRadius: { - (): number; - (radius: number): AreaRadial; - (radius: () => number): AreaRadial; - (radius: (data: any) => number): AreaRadial; - (radius: (data: any, index: number) => number): AreaRadial; - }; - outerRadius: { - (): number; - (radius: number): AreaRadial; - (radius: () => number): AreaRadial; - (radius: (data: any) => number): AreaRadial; - (radius: (data: any, index: number) => number): AreaRadial; - }; - angle: { - (): number; - (angle: number): AreaRadial; - (angle: () => number): AreaRadial; - (angle: (data: any) => number): AreaRadial; - (angle: (data: any, index: number) => number): AreaRadial; - }; - startAngle: { - (): number; - (angle: number): AreaRadial; - (angle: () => number): AreaRadial; - (angle: (data: any) => number): AreaRadial; - (angle: (data: any, index: number) => number): AreaRadial; - }; - endAngle: { - (): number; - (angle: number): AreaRadial; - (angle: () => number): AreaRadial; - (angle: (data: any) => number): AreaRadial; - (angle: (data: any, index: number) => number): AreaRadial; - }; - } - - export interface Chord { - (datum: any, index?: number): string; - radius: { - (): number; - (radius: number): Chord; - (radius: () => number): Chord; - }; - startAngle: { - (): number; - (angle: number): Chord; - (angle: () => number): Chord; - }; - endAngle: { - (): number; - (angle: number): Chord; - (angle: () => number): Chord; - }; - source: { - (): any; - (angle: any): Chord; - (angle: (d: any, i?: number) => any): Chord; - }; - target: { - (): any; - (angle: any): Chord; - (angle: (d: any, i?: number) => any): Chord; - }; - } - - export interface Diagonal { - (datum: any, index?: number): string; - projection: { - (): (datum: any, index?: number) => number[]; - (proj: (datum: any) => number[]): Diagonal; - (proj: (datum: any, index: number) => number[]): Diagonal; - }; - source: { - (): (datum: any, index?: number) => any; - (src: (datum: any) => any): Diagonal; - (src: (datum: any, index: number) => any): Diagonal; - (src: any): Diagonal; - }; - target: { - (): (datum: any, index?: number) => any; - (target: (d: any) => any): Diagonal; - (target: (d: any, i: number) => any): Diagonal; - (target: any): Diagonal; - }; - } - } - - // Scales - export module Scale { - export interface ScaleBase { - /** - * Construct a linear quantitative scale. - */ - linear(): LinearScale; - /* - * Construct an ordinal scale. - */ - ordinal(): OrdinalScale; - /** - * Construct a linear quantitative scale with a discrete output range. - */ - quantize(): QuantizeScale; - /* - * Construct an ordinal scale with ten categorical colors. - */ - category10(): OrdinalScale; - /* - * Construct an ordinal scale with twenty categorical colors - */ - category20(): OrdinalScale; - /* - * Construct an ordinal scale with twenty categorical colors - */ - category20b(): OrdinalScale; - /* - * Construct an ordinal scale with twenty categorical colors - */ - category20c(): OrdinalScale; - /* - * Construct a linear identity scale. - */ - identity(): IdentityScale; - /* - * Construct a quantitative scale with an logarithmic transform. - */ - log(): LogScale; - /* - * Construct a quantitative scale with an exponential transform. - */ - pow(): PowScale; - /* - * Construct a quantitative scale mapping to quantiles. - */ - quantile(): QuantileScale; - /* - * Construct a quantitative scale with a square root transform. - */ - sqrt(): SqrtScale; - /* - * Construct a threshold scale with a discrete output range. - */ - threshold(): ThresholdScale; - } - - export interface GenericScale { - (value: any): any; - domain: { - (values: any[]): S; - (): any[]; - }; - range: { - (values: any[]): S; - (): any[]; - }; - invertExtent?(y: any): any[]; - copy(): S; - } - - export interface Scale extends GenericScale { } - - export interface GenericQuantitativeScale extends GenericScale { - /** - * Get the range value corresponding to a given domain value. - * - * @param value Domain Value - */ - (value: number): number; - /** - * Get the domain value corresponding to a given range value. - * - * @param value Range Value - */ - invert(value: number): number; - /** - * Set the scale's output range, and enable rounding. - * - * @param value The output range. - */ - rangeRound: (values: any[]) => S; - /** - * get or set the scale's output interpolator. - */ - interpolate: { - (): D3.Transition.Interpolate; - (factory: D3.Transition.Interpolate): S; - }; - /** - * enable or disable clamping of the output range. - * - * @param clamp Enable or disable - */ - clamp: { - (): boolean; - (clamp: boolean): S; - } - /** - * extend the scale domain to nice round numbers. - * - * @param count Optional number of ticks to exactly fit the domain - */ - nice(count?: number): S; - /** - * get representative values from the input domain. - * - * @param count Aproximate representative values to return. - */ - ticks(count: number): any[]; - /** - * get a formatter for displaying tick values - * - * @param count Aproximate representative values to return - */ - tickFormat(count: number, format?: string): (n: number) => string; - } - - export interface QuantitativeScale extends GenericQuantitativeScale { } - - export interface LinearScale extends GenericQuantitativeScale { } - - export interface IdentityScale extends GenericScale { - /** - * Get the range value corresponding to a given domain value. - * - * @param value Domain Value - */ - (value: number): number; - /** - * Get the domain value corresponding to a given range value. - * - * @param value Range Value - */ - invert(value: number): number; - /** - * get representative values from the input domain. - * - * @param count Aproximate representative values to return. - */ - ticks(count: number): any[]; - /** - * get a formatter for displaying tick values - * - * @param count Aproximate representative values to return - */ - tickFormat(count: number): (n: number) => string; - } - - export interface SqrtScale extends GenericQuantitativeScale { } - - export interface PowScale extends GenericQuantitativeScale { } - - export interface LogScale extends GenericQuantitativeScale { } - - export interface OrdinalScale extends GenericScale { - rangePoints(interval: any[], padding?: number): OrdinalScale; - rangeBands(interval: any[], padding?: number, outerPadding?: number): OrdinalScale; - rangeRoundBands(interval: any[], padding?: number, outerPadding?: number): OrdinalScale; - rangeBand(): number; - rangeExtent(): any[]; - } - - export interface QuantizeScale extends GenericScale { } - - export interface ThresholdScale extends GenericScale { } - - export interface QuantileScale extends GenericScale { - quantiles(): any[]; - } - - export interface TimeScale extends GenericScale { - (value: Date): number; - invert(value: number): Date; - rangeRound: (values: any[]) => TimeScale; - interpolate: { - (): D3.Transition.Interpolate; - (factory: D3.Transition.InterpolateFactory): TimeScale; - }; - clamp(clamp: boolean): TimeScale; - ticks: { - (count: number): any[]; - (range: D3.Time.Range, count: number): any[]; - }; - tickFormat(count: number): (n: number) => string; - nice(count?: number): TimeScale; - } - } - - // Behaviour - export module Behavior { - export interface Behavior{ - /** - * Constructs a new drag behaviour - */ - drag(): Drag; - /** - * Constructs a new zoom behaviour - */ - zoom(): Zoom; - } - - export interface Zoom { - /** - * Applies the zoom behavior to the specified selection, - * registering the necessary event listeners to support - * panning and zooming. - */ - (selection: Selection): void; - - /** - * Registers a listener to receive events - * - * @param type Enent name to attach the listener to - * @param listener Function to attach to event - */ - on: (type: string, listener: (data: any, index?: number) => any) => Zoom; - - /** - * Gets or set the current zoom scale - */ - scale: { - /** - * Get the current current zoom scale - */ - (): number; - /** - * Set the current current zoom scale - * - * @param origin Zoom scale - */ - (scale: number): Zoom; - }; - - /** - * Gets or set the current zoom translation vector - */ - translate: { - /** - * Get the current zoom translation vector - */ - (): number[]; - /** - * Set the current zoom translation vector - * - * @param translate Tranlation vector - */ - (translate: number[]): Zoom; - }; - - /** - * Gets or set the allowed scale range - */ - scaleExtent: { - /** - * Get the current allowed zoom range - */ - (): number[]; - /** - * Set the allowable zoom range - * - * @param extent Allowed zoom range - */ - (extent: number[]): Zoom; - }; - - /** - * Gets or set the X-Scale that should be adjusted when zooming - */ - x: { - /** - * Get the X-Scale - */ - (): D3.Scale.Scale; - /** - * Set the X-Scale to be adjusted - * - * @param x The X Scale - */ - (x: D3.Scale.Scale): Zoom; - - }; - - /** - * Gets or set the Y-Scale that should be adjusted when zooming - */ - y: { - /** - * Get the Y-Scale - */ - (): D3.Scale.Scale; - /** - * Set the Y-Scale to be adjusted - * - * @param y The Y Scale - */ - (y: D3.Scale.Scale): Zoom; - }; - } - - export interface Drag { - /** - * Execute drag method - */ - (): any; - - /** - * Registers a listener to receive events - * - * @param type Enent name to attach the listener to - * @param listener Function to attach to event - */ - on: (type: string, listener: (data: any, index?: number) => any) => Drag; - - /** - * Gets or set the current origin accessor function - */ - origin: { - /** - * Get the current origin accessor function - */ - (): any; - /** - * Set the origin accessor function - * - * @param origin Accessor function - */ - (origin?: any): Drag; - }; - } - } - - // Geography - export module Geo { - export interface Geo { - /** - * create a new geographic path generator - */ - path(): Path; - /** - * create a circle generator. - */ - circle(): Circle; - /** - * compute the spherical area of a given feature. - */ - area(feature: any): number; - /** - * compute the latitude-longitude bounding box for a given feature. - */ - bounds(feature: any): number[][]; - /** - * compute the spherical centroid of a given feature. - */ - centroid(feature: any): number[]; - /** - * compute the great-arc distance between two points. - */ - distance(a: number[], b: number[]): number; - /** - * interpolate between two points along a great arc. - */ - interpolate(a: number[], b: number[]): (t: number) => number[]; - /** - * compute the length of a line string or the circumference of a polygon. - */ - length(feature: any): number; - /** - * create a standard projection from a raw projection. - */ - projection(raw: RawProjection): Projection; - /** - * create a standard projection from a mutable raw projection. - */ - projectionMutator(rawFactory: RawProjection): ProjectionMutator; - /** - * the Albers equal-area conic projection. - */ - albers(): Projection; - /** - * a composite Albers projection for the United States. - */ - albersUsa(): Projection; - /** - * the azimuthal equal-area projection. - */ - azimuthalEqualArea: { - (): Projection; - raw: RawProjection; - } - /** - * the azimuthal equidistant projection. - */ - azimuthalEquidistant: { - (): Projection; - raw: RawProjection; - } - /** - * the conic conformal projection. - */ - conicConformal: { - (): Projection; - raw(phi1:number, phi2:number): RawProjection; - } - /** - * the conic equidistant projection. - */ - conicEquidistant: { - (): Projection; - raw(phi1:number, phi2:number): RawProjection; - } - /** - * the conic equal-area (a.k.a. Albers) projection. - */ - conicEqualArea: { - (): Projection; - raw(phi1:number, phi2:number): RawProjection; - } - /** - * the equirectangular (plate carreé) projection. - */ - equirectangular: { - (): Projection; - raw: RawProjection; - } - /** - * the gnomonic projection. - */ - gnomonic: { - (): Projection; - raw: RawProjection; - } - /** - * the spherical Mercator projection. - */ - mercator: { - (): Projection; - raw: RawProjection; - } - /** - * the azimuthal orthographic projection. - */ - orthographic: { - (): Projection; - raw: RawProjection; - } - /** - * the azimuthal stereographic projection. - */ - stereographic: { - (): Projection; - raw: RawProjection; - } - /** - * the transverse Mercator projection. - */ - transverseMercator: { - (): Projection; - raw: RawProjection; - } - /** - * convert a GeoJSON object to a geometry stream. - */ - stream(object: GeoJSON, listener: Stream): void; - /** - * - */ - graticule(): Graticule; - /** - * - */ - greatArc(): GreatArc; - /** - * - */ - rotation(rotation: number[]): Rotation; - } - - export interface Path { - /** - * Returns the path data string for the given feature - */ - (feature: any, index?: any): string; - /** - * get or set the geographic projection. - */ - projection: { - /** - * get the geographic projection. - */ - (): Projection; - /** - * set the geographic projection. - */ - (projection: Projection): Path; - } - /** - * get or set the render context. - */ - context: { - /** - * return an SVG path string invoked on the given feature. - */ - (): string; - /** - * sets the render context and returns the path generator - */ - (context: Context): Path; - } - /** - * Computes the projected area - */ - area(feature: any): any; - /** - * Computes the projected centroid - */ - centroid(feature: any): any; - /** - * Computes the projected bounding box - */ - bounds(feature: any): any; - /** - * get or set the radius to display point features. - */ - pointRadius: { - /** - * returns the current radius - */ - (): number; - /** - * sets the radius used to display Point and MultiPoint features to the specified number - */ - (radius: number): Path; - /** - * sets the radius used to display Point and MultiPoint features to the specified number - */ - (radius: (feature: any, index: number) => number): Path; - } - } - - export interface Context { - beginPath(): any; - moveTo(x: number, y: number): any; - lineTo(x: number, y: number): any; - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number): any; - closePath(): any; - } - - export interface Circle { - (...args: any[]): GeoJSON; - origin: { - (): number[]; - (origin: number[]): Circle; - (origin: (...args: any[]) => number[]): Circle; - } - angle: { - (): number; - (angle: number): Circle; - } - precision: { - (): number; - (precision: number): Circle; - } - } - - export interface Graticule{ - (): GeoJSON; - lines(): GeoJSON[]; - outline(): GeoJSON; - extent: { - (): number[][]; - (extent: number[][]): Graticule; - } - minorExtent: { - (): number[][]; - (extent: number[][]): Graticule; - } - majorExtent: { - (): number[][]; - (extent: number[][]): Graticule; - } - step: { - (): number[][]; - (extent: number[][]): Graticule; - } - minorStep: { - (): number[][]; - (extent: number[][]): Graticule; - } - majorStep: { - (): number[][]; - (extent: number[][]): Graticule; - } - precision: { - (): number; - (precision: number): Graticule; - } - } - - export interface GreatArc { - (): GeoJSON; - distance(): number; - source: { - (): any; - (source: any): GreatArc; - } - target: { - (): any; - (target: any): GreatArc; - } - precision: { - (): number; - (precision: number): GreatArc; - } - } - - export interface GeoJSON { - coordinates: number[][]; - type: string; - } - - export interface RawProjection { - (lambda: number, phi: number): number[]; - invert?(x: number, y: number): number[]; - } - - export interface Projection { - (coordinates: number[]): number[]; - invert?(point: number[]): number[]; - rotate: { - (): number[]; - (rotation: number[]): Projection; - }; - center: { - (): number[]; - (location: number[]): Projection; - }; - parallels: { - (): number[]; - (location: number[]): Projection; - }; - translate: { - (): number[]; - (point: number[]): Projection; - }; - scale: { - (): number; - (scale: number): Projection; - }; - clipAngle: { - (): number; - (angle: number): Projection; - }; - clipExtent: { - (): number[][]; - (extent: number[][]): Projection; - }; - precision: { - (): number; - (precision: number): Projection; - }; - stream(listener?: Stream): Stream; - } - - export interface Stream { - point(x: number, y: number, z?: number): void; - lineStart(): void; - lineEnd(): void; - polygonStart(): void; - polygonEnd(): void; - sphere(): void; - } - - export interface Rotation extends Array { - (location: number[]): Rotation; - invert(location: number[]): Rotation; - } - - export interface ProjectionMutator { - (lambda: number, phi: number): Projection; - } - } - - // Geometry - export module Geom { - export interface Geom { - voronoi(): Voronoi; - /** - * compute the Voronoi diagram for the specified points. - */ - voronoi(vertices: Vertice[]): Polygon[]; - /** - * compute the Delaunay triangulation for the specified points. - */ - delaunay(vertices?: Vertice[]): Polygon[]; - /** - * constructs a quadtree for an array of points. - */ - quadtree(): QuadtreeFactory; - /** - * Constructs a new quadtree for the specified array of points. - */ - quadtree(points: Point[], x1: number, y1: number, x2: number, y2: number): Quadtree; - /** - * Constructs a new quadtree for the specified array of points. - */ - quadtree(points: Point[], width: number, height: number): Quadtree; - /** - * Returns the input array of vertices with additional methods attached - */ - polygon(vertices:Vertice[]): Polygon; - /** - * creates a new hull layout with the default settings. - */ - hull(): Hull; - - hull(vertices:Vertice[]): Vertice[]; - } - - export interface Vertice extends Array { - /** - * Returns the angle of the vertice - */ - angle?: number; - } - - export interface Polygon extends Array { - /** - * Returns the signed area of this polygon - */ - area(): number; - /** - * Returns a two-element array representing the centroid of this polygon. - */ - centroid(): number[]; - /** - * Clips the subject polygon against this polygon - */ - clip(subject: Polygon): Polygon; - } - - export interface QuadtreeFactory { - /** - * Constructs a new quadtree for the specified array of points. - */ - (): Quadtree; - /** - * Constructs a new quadtree for the specified array of points. - */ - (points: Point[], x1: number, y1: number, x2: number, y2: number): Quadtree; - /** - * Constructs a new quadtree for the specified array of points. - */ - (points: Point[], width: number, height: number): Quadtree; - - x: { - (): (d: any) => any; - (accesor: (d: any) => any): QuadtreeFactory; - - } - y: { - (): (d: any) => any; - (accesor: (d: any) => any): QuadtreeFactory; - - } - size(): number[]; - size(size: number[]): QuadtreeFactory; - extent(): number[][]; - extent(points: number[][]): QuadtreeFactory; - } - - export interface Quadtree { - /** - * Adds a new point to the quadtree. - */ - add(point: Point): void; - visit(callback: any): void; - } - - export interface Point { - x: number; - y: number; - } - - export interface Voronoi { - /** - * Compute the Voronoi diagram for the specified data. - */ - (data: T[]): Polygon[]; - /** - * Compute the graph links for the Voronoi diagram for the specified data. - */ - links(data: T[]): Layout.GraphLink[]; - /** - * Compute the triangles for the Voronoi diagram for the specified data. - */ - triangles(data: T[]): number[][]; - x: { - /** - * Get the x-coordinate accessor. - */ - (): (data: T, index ?: number) => number; - - /** - * Set the x-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: T, index: number) => number): Voronoi; - - /** - * Set the x-coordinate to a constant. - * - * @param constant The new constant value. - */ - (constant: number): Voronoi; - } - y: { - /** - * Get the y-coordinate accessor. - */ - (): (data: T, index ?: number) => number; - - /** - * Set the y-coordinate accessor. - * - * @param accessor The new accessor function - */ - (accessor: (data: T, index: number) => number): Voronoi; - - /** - * Set the y-coordinate to a constant. - * - * @param constant The new constant value. - */ - (constant: number): Voronoi; - } - clipExtent: { - /** - * Get the clip extent. - */ - (): number[][]; - /** - * Set the clip extent. - * - * @param extent The new clip extent. - */ - (extent: number[][]): Voronoi; - } - size: { - /** - * Get the size. - */ - (): number[]; - /** - * Set the size, equivalent to a clip extent starting from (0,0). - * - * @param size The new size. - */ - (size: number[]): Voronoi; - } - } - - export interface Hull { - (vertices: Vertice[]): Vertice[]; - x: { - (): (d: any) => any; - (accesor: (d: any) => any): any; - } - y: { - (): (d: any) => any; - (accesor: (d: any) => any): any; - } - } - } -} - -declare var d3: D3.Base; - -declare module "d3" { - export = d3; -} +// Type definitions for d3JS +// Project: http://d3js.org/ +// Definitions by: Boris Yankov +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module d3 { + /** + * The current version of D3.js. + */ + export var version: string; + + /** + * Find the first element that matches the given selector string. + */ + export function select(selector: string): Selection; + + /** + * Create a selection from the given node reference. + */ + export function select(node: EventTarget): Selection; + + /** + * Find all elements that match the given selector string. + */ + export function selectAll(selector: string): Selection; + + /** + * Create a selection from the given list of nodes. + */ + export function selectAll(nodes: EventTarget[]): Selection; + + /** + * Returns the root selection (as if by d3.select(document.documentElement)). This function may be used for 'instanceof' tests, and extending its prototype will add properties to all selections. + */ + export function selection(): Selection; + + module selection { + export var prototype: Selection; + + /** + * Selections are grouped into arrays of nodes, with the parent tracked in the 'parentNode' property. + */ + interface Group extends Array { + parentNode: EventTarget; + } + + interface Update { + /** + * Retrieve a grouped selection. + */ + [index: number]: Group; + + /** + * The number of groups in this selection. + */ + length: number; + + /** + * Retrieve the value of the given attribute for the first node in the selection. + * + * @param name The attribute name to query. May be prefixed (see d3.ns.prefix). + */ + attr(name: string): string; + + /** + * For all nodes, set the attribute to the specified constant value. Use null to remove. + * + * @param name The attribute name, optionally prefixed. + * @param value The attribute value to use. Note that this is coerced to a string automatically. + */ + attr(name: string, value: Primitive): Update; + + /** + * Derive an attribute value for each node in the selection based on bound data. + * + * @param name The attribute name, optionally prefixed. + * @param value The function of the datum (the bound data item) and index (the position in the subgrouping) which computes the attribute value. If the function returns null, the attribute is removed. + */ + attr(name: string, value: (datum: Datum, index: number) => Primitive): Update; + + /** + * Set multiple properties at once using an Object. D3 iterates over all enumerable properties and either sets or computes the attribute's value based on the corresponding entry in the Object. + * + * @param obj A key-value mapping corresponding to attributes and values. If the value is a simple string or number, it is taken as a constant. Otherwise, it is a function that derives the attribute value. + */ + attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Update; + + /** + * Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match. + * + * @param name The class list to query. + */ + classed(name: string): boolean; + + /** + * Adds (or removes) the given class list. + * + * @param name The class list to toggle. Spaces separate class names: "foo bar" is a list of two classes. + * @param value If true, add the classes. If false, remove them. + */ + classed(name: string, value: boolean): Update; + + /** + * Determine if the given class list should be toggled for each node in the selection. + * + * @param name The class list. Spaces separate multiple class names. + * @param value The function to run for each node. Should return true to add the class to the node, or false to remove it. + */ + classed(name: string, value: (datum: Datum, index: number) => boolean): Update; + + /** + * Set or derive classes for multiple class lists at once. + * + * @param obj An Object mapping class lists to values that are either plain booleans or functions that return booleans. + */ + classed(obj: { [key: string]: boolean | ((datum: Datum, index: number) => boolean) }): Update; + + /** + * Retrieve the computed style value for the first node in the selection. + * @param name The CSS property name to query + */ + style(name: string): string; + + /** + * Set a style property for all nodes in the selection. + * @param name the CSS property name + * @param value the property value + * @param priority if specified, either null or the string "important" (no exclamation mark) + */ + style(name: string, value: Primitive, priority?: string): Update; + + /** + * Derive a property value for each node in the selection. + * @param name the CSS property name + * @param value the function to derive the value + * @param priority if specified, either null or the string "important" (no exclamation mark) + */ + style(name: string, value: (datum: Datum, index: number) => Primitive, priority?: string): Update; + + /** + * Set a large number of CSS properties from an object. + * + * @param obj an Object whose keys correspond to CSS property names and values are either constants or functions that derive property values + * @param priority if specified, either null or the string "important" (no exclamation mark) + */ + style(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }, priority?: string): Update; + + /** + * Retrieve an arbitrary node property such as the 'checked' property of checkboxes, or the 'value' of text boxes. + * + * @param name the node's property to retrieve + */ + property(name: string): any; + + /** + * For each node, set the property value. Internally, this sets the node property directly (e.g., node[name] = value), so take care not to mutate special properties like __proto__. + * + * @param name the property name + * @param value the property value + */ + property(name: string, value: any): Update; + + /** + * For each node, derive the property value. Internally, this sets the node property directly (e.g., node[name] = value), so take care not to mutate special properties like __proto__. + * + * @param name the property name + * @param value the function used to derive the property's value + */ + property(name: string, value: (datum: Datum, index: number) => any): Update; + + /** + * Set multiple node properties. Caveats apply: take care not to mutate special properties like __proto__. + * + * @param obj an Object whose keys correspond to node properties and values are either constants or functions that will compute a value. + */ + property(obj: { [key: string]: any | ((datum: Datum, index: number) => any) }): Update; + + /** + * Retrieve the textContent of the first node in the selection. + */ + text(): string; + + /** + * Set the textContent of each node in the selection. + * @param value the text to use for all nodes + */ + text(value: Primitive): Update; + + /** + * Compute the textContent of each node in the selection. + * @param value the function which will compute the text + */ + text(value: (datum: Datum, index: number) => Primitive): Update; + + /** + * Retrieve the HTML content of the first node in the selection. Uses 'innerHTML' internally and will not work with SVG or other elements without a polyfill. + */ + html(): string; + + /** + * Set the HTML content of every node in the selection. Uses 'innerHTML' internally and thus will not work with SVG or other elements without a polyfill. + * @param value the HTML content to use. + */ + html(value: string): Selection; + + /** + * Compute the HTML content for each node in the selection. Uses 'innerHTML' internally and thus will not work with SVG or other elements without a polyfill. + * @param value the function to compute HTML content + */ + html(value: (datum: Datum, index: number) => string): Selection; + + /** + * Appends a new child to each node in the selection. This child will inherit the parent's data (if available). Returns a fresh selection consisting of the newly-appended children. + * + * @param name the element name to append. May be prefixed (see d3.ns.prefix). + */ + append(name: string): Selection; + + /** + * Appends a new child to each node in the selection by computing a new node. This child will inherit the parent's data (if available). Returns a fresh selection consisting of the newly-appended children. + * + * @param name the function to compute a new element + */ + append(name: (datum: Datum, index: number) => EventTarget): Update; + + /** + * Inserts a new child to each node in the selection. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the element name to append. May be prefixed (see d3.ns.prefix). + * @param before the selector to determine position (e.g., ":first-child") + */ + insert(name: string, before: string): Update; + + /** + * Inserts a new child to each node in the selection. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the element name to append. May be prefixed (see d3.ns.prefix). + * @param before a function to determine the node to use as the next sibling + */ + insert(name: string, before: (datum: Datum, index: number) => EventTarget): Update; + + /** + * Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the function to compute a new child + * @param before the selector to determine position (e.g., ":first-child") + */ + insert(name: (datum: Datum, index: number) => EventTarget, before: string): Update; + + /** + * Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the function to compute a new child + * @param before a function to determine the node to use as the next sibling + */ + insert(name: (datum: Datum, index: number) => EventTarget, before: (datum: Datum, index: number) => EventTarget): Update; + + /** + * Removes the elements from the DOM. They are in a detached state and may be re-added (though there is currently no dedicated API for doing so). + */ + remove(): Update; + + /** + * Retrieves the data bound to the first group in this selection. + */ + data(): Datum[]; + + /** + * Binds data to this selection. + * @param data the array of data to bind to this selection + * @param key the optional function to determine the unique key for each piece of data. When unspecified, uses the index of the element. + */ + data(data: NewDatum[], key?: (datum: NewDatum, index: number) => string): Update; + + /** + * Derives data to bind to this selection. + * @param data the function to derive data. Must return an array. + * @param key the optional function to determine the unique key for each data item. When unspecified, uses the index of the element. + */ + data(data: (datum: Datum, index: number) => NewDatum[], key?: (datum: NewDatum, index: number) => string): Update; + + /** + * Filters the selection, returning only those nodes that match the given CSS selector. + * @param selector the CSS selector + */ + filter(selector: string): Update; + + /** + * Filters the selection, returning only those nodes for which the given function returned true. + * @param selector the filter function + */ + filter(selector: (datum: Datum, index: number) => boolean): Update; + + /** + * Return the data item bound to the first element in the selection. + */ + datum(): Datum; + + /** + * Set the data item for each node in the selection. + * @param value the constant element to use for each node + */ + datum(value: NewDatum): Update; + + /** + * Derive the data item for each node in the selection. Useful for situations such as the HTML5 'dataset' attribute. + * @param value the function to compute data for each node + */ + datum(value: (datum: Datum, index: number) => NewDatum): Update; + + /** + * Reorders nodes in the selection based on the given comparator. Nodes are re-inserted into the document once sorted. + * @param comparator the comparison function, which defaults to d3.ascending + */ + sort(comparator?: (a: Datum, b: Datum) => number): Update; + + /** + * Reorders nodes in the document to match the selection order. More efficient than calling sort() if the selection is already ordered. + */ + order(): Update; + + /** + * Returns the listener (if any) for the given event. + * @param type the type of event to load the listener for. May have a namespace (e.g., ".foo") at the end. + */ + on(type: string): (datum: Datum, index: number) => any; + + /** + * Adds a listener for the specified event. If one was already registered, it is removed before the new listener is added. The return value of the listener function is ignored. + * @param type the of event to listen to. May have a namespace (e.g., ".foo") at the end. + * @param listener an event listener function, or null to unregister + * @param capture sets the DOM useCapture flag + */ + on(type: string, listener: (datum: Datum, index: number) => any, capture?: boolean): Update; + + /** + * Begins a new transition. Interrupts any active transitions of the same name. + * @param name the transition name (defaults to "") + */ + transition(name?: string): Transition; + + /** + * Interrupts the active transition of the provided name. Does not cancel scheduled transitions. + * @param name the transition name (defaults to "") + */ + interrupt(name?: string): Update; + + /** + * Creates a subselection by finding the first descendent matching the selector string. Bound data is inherited. + * @param selector the CSS selector to match against + */ + select(selector: string): Update; + + /** + * Creates a subselection by using a function to find descendent elements. Bound data is inherited. + * @param selector the function to find matching descendants + */ + select(selector: (datum: Datum, index: number) => EventTarget): Update; + + /** + * Creates a subselection by finding all descendents that match the given selector. Bound data is not inherited. + * @param selector the CSS selector to match against + */ + selectAll(selector: string): Update; + + /** + * Creates a subselection by using a function to find descendent elements. Bound data is not inherited. + * @param selector the function to find matching descendents + */ + selectAll(selector: (datum: Datum, index: number) => Array | NodeList): Update; + + /** + * Invoke the given function for each element in the selection. The return value of the function is ignored. + * @param func the function to invoke + */ + each(func: (datum: Datum, index: number) => any): Update; + + /** + * Call a function on the selection. sel.call(foo) is equivalent to foo(sel). + * @param func the function to call on the selection + * @param args any optional args + */ + call(func: (sel: Update, ...args: any[]) => any, ...args: any[]): Update; + + /** + * Returns true if the current selection is empty. + */ + empty(): boolean; + + /** + * Returns the first non-null element in the selection, or null otherwise. + */ + node(): EventTarget; + + /** + * Returns the total number of elements in the selection. + */ + size(): number; + + /** + * Returns the placeholder nodes for each data element for which no corresponding DOM element was found. + */ + enter(): Enter; + + /** + * Returns a selection for those DOM nodes for which no new data element was found. + */ + exit(): Selection; + } + + interface Enter { + append(name: string): Selection; + append(name: (datum: Datum, index: number) => EventTarget): Selection; + + insert(name: string, before?: string): Selection; + insert(name: string, before: (datum: Datum, index: number) => EventTarget): Selection; + insert(name: (datum: Datum, index: number) => EventTarget, before?: string): Selection; + insert(name: (datum: Datum, index: number) => EventTarget, before: (datum: Datum, index: number) => EventTarget): Selection; + + select(name: (datum: Datum, index: number) => EventTarget): Selection; + call(func: (selection: Enter, ...args: any[]) => any, ...args: any[]): Enter; + } + } + + /** + * Administrivia: JavaScript primitive types, or "things that toString() predictably". + */ + export type Primitive = number | string | boolean; + + /** + * Administrivia: anything with a valueOf(): number method is comparable, so we allow it in numeric operations + */ + interface Numeric { + valueOf(): number; + } + + /** + * A grouped array of nodes. + * @param Datum the data bound to this selection. + */ + interface Selection { + /** + * Retrieve a grouped selection. + */ + [index: number]: selection.Group; + + /** + * The number of groups in this selection. + */ + length: number; + + /** + * Retrieve the value of the given attribute for the first node in the selection. + * + * @param name The attribute name to query. May be prefixed (see d3.ns.prefix). + */ + attr(name: string): string; + + /** + * For all nodes, set the attribute to the specified constant value. Use null to remove. + * + * @param name The attribute name, optionally prefixed. + * @param value The attribute value to use. Note that this is coerced to a string automatically. + */ + attr(name: string, value: Primitive): Selection; + + /** + * Derive an attribute value for each node in the selection based on bound data. + * + * @param name The attribute name, optionally prefixed. + * @param value The function of the datum (the bound data item) and index (the position in the subgrouping) which computes the attribute value. If the function returns null, the attribute is removed. + */ + attr(name: string, value: (datum: Datum, index: number) => Primitive): Selection; + + /** + * Set multiple properties at once using an Object. D3 iterates over all enumerable properties and either sets or computes the attribute's value based on the corresponding entry in the Object. + * + * @param obj A key-value mapping corresponding to attributes and values. If the value is a simple string or number, it is taken as a constant. Otherwise, it is a function that derives the attribute value. + */ + attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Selection; + + /** + * Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match. + * + * @param name The class list to query. + */ + classed(name: string): boolean; + + /** + * Adds (or removes) the given class list. + * + * @param name The class list to toggle. Spaces separate class names: "foo bar" is a list of two classes. + * @param value If true, add the classes. If false, remove them. + */ + classed(name: string, value: boolean): Selection; + + /** + * Determine if the given class list should be toggled for each node in the selection. + * + * @param name The class list. Spaces separate multiple class names. + * @param value The function to run for each node. Should return true to add the class to the node, or false to remove it. + */ + classed(name: string, value: (datum: Datum, index: number) => boolean): Selection; + + /** + * Set or derive classes for multiple class lists at once. + * + * @param obj An Object mapping class lists to values that are either plain booleans or functions that return booleans. + */ + classed(obj: { [key: string]: boolean | ((datum: Datum, index: number) => boolean) }): Selection; + + /** + * Retrieve the computed style value for the first node in the selection. + * @param name The CSS property name to query + */ + style(name: string): string; + + /** + * Set a style property for all nodes in the selection. + * @param name the CSS property name + * @param value the property value + * @param priority if specified, either null or the string "important" (no exclamation mark) + */ + style(name: string, value: Primitive, priority?: string): Selection; + + /** + * Derive a property value for each node in the selection. + * @param name the CSS property name + * @param value the function to derive the value + * @param priority if specified, either null or the string "important" (no exclamation mark) + */ + style(name: string, value: (datum: Datum, index: number) => Primitive, priority?: string): Selection; + + /** + * Set a large number of CSS properties from an object. + * + * @param obj an Object whose keys correspond to CSS property names and values are either constants or functions that derive property values + * @param priority if specified, either null or the string "important" (no exclamation mark) + */ + style(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }, priority?: string): Selection; + + /** + * Retrieve an arbitrary node property such as the 'checked' property of checkboxes, or the 'value' of text boxes. + * + * @param name the node's property to retrieve + */ + property(name: string): any; + + /** + * For each node, set the property value. Internally, this sets the node property directly (e.g., node[name] = value), so take care not to mutate special properties like __proto__. + * + * @param name the property name + * @param value the property value + */ + property(name: string, value: any): Selection; + + /** + * For each node, derive the property value. Internally, this sets the node property directly (e.g., node[name] = value), so take care not to mutate special properties like __proto__. + * + * @param name the property name + * @param value the function used to derive the property's value + */ + property(name: string, value: (datum: Datum, index: number) => any): Selection; + + /** + * Set multiple node properties. Caveats apply: take care not to mutate special properties like __proto__. + * + * @param obj an Object whose keys correspond to node properties and values are either constants or functions that will compute a value. + */ + property(obj: { [key: string]: any | ((datum: Datum, index: number) => any) }): Selection; + + /** + * Retrieve the textContent of the first node in the selection. + */ + text(): string; + + /** + * Set the textContent of each node in the selection. + * @param value the text to use for all nodes + */ + text(value: Primitive): Selection; + + /** + * Compute the textContent of each node in the selection. + * @param value the function which will compute the text + */ + text(value: (datum: Datum, index: number) => Primitive): Selection; + + /** + * Retrieve the HTML content of the first node in the selection. Uses 'innerHTML' internally and will not work with SVG or other elements without a polyfill. + */ + html(): string; + + /** + * Set the HTML content of every node in the selection. Uses 'innerHTML' internally and thus will not work with SVG or other elements without a polyfill. + * @param value the HTML content to use. + */ + html(value: string): Selection; + + /** + * Compute the HTML content for each node in the selection. Uses 'innerHTML' internally and thus will not work with SVG or other elements without a polyfill. + * @param value the function to compute HTML content + */ + html(value: (datum: Datum, index: number) => string): Selection; + + /** + * Appends a new child to each node in the selection. This child will inherit the parent's data (if available). Returns a fresh selection consisting of the newly-appended children. + * + * @param name the element name to append. May be prefixed (see d3.ns.prefix). + */ + append(name: string): Selection; + + /** + * Appends a new child to each node in the selection by computing a new node. This child will inherit the parent's data (if available). Returns a fresh selection consisting of the newly-appended children. + * + * @param name the function to compute a new element + */ + append(name: (datum: Datum, index: number) => EventTarget): Selection; + + /** + * Inserts a new child to each node in the selection. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the element name to append. May be prefixed (see d3.ns.prefix). + * @param before the selector to determine position (e.g., ":first-child") + */ + insert(name: string, before: string): Selection; + + /** + * Inserts a new child to each node in the selection. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the element name to append. May be prefixed (see d3.ns.prefix). + * @param before a function to determine the node to use as the next sibling + */ + insert(name: string, before: (datum: Datum, index: number) => EventTarget): Selection; + + /** + * Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the function to compute a new child + * @param before the selector to determine position (e.g., ":first-child") + */ + insert(name: (datum: Datum, index: number) => EventTarget, before: string): Selection; + + /** + * Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children. + * @param name the function to compute a new child + * @param before a function to determine the node to use as the next sibling + */ + insert(name: (datum: Datum, index: number) => EventTarget, before: (datum: Datum, index: number) => EventTarget): Selection; + + /** + * Removes the elements from the DOM. They are in a detached state and may be re-added (though there is currently no dedicated API for doing so). + */ + remove(): Selection; + + /** + * Retrieves the data bound to the first group in this selection. + */ + data(): Datum[]; + + /** + * Binds data to this selection. + * @param data the array of data to bind to this selection + * @param key the optional function to determine the unique key for each piece of data. When unspecified, uses the index of the element. + */ + data(data: NewDatum[], key?: (datum: NewDatum, index: number) => string): selection.Update; + + /** + * Derives data to bind to this selection. + * @param data the function to derive data. Must return an array. + * @param key the optional function to determine the unique key for each data item. When unspecified, uses the index of the element. + */ + data(data: (datum: Datum, index: number) => NewDatum[], key?: (datum: NewDatum, index: number) => string): selection.Update; + + /** + * Filters the selection, returning only those nodes that match the given CSS selector. + * @param selector the CSS selector + */ + filter(selector: string): Selection; + + /** + * Filters the selection, returning only those nodes for which the given function returned true. + * @param selector the filter function + */ + filter(selector: (datum: Datum, index: number) => boolean): Selection; + + /** + * Return the data item bound to the first element in the selection. + */ + datum(): Datum; + + /** + * Derive the data item for each node in the selection. Useful for situations such as the HTML5 'dataset' attribute. + * @param value the function to compute data for each node + */ + datum(value: (datum: Datum, index: number) => NewDatum): Selection; + + /** + * Set the data item for each node in the selection. + * @param value the constant element to use for each node + */ + datum(value: NewDatum): Selection; + + /** + * Reorders nodes in the selection based on the given comparator. Nodes are re-inserted into the document once sorted. + * @param comparator the comparison function, which defaults to d3.ascending + */ + sort(comparator?: (a: Datum, b: Datum) => number): Selection; + + /** + * Reorders nodes in the document to match the selection order. More efficient than calling sort() if the selection is already ordered. + */ + order(): Selection; + + /** + * Returns the listener (if any) for the given event. + * @param type the type of event to load the listener for. May have a namespace (e.g., ".foo") at the end. + */ + on(type: string): (datum: Datum, index: number) => any; + + /** + * Adds a listener for the specified event. If one was already registered, it is removed before the new listener is added. The return value of the listener function is ignored. + * @param type the of event to listen to. May have a namespace (e.g., ".foo") at the end. + * @param listener an event listener function, or null to unregister + * @param capture sets the DOM useCapture flag + */ + on(type: string, listener: (datum: Datum, index: number) => any, capture?: boolean): Selection; + + /** + * Begins a new transition. Interrupts any active transitions of the same name. + * @param name the transition name (defaults to "") + */ + transition(name?: string): Transition; + + /** + * Interrupts the active transition of the provided name. Does not cancel scheduled transitions. + * @param name the transition name (defaults to "") + */ + interrupt(name?: string): Selection; + + /** + * Creates a subselection by finding the first descendent matching the selector string. Bound data is inherited. + * @param selector the CSS selector to match against + */ + select(selector: string): Selection; + + /** + * Creates a subselection by using a function to find descendent elements. Bound data is inherited. + * @param selector the function to find matching descendants + */ + select(selector: (datum: Datum, index: number) => EventTarget): Selection; + + /** + * Creates a subselection by finding all descendents that match the given selector. Bound data is not inherited. + * @param selector the CSS selector to match against + */ + selectAll(selector: string): Selection; + + /** + * Creates a subselection by finding all descendants that match the given selector. Bound data is not inherited. + * + * Use this overload when data-binding a subselection (that is, sel.selectAll('.foo').data(d => ...)). The type will carry over. + */ + selectAll(selector: string): Selection; + + /** + * Creates a subselection by using a function to find descendent elements. Bound data is not inherited. + * @param selector the function to find matching descendents + */ + selectAll(selector: (datum: Datum, index: number) => Array | NodeList): Selection; + + /** + * Creates a subselection by using a function to find descendent elements. Bound data is not inherited. + * + * Use this overload when data-binding a subselection (that is, sel.selectAll('.foo').data(d => ...)). The type will carry over. + * @param selector the function to find matching descendents + */ + selectAll(selector: (datum: Datum, index: number) => Array | NodeList): Selection; + + /** + * Invoke the given function for each element in the selection. The return value of the function is ignored. + * @param func the function to invoke + */ + each(func: (datum: Datum, index: number) => any): Selection; + + /** + * Call a function on the selection. sel.call(foo) is equivalent to foo(sel). + * @param func the function to call on the selection + * @param args any optional args + */ + call(func: (sel: Selection, ...args: any[]) => any, ...args: any[]): Selection; + + /** + * Returns true if the current selection is empty. + */ + empty(): boolean; + + /** + * Returns the first non-null element in the selection, or null otherwise. + */ + node(): EventTarget; + + /** + * Returns the total number of elements in the selection. + */ + size(): number; + } + + export function transition(): Transition; + module transition { + export var prototype: Transition; + } + + interface Transition { + delay(): number; + delay(delay: number): Transition; + delay(delay: (datum: Datum, index: number) => number): Transition; + + duration(): number; + duration(duration: number): Transition; + duration(duration: (datum: Datum, index: number) => number): Transition; + + ease(): (t: number) => number; + ease(value: string, ...args: any[]): Transition; + ease(value: (t: number) => number): Transition; + + attr(name: string, value: Primitive): Transition; + attr(name: string, value: (datum: Datum, index: number) => Primitive): Transition; + attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Transition; + + attrTween(name: string, tween: (datum: Datum, index: number, attr: string) => Primitive): Transition; + + style(name: string, value: Primitive, priority?: string): Transition; + style(name: string, value: (datum: Datum, index: number) => Primitive, priority?: string): Transition; + style(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }, priority?: string): Transition; + + styleTween(name: string, tween: (datum: Datum, index: number, attr: string) => Primitive, priority?: string): Transition; + + text(value: Primitive): Transition; + text(value: (datum: Datum, index: number) => Primitive): Transition; + + tween(name: string, factory: () => (t: number) => any): Transition; + + remove(): Transition; + + select(selector: string): Transition; + select(selector: (d: Datum, i: number) => EventTarget): Transition; + + selectAll(selector: string): Transition; + selectAll(selector: (d: Datum, i: number) => EventTarget[]): Transition; + + filter(selector: string): Transition; + filter(selector: (d: Datum, i: number) => boolean): Transition; + + each(type: string, listener: (d: Datum, i: number) => any): Transition; + each(listener: (d: Datum, i: number) => any): Transition; + + call(func: (transition: Transition, ...args: any[]) => any, ...args: any[]): Transition; + + empty(): boolean; + node(): EventTarget; + size(): number; + } + + export function ease(type: 'linear'): (t: number) => number; + export function ease(type: 'linear-in'): (t: number) => number; + export function ease(type: 'linear-out'): (t: number) => number; + export function ease(type: 'linear-in-out'): (t: number) => number; + export function ease(type: 'linear-out-in'): (t: number) => number; + + export function ease(type: 'poly', k: number): (t: number) => number; + export function ease(type: 'poly-in', k: number): (t: number) => number; + export function ease(type: 'poly-out', k: number): (t: number) => number; + export function ease(type: 'poly-in-out', k: number): (t: number) => number; + export function ease(type: 'poly-out-in', k: number): (t: number) => number; + + export function ease(type: 'quad'): (t: number) => number; + export function ease(type: 'quad-in'): (t: number) => number; + export function ease(type: 'quad-out'): (t: number) => number; + export function ease(type: 'quad-in-out'): (t: number) => number; + export function ease(type: 'quad-out-in'): (t: number) => number; + + export function ease(type: 'cubic'): (t: number) => number; + export function ease(type: 'cubic-in'): (t: number) => number; + export function ease(type: 'cubic-out'): (t: number) => number; + export function ease(type: 'cubic-in-out'): (t: number) => number; + export function ease(type: 'cubic-out-in'): (t: number) => number; + + export function ease(type: 'sin'): (t: number) => number; + export function ease(type: 'sin-in'): (t: number) => number; + export function ease(type: 'sin-out'): (t: number) => number; + export function ease(type: 'sin-in-out'): (t: number) => number; + export function ease(type: 'sin-out-in'): (t: number) => number; + + export function ease(type: 'circle'): (t: number) => number; + export function ease(type: 'circle-in'): (t: number) => number; + export function ease(type: 'circle-out'): (t: number) => number; + export function ease(type: 'circle-in-out'): (t: number) => number; + export function ease(type: 'circle-out-in'): (t: number) => number; + + export function ease(type: 'elastic', a?: number, b?: number): (t: number) => number; + export function ease(type: 'elastic-in', a?: number, b?: number): (t: number) => number; + export function ease(type: 'elastic-out', a?: number, b?: number): (t: number) => number; + export function ease(type: 'elastic-in-out', a?: number, b?: number): (t: number) => number; + export function ease(type: 'elastic-out-in', a?: number, b?: number): (t: number) => number; + + export function ease(type: 'back', s: number): (t: number) => number; + export function ease(type: 'back-in', s: number): (t: number) => number; + export function ease(type: 'back-out', s: number): (t: number) => number; + export function ease(type: 'back-in-out', s: number): (t: number) => number; + export function ease(type: 'back-out-in', s: number): (t: number) => number; + + export function ease(type: 'bounce'): (t: number) => number; + export function ease(type: 'bounce-in'): (t: number) => number; + export function ease(type: 'bounce-out'): (t: number) => number; + export function ease(type: 'bounce-in-out'): (t: number) => number; + export function ease(type: 'bounce-out-in'): (t: number) => number; + + export function ease(type: string, ...args: any[]): (t: number) => number; + + export function timer(func: () => any, delay?: number, time?: number): void; + + module timer { + export function flush(): void; + } + + /** + * The current event's value. Use this variable in a handler registered with selection.on. + */ + export var event: Event; + + /** + * Returns the x and y coordinates of the mouse relative to the provided container element, using d3.event for the mouse's position on the page. + * @param container the container element (e.g. an SVG element) + */ + export function mouse(container: EventTarget): [number, number]; + + /** + * Given a container element and a touch identifier, determine the x and y coordinates of the touch. + * @param container the container element (e.g., an SVG element) + * @param identifier the given touch identifier + */ + export function touch(container: EventTarget, identifer: number): [number, number]; + + /** + * Given a container element, a list of touches, and a touch identifier, determine the x and y coordinates of the touch. + * @param container the container element (e.g., an SVG element) + * @param identifier the given touch identifier + */ + export function touch(container: EventTarget, touches: TouchList, identifer: number): [number, number]; + + /** + * Given a container element and an optional list of touches, return the position of every touch relative to the container. + * @param container the container element + * @param touches an optional list of touches (defaults to d3.event.touches) + */ + export function touches(container: EventTarget, touches?: TouchList): Array<[number, number]>; + + // NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. + /** + * Compares two primitive values for sorting (in ascending order). + */ + export function ascending(a: Primitive, b: Primitive): number; + + /** + * Compares two primitive values for sorting (in ascending order). + */ + export function descending(a: Primitive, b: Primitive): number; + + /** + * Return the minimum value in the array using natural order. + */ + export function min(array: number[]): number; + + /** + * Return the minimum value in the array using natural order. + */ + export function min(array: string[]): string; + + /** + * Return the minimum value in the array using natural order. + */ + export function min(array: T[]): T; + + /** + * Return the minimum value in the array using natural order. + */ + export function min(array: T[], accessor: (datum: T, index: number) => number): number; + + /** + * Return the minimum value in the array using natural order. + */ + export function min(array: T[], accessor: (datum: T, index: number) => string): string; + + /** + * Return the minimum value in the array using natural order. + */ + export function min(array: T[], accessor: (datum: T, index: number) => U): U; + + /** + * Return the maximum value in the array of numbers using natural order. + */ + export function max(array: number[]): number; + + /** + * Return the maximum value in the array of strings using natural order. + */ + export function max(array: string[]): string; + + /** + * Return the maximum value in the array of numbers using natural order. + */ + export function max(array: T[]): T; + + /** + * Return the maximum value in the array using natural order and a projection function to map values to numbers. + */ + export function max(array: T[], accessor: (datum: T, index: number) => number): number; + + /** + * Return the maximum value in the array using natural order and a projection function to map values to strings. + */ + export function max(array: T[], accessor: (datum: T, index: number) => string): string; + + /** + * Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values. + */ + export function max(array: T[], accessor: (datum: T, index: number) => U): U; + + /** + * Return the min and max simultaneously. + */ + export function extent(array: number[]): [number, number]; + + /** + * Return the min and max simultaneously. + */ + export function extent(array: string[]): [string, string]; + + /** + * Return the min and max simultaneously. + */ + export function extent(array: T[]): [T, T]; + + /** + * Return the min and max simultaneously. + */ + export function extent(array: Array): [T | Primitive, T | Primitive]; + + /** + * Return the min and max simultaneously. + */ + export function extent(array: T[], accessor: (datum: T, index: number) => number): [number, number]; + + /** + * Return the min and max simultaneously. + */ + export function extent(array: T[], accessor: (datum: T, index: number) => string): [string, string]; + + /** + * Return the min and max simultaneously. + */ + export function extent(array: U[], accessor: (datum: T, index: number) => U): [U | Primitive, U | Primitive]; + + /** + * Compute the sum of an array of numbers. + */ + export function sum(array: number[]): number; + + /** + * Compute the sum of an array, using the given accessor to convert values to numbers. + */ + export function sum(array: T[], accessor: (datum: T, index: number) => number): number; + + export function mean(array: number[]): number; + export function mean(array: T[], accessor: (datum: T, index: number) => number): number; + + export function quantile(array: number[], p: number): number; + + export function variance(array: number[]): number; + export function variance(array: T[], accessor: (datum: T, index: number) => number): number; + + export function deviation(array: number[]): number; + export function deviation(array: T[], accessor: (datum: T, index: number) => number): number; + + export function bisectLeft(array: number[], x: number, lo?: number, hi?: number): number; + export function bisectLeft(array: string[], x: string, lo?: number, hi?: number): number; + + export var bisect: typeof bisectRight; + + export function bisectRight(array: T[], x: T, lo?: number, hi?: number): number; + + export function bisector(accessor: (x: T) => U): { + left: (array: T[], x: T, lo?: number, hi?: number) => number; + right: (array: T[], x: T, lo?: number, hi?: number) => number; + } + + export function bisector(comparator: (a: T, b: U) => number): { + left: (array: T[], x: U, lo?: number, hi?: number) => number; + right: (array: T[], x: U, lo?: number, hi?: number) => number; + } + + export function shuffle(array: T[], lo?: number, hi?: number): T[]; + + /** + * Returns the enumerable property names of the specified object. + * @param object a JavaScript object + */ + export function keys(object: Object): string[]; + + /** + * Returns an array containing the property values of the specified object. + */ + export function values(object: { [key: string]: T }): T[]; + /** + * Returns an array containing the property values of the specified object. + */ + export function values(object: { [key: number]: T }): T[]; + /** + * Returns an array containing the property values of the specified object. + */ + export function values(object: Object): any[]; + + /** + * Returns an array of key-value pairs containing the property values of the specified object. + */ + export function entries(object: { [key: string]: T }): { key: string; value: T }[]; + + /** + * Returns an array of key-value pairs containing the property values of the specified object. + */ + export function entries(object: { [key: number]: T }): { key: string; value: T }[]; + + /** + * Returns an array of key-value pairs containing the property values of the specified object. + */ + export function entries(object: Object): { key: string; value: any }[]; + + /** + * A shim for ES6 maps. The implementation uses a JavaScript object internally, and thus keys are limited to strings. + */ + interface Map { + /** + * Does the map contain the given key? + */ + has(key: string): boolean; + + /** + * Retrieve the value for the given key. Returns undefined if there is no value stored. + */ + get(key: string): T; + + /** + * Set the value for the given key. Returns the new value. + */ + set(key: string, value: T): T; + + /** + * Remove the value for the given key. Returns true if there was a value and false otherwise. + */ + remove(key: string): boolean; + + /** + * Returns an array of all keys in arbitrary order. + */ + keys(): string[]; + + /** + * Returns an array of all values in arbitrary order. + */ + values(): T[]; + + /** + * Returns an array of key-value objects in arbitrary order. + */ + entries(): { key: string; value: T }[]; + + /** + * Calls the function for each key and value pair in the map. The 'this' context is the map itself. + */ + forEach(func: (key: string, value: T) => any): void; + + /** + * Is this map empty? + */ + empty(): boolean; + + /** + * Returns the number of elements stored in the map. + */ + size(): number; + } + + /** + * Constructs an initially empty map. + */ + export function map(): Map; + + /** + * Construct a new map by copying keys and values from the given one. + */ + export function map(object: Map): Map; + + /** + * Construct a new map by copying enumerable properties and values from the given object. + */ + export function map(object: { [key: string]: T }): Map; + + /** + * Construct a new map by copying enumerable properties and values from the given object. + */ + export function map(object: { [key: number]: T }): Map; + + /** + * Construct a new map by copying elements from the array. The key function is used to identify each object. + */ + export function map(array: T[], key: (datum: T, index: number) => string): Map; + + /** + * Construct a new map by copying enumerable properties and values from the given object. + */ + export function map(object: Object): Map; + + /** + * A shim for ES6 sets. Is only able to store strings. + */ + interface Set { + /** + * Is the given string stored in this set? + */ + has(value: string): boolean; + + /** + * Add the string to this set. Returns the value. + */ + add(value: string): string; + + /** + * Remove the given value from the set. Returns true if it was stored, and false otherwise. + */ + remove(value: string): boolean; + + /** + * Returns an array of the strings stored in this set. + */ + values(): string[]; + + /** + * Calls a given function for each value in the set. The return value of the function is ignored. The this context of the function is the set itself. + */ + forEach(func: (value: string) => any): void; + + /** + * Is this set empty? + */ + empty(): boolean; + + /** + * Returns the number of values stored in this set. + */ + size(): number; + } + + /** + * Creates an initially-empty set. + */ + export function set(): Set; + + /** + * Initializes a set from the given array of strings. + */ + export function set(array: string[]): Set; + + /** + * Merges the specified arrays into a single array. + */ + export function merge(arrays: T[][]): T[]; + + /** + * Generates a 0-based numeric sequence. The output range does not include 'stop'. + */ + export function range(stop: number): number[]; + + /** + * Generates a numeric sequence starting from the given start and stop values. 'step' defaults to 1. The output range does not include 'stop'. + */ + export function range(start: number, stop: number, step?: number): number[]; + + /** + * Given the specified array, return an array corresponding to the list of indices in 'keys'. + */ + export function permute(array: { [key: number]: T }, keys: number[]): T[]; + + /** + * Given the specified object, return an array corresponding to the list of property names in 'keys'. + */ + export function permute(object: { [key: string]: T }, keys: string[]): T[]; + + // TODO construct n-tuples from n input arrays + export function zip(...arrays: T[][]): T[][]; + + export function transpose(matrix: T[][]): T[][]; + + /** + * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1. + * Returns the empty array if the input array has fewer than two elements. + */ + export function pairs(array: T[]): Array<[T, T]>; + + interface Nest { + key(func: (datum: T) => string): Nest; + sortKeys(comparator: (a: string, b: string) => number): Nest; + sortValues(comparator: (a: T, b: T) => number): Nest; + rollup(func: (values: T[]) => U): Nest; + map(array: T[]): { [key: string]: any }; + map(array: T[], mapType: typeof d3.map): Map; + entries(array: T[]): { key: string; values: any }[]; + } + + export function nest(): Nest; + + export module random { + export function normal(mean?: number, deviation?: number): () => number; + export function logNormal(mean?: number, deviation?: number): () => number; + export function bates(count: number): () => number; + export function irwinHall(count: number): () => number; + } + + interface Transform { + rotate: number; + translate: [number, number]; + skew: number; + scale: [number, number]; + toString(): string; + } + + export function transform(transform: string): Transform; + + export function format(specifier: string): (n: number) => string; + + interface FormatPrefix { + symbol: string; + scale(n: number): number; + } + + export function formatPrefix(value: number, precision?: number): FormatPrefix; + + export function round(x: number, n?: number): number; + + export function requote(string: string): string; + + export var rgb: { + new (r: number, g: number, b: number): Rgb; + new (color: string): Rgb; + + (r: number, g: number, b: number): Rgb; + (color: string): Rgb; + }; + + interface Rgb extends Color { + r: number; + g: number; + b: number; + + brighter(k?: number): Rgb; + darker(k?: number): Rgb; + + hsl(): Hsl; + + toString(): string; + } + + export var hsl: { + new (h: number, s: number, l: number): Hsl; + new (color: string): Hsl; + + (h: number, s: number, l: number): Hsl; + (color: string): Hsl; + }; + + interface Hsl extends Color { + h: number; + s: number; + l: number; + + brighter(k?: number): Hsl; + darker(k?: number): Hsl; + + rgb(): Rgb; + + toString(): string; + } + + export var hcl: { + new (h: number, c: number, l: number): Hcl; + new (color: string): Hcl; + + (h: number, c: number, l: number): Hcl; + (color: string): Hcl; + }; + + interface Hcl extends Color { + h: number; + c: number; + l: number; + + brighter(k?: number): Hcl; + darker(k?: number): Hcl; + } + + export var lab: { + new (l: number, a: number, b: number): Lab; + new (color: string): Lab; + + (l: number, a: number, b: number): Lab; + (color: string): Lab; + } + + interface Lab extends Color { + l: number; + a: number; + b: number; + + brighter(k?: number): Lab; + darker(k?: number): Lab; + + rgb(): Rgb; + toString(): string; + } + + export var color: { + (): Color; + new (): Color; + }; + + interface Color { + rgb(): Rgb; + } + + export module ns { + interface Qualified { + space: string; + local: string; + } + + export var prefix: { [key: string]: string }; + export function qualify(name: string): Qualified | string; + } + + export function functor(value: T): T; + export function functor(value: T): () => T; + + export function rebind(target: {}, source: {}, ...names: string[]): any; + + export function dispatch(...names: string[]): Dispatch; + + interface Dispatch { + on(type: string): (...args: any[]) => void; + on(type: string, listener: (...args: any[]) => any): Dispatch; + [event: string]: (...args: any[]) => void; + } + + export module scale { + export function identity(): Identity; + + interface Identity { + (n: number): number; + invert(n: number): number; + + domain(): number[]; + domain(numbers: number[]): Identity; + + range(): number[]; + range(numbers: number[]): Identity; + + ticks(count?: number): number[]; + + tickFormat(count?: number, format?: string): (n: number) => string; + + copy(): Identity; + } + + export function linear(): Linear; + export function linear(): Linear; + export function linear(): Linear; + + interface Linear { + (x: number): Output; + invert(y: number): number; + + domain(): number[]; + domain(numbers: number[]): Linear; + + range(): Range[]; + range(values: Range[]): Linear; + + rangeRound(values: number[]): Linear; + + interpolate(): (a: Range, b: Range) => (t: number) => Output; + interpolate(factory: (a: Range, b: Range) => (t: number) => Output): Linear; + + clamp(): boolean; + clamp(clamp: boolean): Linear; + + ticks(count?: number): number[]; + + tickFormat(count?: number, format?: string): (n: number) => string; + + copy(): Linear; + } + + export function sqrt(): Pow; + export function sqrt(): Pow; + export function pow(): Pow; + export function pow(): Pow; + + interface Pow { + (x: number): Output; + + invert(y: number): number; + + domain(): number[]; + domain(numbers: number[]): Pow; + + range(): Range[]; + range(values: Range[]): Pow; + + rangeRound(values: number[]): Pow; + + exponent(): number; + exponent(k: number): Pow; + + interpolate(): (a: Range, b: Range) => (t: number) => Output; + interpolate(factory: (a: Range, b: Range) => (t: number) => Output): Pow; + + clamp(): boolean; + clamp(clamp: boolean): Pow; + + nice(m?: number): Pow; + + ticks(count?: number): number[]; + + tickFormat(count?: number, format?: string): (n: number) => string; + + copy(): Pow; + } + + export function log(): Log; + export function log(): Log; + + interface Log { + (x: number): Output; + + invert(y: number): number; + + domain(): number[]; + domain(numbers: number[]): Log; + + range(): Range[]; + range(values: Range[]): Log; + + rangeRound(values: number[]): Log; + + base(): number; + base(base: number): Log; + + interpolate(): (a: Range, b: Range) => (t: number) => Output; + interpolate(factory: (a: Range, b: Range) => (t: number) => Output): Log; + + clamp(): boolean; + clamp(clamp: boolean): Log; + + nice(): Log; + + ticks(): number[]; + + tickFormat(count?: number, format?: string): (t: number) => string; + + copy(): Log; + } + + export function quantize(): Quantize; + + interface Quantize { + (x: number): T; + + invertExtent(y: T): [number, number]; + + domain(): number[]; + domain(numbers: number[]): Quantize; + + range(): T[]; + range(values: T[]): Quantize; + + copy(): Quantize; + } + + export function quantile(): Quantile; + + interface Quantile { + (x: number): T; + + invertExtent(y: T): [number, number]; + + domain(): number[]; + domain(numbers: number[]): Quantile; + + range(): T[]; + range(values: T[]): Quantile; + + quantiles(): number[]; + + copy(): Quantile; + } + + export function threshold(): Threshold; + export function threshold(): Threshold; + + interface Threshold { + (x: number): Range; + + invertExtent(y: Range): [Domain, Domain]; + + domain(): Domain[]; + domain(domain: Domain[]): Threshold; + + range(): Range[]; + range(values: Range[]): Threshold; + + copy(): Threshold; + } + + export function ordinal(): Ordinal; + export function category10(): Ordinal; + export function category20(): Ordinal; + export function category20b(): Ordinal; + export function category20c(): Ordinal; + + interface Ordinal { + (x: Primitive): T; + + domain(): string[]; + domain(values: Primitive[]): Ordinal; + + range(): T[]; + range(values: T[]): Ordinal; + + rangePoints(interval: [number, number], padding?: number): Ordinal; + rangeRoundPoints(interval: [number, number], padding?: number): Ordinal; + + rangeBands(interval: [number, number], padding?: number, outerPadding?: number): Ordinal; + rangeRoundBands(interval: [number, number], padding?: number, outerPadding?: number): Ordinal; + + rangeBand(): number; + rangeExtent(): [number, number]; + + copy(): Ordinal; + } + } + + export function interpolate(a: number, b: number): (t: number) => number; + export function interpolate(a: string, b: string): (t: number) => string; + export function interpolate(a: string | Color, b: Color): (t: number) => string; + export function interpolate(a: Array, b: Color[]): (t: number) => string; + export function interpolate(a: Range[], b: Output[]): (t: number) => Output[]; + export function interpolate(a: Range[], b: Range[]): (t: number) => Output[]; + export function interpolate(a: { [key: string]: string | Color }, b: { [key: string]: Color }): (t: number) => { [key: string]: string }; + export function interpolate(a: { [key: string]: Range }, b: { [key: string]: Output }): (t: number) => { [key: string]: Output }; + export function interpolate(a: { [key: string]: Range }, b: { [key: string]: Range }): (t: number) => { [key: string]: Output }; + + export function interpolateNumber(a: number, b: number): (t: number) => number; + + export function interpolateRound(a: number, b: number): (t: number) => number; + + export function interpolateString(a: string, b: string): (t: number) => string; + + export function interpolateRgb(a: string | Color, b: string | Color): (t: number) => string; + + export function interpolateHsl(a: string | Color, b: string | Color): (t: number) => string; + + export function interpolateLab(a: string | Color, b: string | Color): (t: number) => string; + + export function interpolateHcl(a: string | Color, b: string | Color): (t: number) => string; + + export function interpolateArray(a: Array, b: Color[]): (t: number) => string[]; + export function interpolateArray(a: Range[], b: Range[]): (t: number) => Output[]; + export function interpolateArray(a: Range[], b: Output[]): (t: number) => Output[]; + + export function interpolateObject(a: { [key: string]: string | Color }, b: { [key: string]: Color }): (t: number) => { [key: string]: string }; + export function interpolateObject(a: { [key: string]: Range }, b: { [key: string]: Output }): (t: number) => { [key: string]: Output }; + export function interpolateObject(a: { [key: string]: Range }, b: { [key: string]: Range }): (t: number) => { [key: string]: Output }; + + export function interpolateTransform(a: string | Transform, b: string | Transform): (t: number) => string; + + export function interpolateZoom(a: [number, number, number], b: [number, number, number]): { + (t: number): [number, number, number]; + duration: number; + }; + + export var interpolators: Array<(a: any, b: any) => (t: number) => any>; + + export module time { + export var second: Interval; + export var minute: Interval; + export var hour: Interval; + export var day: Interval; + export var week: Interval; + export var sunday: Interval; + export var monday: Interval; + export var tuesday: Interval; + export var wednesday: Interval; + export var thursday: Interval; + export var friday: Interval; + export var saturday: Interval; + export var month: Interval; + export var year: Interval; + + interface Interval { + (d: Date): Date; + + floor(d: Date): Date; + + round(d: Date): Date; + + ceil(d: Date): Date; + + range(start: Date, stop: Date, step?: number): Date[]; + + offset(date: Date, step: Date): Date; + + utc: { + (d: Date): Date; + + floor(d: Date): Date; + + round(d: Date): Date; + + ceil(d: Date): Date; + + range(start: Date, stop: Date, step?: number): Date[]; + + offset(date: Date, step: Date): Date; + } + } + + export function seconds(start: Date, stop: Date, step?: number): Date[]; + export function minutes(start: Date, stop: Date, step?: number): Date[]; + export function hours(start: Date, stop: Date, step?: number): Date[]; + export function days(start: Date, stop: Date, step?: number): Date[]; + export function weeks(start: Date, stop: Date, step?: number): Date[]; + export function sundays(start: Date, stop: Date, step?: number): Date[]; + export function mondays(start: Date, stop: Date, step?: number): Date[]; + export function tuesdays(start: Date, stop: Date, step?: number): Date[]; + export function wednesdays(start: Date, stop: Date, step?: number): Date[]; + export function thursdays(start: Date, stop: Date, step?: number): Date[]; + export function fridays(start: Date, stop: Date, step?: number): Date[]; + export function saturdays(start: Date, stop: Date, step?: number): Date[]; + export function months(start: Date, stop: Date, step?: number): Date[]; + export function years(start: Date, stop: Date, step?: number): Date[]; + + export function dayOfYear(d: Date): number; + export function weekOfYear(d: Date): number; + export function sundayOfYear(d: Date): number; + export function mondayOfYear(d: Date): number; + export function tuesdayOfYear(d: Date): number; + export function wednesdayOfYear(d: Date): number; + export function fridayOfYear(d: Date): number; + export function saturdayOfYear(d: Date): number; + + export function format(specifier: string): Format; + + export module format { + export function multi(formats: Array<[string, (d: Date) => boolean]>): Format; + export function utc(specifier: string): Format; + export var iso: Format; + } + + interface Format { + (d: Date): string; + parse(input: string): Date; + } + + export function scale(): Scale; + export function scale(): Scale; + export function scale(): Scale; + + export module scale { + export function utc(): Scale; + export function utc(): Scale; + export function utc(): Scale; + } + + + interface Scale { + (x: Date): Output; + + invert(y: number): Date; + + domain(): Date[]; + domain(dates: number[]): Scale; + domain(dates: Date[]): Scale; + + nice(): Scale; + nice(interval: Interval, step?: number): Scale; + + range(): Range[]; + range(values: Range[]): Scale; + + rangeRound(values: number[]): Scale; + + interpolate(): (a: Range, b: Range) => (t: number) => Output; + interpolate(factory: (a: Range, b: Range) => (t: number) => Output): Scale; + + clamp(): boolean; + clamp(clamp: boolean): Scale; + + ticks(): Date[]; + ticks(interval: Interval, step?: number): Date[]; + ticks(count: number): Date[]; + + tickFormat(count: number): (d: Date) => string; + + copy(): Scale; + } + } + + export module behavior { + export function drag(): Drag; + + interface Drag { + (selection: Selection): void; + + on(type: string): (d: Datum, i: number) => any; + on(type: string, listener: (d: Datum, i: number) => any): Drag; + + origin(): (d: Datum, i: number) => { x: number; y: number }; + origin(accessor: (d: Datum, i: number) => { x: number; y: number }): Drag; + } + + export function zoom(): Zoom; + + module zoom { + interface Scale { + domain(): number[]; + domain(values: number[]): Scale; + + invert(y: number): number; + + range(values: number[]): Scale; + range(): number[]; + } + } + + interface Zoom { + (selection: Selection): void; + + translate(): [number, number]; + translate(translate: [number, number]): Zoom; + + scale(): number; + scale(scale: number): Zoom; + + scaleExtent(): [number, number]; + scaleExtent(extent: [number, number]): Zoom; + + center(): [number, number]; + center(center: [number, number]): Zoom; + + size(): [number, number]; + size(size: [number, number]): Zoom; + + x(): zoom.Scale; + x(x: zoom.Scale): Zoom; + + y(): zoom.Scale; + y(y: zoom.Scale): Zoom; + + on(type: string): (d: Datum, i: number) => any; + on(type: string, listener: (d: Datum, i: number) => any): Zoom; + + event(selection: Selection): void; + event(transition: Transition): void; + } + } + + export module geo { + export function path(): Path; + + interface Path { + (feature: any, index?: number): string; + + area(feature: any): number; + + centroid(feature: any): [number, number]; + + bounds(feature: any): [[number, number], [number, number]]; + + projection(): Transform | ((coordinates: [number, number]) => [number, number]); + projection(stream: Transform): Path; + projection(projection: (coordinates: [number, number]) => [number, number]): Path; + + pointRadius(): number | ((datum: any, index: number) => number); + pointRadius(radius: number): Path; + pointRadius(radius: (datum: any, index: number) => number): Path; + + context(): CanvasRenderingContext2D; + context(context: CanvasRenderingContext2D): Path; + } + + export function graticule(): Graticule; + + interface Graticule { + (): any; + + lines(): any[]; + + outline(): any; + + extent(): [[number, number], [number, number]]; + extent(extent: [[number, number], [number, number]]): Graticule; + + majorExtent(): [[number, number], [number, number]]; + majorExtent(extent: [[number, number], [number, number]]): Graticule; + + minorExtent(): [[number, number], [number, number]]; + minorExtent(extent: [[number, number], [number, number]]): Graticule; + + step(): [number, number]; + step(step: [number, number]): Graticule; + + majorStep(): [number, number]; + majorStep(step: [number, number]): Graticule; + + minorStep(): [number, number]; + minorStep(step: [number, number]): Graticule; + + precision(): number; + precision(precision: number): Graticule; + } + + export function circle(): Circle; + + interface Circle { + (...args: any[]): any; + + origin(): [number, number] | ((...args: any[]) => [number, number]); + origin(origin: [number, number]): Circle; + origin(origin: (...args: any[]) => [number, number]): Circle; + + angle(): number; + angle(angle: number): Circle; + + precision(): number; + precision(precision: number): Circle; + } + + export function area(feature: any): number; + export function centroid(feature: any): [number, number]; + export function bounds(feature: any): [[number, number], [number, number]]; + export function distance(a: [number, number], b: [number, number]): number; + export function length(feature: any): number; + export function interpolate(a: [number, number], b: [number, number]): (t: number) => [number, number]; + + export function rotation(rotate: [number, number] | [number, number, number]): Rotation; + + interface Rotation { + (location: [number, number]): [number, number]; + invert(location: [number, number]): [number, number]; + } + + export function stream(object: any, listener: Listener): void; + + interface Listener { + point(x: number, y: number, z: number): void; + lineStart(): void; + lineEnd(): void; + polygonStart(): void; + polygonEnd(): void; + sphere(): void; + } + + export function transform(methods: TransformMethods): Transform; + + interface TransformMethods { + point?(x: number, y: number, z: number): void; + lineStart?(): void; + lineEnd?(): void; + polygonStart?(): void; + polygonEnd?(): void; + sphere?(): void; + } + + interface Transform { + stream(stream: Listener): Listener; + } + + export function clipExtent(): ClipExtent; + + interface ClipExtent extends Transform { + extent(): [[number, number], [number, number]]; + extent(extent: [[number, number], [number, number]]): ClipExtent; + } + + export function projection(raw: RawInvertibleProjection): InvertibleProjection; + export function projection(raw: RawProjection): Projection; + + export function projectionMutator(factory: (...args: any[]) => RawInvertibleProjection): (...args: any[]) => InvertibleProjection; + export function projectionMutator(factory: (...args: any[]) => RawProjection): (...args: any[]) => Projection; + + export function albers(): ConicProjection; + export function albersUsa(): ConicProjection; + export function azimuthalEqualArea(): InvertibleProjection; + module azimuthalEqualArea { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + export function azimuthalEquidistant(): InvertibleProjection; + module azimuthalEquidistant { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + export function conicConformal(): ConicProjection; + module conicConformal { + export function raw(phi0: number, phi1: number): RawInvertibleProjection; + } + + export function conicEqualArea(): ConicProjection; + module conicEqualArea { + export function raw(phi0: number, phi1: number): RawInvertibleProjection; + } + + export function conicEquidistant(): ConicProjection; + module conicEquidistant { + export function raw(phi0: number, phi1: number): RawInvertibleProjection; + } + + export function equirectangular(): InvertibleProjection; + module equirectangular { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + export function gnomonic(): InvertibleProjection; + module gnomonic { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + export function mercator(): InvertibleProjection; + module mercator { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + export function orthographic(): InvertibleProjection; + module orthographic { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + export function stereographic(): InvertibleProjection; + module stereographic { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + export function transverseMercator(): InvertibleProjection; + module transverseMercator { + export function raw(lambda: number, phi: number): [number, number]; + module raw { + export function invert(x: number, y: number): [number, number]; + } + } + + interface Projection { + (location: [number, number]): [number, number]; + + rotate(): [number, number, number]; + rotate(rotation: [number, number, number]): Projection; + + center(): [number, number]; + center(location: [number, number]): Projection; + + translate(): [number, number]; + translate(point: [number, number]): Projection; + + scale(): number; + scale(scale: number): Projection; + + clipAngle(): number; + clipAngle(angle: number): Projection; + + clipExtent(): [[number, number], [number, number]]; + clipExtent(extent: [[number, number], [number, number]]): Projection; + + precision(): number; + precision(precision: number): Projection; + + stream(listener: Listener): Listener; + } + + interface InvertibleProjection extends Projection { + invert(point: [number, number]): [number, number]; + } + + interface ConicProjection extends InvertibleProjection { + parallels(): [number, number]; + parallels(parallels: [number, number]): ConicProjection; + + rotate(): [number, number, number]; + rotate(rotation: [number, number, number]): ConicProjection; + + center(): [number, number]; + center(location: [number, number]): ConicProjection; + + translate(): [number, number]; + translate(point: [number, number]): ConicProjection; + + scale(): number; + scale(scale: number): ConicProjection; + + clipAngle(): number; + clipAngle(angle: number): ConicProjection; + + clipExtent(): [[number, number], [number, number]]; + clipExtent(extent: [[number, number], [number, number]]): ConicProjection; + + precision(): number; + precision(precision: number): ConicProjection; + } + + interface RawProjection { + (lambda: number, phi: number): [number, number]; + } + + interface RawInvertibleProjection extends RawProjection { + invert(x: number, y: number): [number, number]; + } + } + + module svg { + export function line(): Line<[number, number]>; + export function line(): Line; + + interface Line { + (data: T[]): string; + + x(): number | ((d: T, i: number) => number); + x(x: number): Line; + x(x: (d: T, i: number) => number): Line; + + y(): number | ((d: T, i: number) => number); + y(x: number): Line; + y(y: (d: T, i: number) => number): Line; + + interpolate(): string | ((points: Array<[number, number]>) => string); + interpolate(interpolate: "linear"): Line; + interpolate(interpolate: "linear-closed"): Line; + interpolate(interpolate: "step"): Line; + interpolate(interpolate: "step-before"): Line; + interpolate(interpolate: "step-after"): Line; + interpolate(interpolate: "basis"): Line; + interpolate(interpolate: "basis-open"): Line; + interpolate(interpolate: "basis-closed"): Line; + interpolate(interpolate: "bundle"): Line; + interpolate(interpolate: "cardinal"): Line; + interpolate(interpolate: "cardinal-open"): Line; + interpolate(interpolate: "cardinal-closed"): Line; + interpolate(interpolate: "monotone"): Line; + interpolate(interpolate: string): Line; + interpolate(interpolate: (points: Array<[number, number]>) => string): Line; + + tension(): number; + tension(tension: number): Line; + + defined(): (d: T, i: number) => boolean; + defined(defined: (d: T, i: number) => boolean): Line; + } + + module line { + export function radial(): Radial<[number, number]>; + export function radial(): Radial; + + interface Radial { + (data: T[]): string; + + radius(): number | ((d: T, i: number) => number); + radius(radius: number): Radial; + radius(radius: (d: T, i: number) => number): Radial; + + angle(): number | ((d: T, i: number) => number); + angle(angle: number): Radial; + angle(angle: (d: T, i: number) => number): Radial; + + interpolate(): string | ((points: Array<[number, number]>) => string); + interpolate(interpolate: "linear"): Radial; + interpolate(interpolate: "linear-closed"): Radial; + interpolate(interpolate: "step"): Radial; + interpolate(interpolate: "step-before"): Radial; + interpolate(interpolate: "step-after"): Radial; + interpolate(interpolate: "basis"): Radial; + interpolate(interpolate: "basis-open"): Radial; + interpolate(interpolate: "basis-closed"): Radial; + interpolate(interpolate: "bundle"): Radial; + interpolate(interpolate: "cardinal"): Radial; + interpolate(interpolate: "cardinal-open"): Radial; + interpolate(interpolate: "cardinal-closed"): Radial; + interpolate(interpolate: "monotone"): Radial; + interpolate(interpolate: string): Radial; + interpolate(interpolate: (points: Array<[number, number]>) => string): Radial; + + tension(): number; + tension(tension: number): Radial; + + defined(): (d: T, i: number) => boolean; + defined(defined: (d: T, i: number) => boolean): Radial; + } + } + + export function area(): Area<[number, number]>; + export function area(): Area; + + interface Area { + (data: T[]): string; + + x(): number | ((d: T, i: number) => number); + x(x: number): Area; + x(x: (d: T, i: number) => number): Area; + + x0(): number | ((d: T, i: number) => number); + x0(x0: number): Area; + x0(x0: (d: T, i: number) => number): Area; + + x1(): number | ((d: T, i: number) => number); + x1(x1: number): Area; + x1(x1: (d: T, i: number) => number): Area; + + y(): number | ((d: T, i: number) => number); + y(y: number): Area; + y(y: (d: T, i: number) => number): Area; + + y0(): number | ((d: T, i: number) => number); + y0(y0: number): Area; + y0(y0: (d: T, i: number) => number): Area; + + y1(): number | ((d: T, i: number) => number); + y1(y1: number): Area; + y1(y1: (d: T, i: number) => number): Area; + + interpolate(): string | ((points: Array<[number, number]>) => string); + interpolate(interpolate: "linear"): Area; + interpolate(interpolate: "step"): Area; + interpolate(interpolate: "step-before"): Area; + interpolate(interpolate: "step-after"): Area; + interpolate(interpolate: "basis"): Area; + interpolate(interpolate: "basis-open"): Area; + interpolate(interpolate: "cardinal"): Area; + interpolate(interpolate: "cardinal-open"): Area; + interpolate(interpolate: "monotone"): Area; + interpolate(interpolate: string): Area; + + tension(): number; + tension(tension: number): Area; + + defined(): (d: T, i: number) => boolean; + defined(): (d: T, i: number) => boolean; + } + + module area { + export function radial(): Radial<[number, number]>; + export function radial(): Radial; + + interface Radial { + (data: T[]): string; + + radius(): number | ((d: T, i: number) => number); + radius(radius: number): Radial; + radius(radius: (d: T, i: number) => number): Radial; + + innerRadius(): number | ((d: T, i: number) => number); + innerRadius(innerRadius: number): Radial; + innerRadius(innerRadius: (d: T, i: number) => number): Radial; + + outerRadius(): number | ((d: T, i: number) => number); + outerRadius(outerRadius: number): Radial; + outerRadius(outerRadius: (d: T, i: number) => number): Radial; + + angle(): number | ((d: T, i: number) => number); + angle(angle: number): Radial; + angle(angle: (d: T, i: number) => number): Radial; + + startAngle(): number | ((d: T, i: number) => number); + startAngle(startAngle: number): Radial; + startAngle(startAngle: (d: T, i: number) => number): Radial; + + endAngle(): number | ((d: T, i: number) => number); + endAngle(endAngle: number): Radial; + endAngle(endAngle: (d: T, i: number) => number): Radial; + + interpolate(): string | ((points: Array<[number, number]>) => string); + interpolate(interpolate: "linear"): Radial; + interpolate(interpolate: "step"): Radial; + interpolate(interpolate: "step-before"): Radial; + interpolate(interpolate: "step-after"): Radial; + interpolate(interpolate: "basis"): Radial; + interpolate(interpolate: "basis-open"): Radial; + interpolate(interpolate: "cardinal"): Radial; + interpolate(interpolate: "cardinal-open"): Radial; + interpolate(interpolate: "monotone"): Radial; + interpolate(interpolate: string): Radial; + interpolate(interpolate: (points: Array<[number, number]>) => string): Radial; + + tension(): number; + tension(tension: number): Radial; + + defined(): (d: T, i: number) => boolean; + defined(): (d: T, i: number) => boolean; + } + } + + export function arc(): Arc; + export function arc(): Arc; + + module arc { + interface Arc { + innerRadius: number; + outerRadius: number; + startAngle: number; + endAngle: number; + padAngle: number + } + } + + interface Arc { + (d: T, i: number): string; + + innerRadius(): (d: T, i: number) => number; + innerRadius(radius: number): Arc; + innerRadius(radius: (d: T, i: number) => number): Arc; + + outerRadius(): (d: T, i: number) => number; + outerRadius(radius: number): Arc; + outerRadius(radius: (d: T, i: number) => number): Arc; + + cornerRadius(): (d: T, i: number) => number; + cornerRadius(radius: number): Arc; + cornerRadius(radius: (d: T, i: number) => number): Arc; + + padRadius(): string | ((d: T, i: number) => number); + padRadius(radius: "auto"): Arc; + padRadius(radius: string): Arc; + padRadius(radius: (d: T, i: number) => number): Arc; + + startAngle(): (d: T, i: number) => number; + startAngle(angle: number): Arc; + startAngle(angle: (d: T, i: number) => number): Arc; + + endAngle(): (d: T, i: number) => number; + endAngle(angle: number): Arc; + endAngle(angle: (d: T, i: number) => number): Arc; + + padAngle(): (d: T, i: number) => number; + padAngle(angle: number): Arc; + padAngle(angle: (d: T, i: number) => number): Arc; + + centroid(d: T, i?: number): [number, number]; + } + + export function symbol(): Symbol<{}>; + export function symbol(): Symbol; + + interface Symbol { + (d: T, i: number): string; + + type(): (d: T, i: number) => string; + type(type: string): Symbol; + type(type: (d: T, i: number) => string): Symbol; + + size(): (d: T, i: string) => number; + size(size: number): Symbol; + size(size: (d: T, i: number) => number): Symbol; + } + + export var symbolTypes: string[]; + + export function chord(): Chord, chord.Node>; + export function chord(): Chord, Node>; + export function chord(): Chord; + + module chord { + interface Link { + source: Node; + target: Node; + } + + interface Node { + radius: number; + startAngle: number; + endAngle: number + } + } + + interface Chord { + (d: Link, i: number): string; + + source(): (d: Link, i: number) => Node; + source(source: Node): Chord; + source(source: (d: Link, i: number) => Node): Chord; + + target(): (d: Link, i: number) => Node; + target(target: Node): Chord; + target(target: (d: Link, i: number) => Node): Chord; + + radius(): (d: Node, i: number) => number; + radius(radius: number): Chord; + radius(radius: (d: Node, i: number) => number): Chord; + + startAngle(): (d: Node, i: number) => number; + startAngle(angle: number): Chord; + startAngle(angle: (d: Node, i: number) => number): Chord; + + endAngle(): (d: Node, i: number) => number; + endAngle(angle: number): Chord; + endAngle(angle: (d: Node, i: number) => number): Chord; + } + + export function diagonal(): Diagonal, diagonal.Node>; + export function diagonal(): Diagonal, Node>; + export function diagonal(): Diagonal; + + module diagonal { + interface Link { + source: Node; + target: Node; + } + + interface Node { + x: number; + y: number; + } + } + + interface Diagonal { + (d: Link, i: number): string; + + source(): (d: Link, i: number) => Node; + source(source: Node): Diagonal; + source(source: (d: Link, i: number) => Node): Diagonal; + + target(): (d: Link, i: number) => Node; + target(target: Node): Diagonal; + target(target: (d: Link, i: number) => Node): Diagonal; + + projection(): (d: Node, i: number) => [number, number]; + projection(projection: (d: Node, i: number) => [number, number]): Diagonal; + } + + module diagonal { + export function radial(): Radial, Node>; + export function radial(): Radial, Node>; + export function radial(): Radial; + + interface Radial { + (d: Link, i: number): string; + + source(): (d: Link, i: number) => Node; + source(source: Node): Radial; + source(source: (d: Link, i: number) => Node): Radial; + + target(): (d: Link, i: number) => Node; + target(target: Node): Radial; + target(target: (d: Link, i: number) => Node): Radial; + + projection(): (d: Node, i: number) => [number, number]; + projection(projection: (d: Node, i: number) => [number, number]): Radial; + } + } + + export function axis(): Axis; + + interface Axis { + (selection: Selection): void; + (selection: Transition): void; + + scale(): any; + scale(scale: any): Axis; + + orient(): string; + orient(orientation: string): Axis; + + ticks(): any[]; + ticks(...args: any[]): Axis; + + tickValues(): any[]; + tickValues(values: any[]): Axis; + + tickSize(): number; + tickSize(size: number): Axis; + tickSize(inner: number, outer: number): Axis; + + innerTickSize(): number; + innerTickSize(size: number): Axis; + + outerTickSize(): number; + outerTickSize(size: number): Axis; + + tickPadding(): number; + tickPadding(padding: number): Axis; + + tickFormat(): (t: any) => string; + tickFormat(format: (t: any) => string): Axis; + } + + export function brush(): Brush; + export function brush(): Brush; + + module brush { + interface Scale { + domain(): number[]; + domain(domain: number[]): Scale; + + range(): number[]; + range(range: number[]): Scale; + + invert?(y: number): number; + } + } + + interface Brush { + (selection: Selection): void; + (selection: Transition): void; + + event(selection: Selection): void; + event(selection: Transition): void; + + x(): brush.Scale; + x(x: brush.Scale): Brush; + + y(): brush.Scale; + y(y: brush.Scale): Brush; + + extent(): [number, number] | [[number, number], [number, number]]; + extent(extent: [number, number] | [[number, number], [number, number]]): Brush; + + clamp(): boolean | [boolean, boolean]; + clamp(clamp: boolean | [boolean, boolean]): Brush; + + clear(): void; + + empty(): boolean; + + on(type: 'brushstart'): (datum: T, index: number) => void; + on(type: 'brush'): (datum: T, index: number) => void; + on(type: 'brushend'): (datum: T, index: number) => void; + on(type: string): (datum: T, index: number) => void; + + on(type: 'brushstart', listener: (datum: T, index: number) => void): Brush; + on(type: 'brush', listener: (datum: T, index: number) => void): Brush; + on(type: 'brushend', listener: (datum: T, index: number) => void): Brush; + on(type: string, listener: (datum: T, index: number) => void): Brush; + } + } + + export function xhr(url: string, mimeType?: string, callback?: (err: any, data: any) => void): Xhr; + export function xhr(url: string, callback: (err: any, data: any) => void): Xhr; + + interface Xhr { + header(name: string): string; + header(name: string, value: string): Xhr; + + mimeType(): string; + mimeType(type: string): Xhr; + + responseType(): string; + responseType(type: string): Xhr; + + response(): (request: XMLHttpRequest) => any; + response(value: (request: XMLHttpRequest) => any): Xhr; + + get(callback?: (err: any, data: any) => void): Xhr; + + post(data?: any, callback?: (err: any, data: any) => void): Xhr; + post(callback: (err: any, data: any) => void): Xhr; + + send(method: string, data?: any, callback?: (err: any, data: any) => void): Xhr; + send(method: string, callback: (err: any, data: any) => void): Xhr; + + abort(): Xhr; + + on(type: "beforesend"): (request: XMLHttpRequest) => void; + on(type: "progress"): (request: XMLHttpRequest) => void; + on(type: "load"): (response: any) => void; + on(type: "error"): (err: any) => void; + on(type: string): (...args: any[]) => void; + + on(type: "beforesend", listener: (request: XMLHttpRequest) => void): Xhr; + on(type: "progress", listener: (request: XMLHttpRequest) => void): Xhr; + on(type: "load", listener: (response: any) => void): Xhr; + on(type: "error", listener: (err: any) => void): Xhr; + on(type: string, listener: (...args: any[]) => void): Xhr; + } + + export function text(url: string, mimeType?: string, callback?: (err: any, data: string) => void): Xhr; + export function text(url: string, callback: (err: any, data: string) => void): Xhr; + + export function json(url: string, callback?: (err: any, data: any) => void): Xhr; + + export function xml(url: string, mimeType?: string, callback?: (err: any, data: any) => void): Xhr; + export function xml(url: string, callback: (err: any, data: any) => void): Xhr; + + export function html(url: string, callback?: (err: any, data: DocumentFragment) => void): Xhr; + + export var csv: Dsv; + export var tsv: Dsv; + export function dsv(delimiter: string, mimeType: string): Dsv; + + interface Dsv { + (url: string, callback: (rows: { [key: string]: string }[]) => void): DsvXhr<{ [key: string]: string }>; + (url: string, callback: (error: any, rows: { [key: string]: string }[]) => void): DsvXhr<{ [key: string]: string }>; + (url: string): DsvXhr<{ [key: string]: string }>; + (url: string, accessor: (row: { [key: string]: string }) => T, callback: (rows: T[]) => void): DsvXhr; + (url: string, accessor: (row: { [key: string]: string }) => T, callback: (error: any, rows: T[]) => void): DsvXhr; + (url: string, accessor: (row: { [key: string]: string }) => T): DsvXhr; + + parse(string: string): { [key: string]: string }[]; + parse(string: string, accessor: (row: { [key: string]: string }, index: number) => T): T[]; + + parseRows(string: string): string[][]; + parseRows(string: string, accessor: (row: string[], index: number) => T): T[]; + + format(rows: Object[]): string; + + formatRows(rows: string[][]): string; + } + + interface DsvXhr extends Xhr { + row(): (row: { [key: string]: string }) => T; + row(accessor: (row: { [key: string]: string }) => U): DsvXhr; + + header(name: string): string; + header(name: string, value: string): DsvXhr; + + mimeType(): string; + mimeType(type: string): DsvXhr; + + responseType(): string; + responseType(type: string): DsvXhr; + + response(): (request: XMLHttpRequest) => any; + response(value: (request: XMLHttpRequest) => any): DsvXhr; + + get(callback?: (err: any, data: T) => void): DsvXhr; + post(data?: any, callback?: (err: any, data: T) => void): DsvXhr; + post(callback: (err: any, data: T) => void): DsvXhr; + + send(method: string, data?: any, callback?: (err: any, data: T) => void): DsvXhr; + send(method: string, callback: (err: any, data: T) => void): DsvXhr; + + abort(): DsvXhr; + + on(type: "beforesend"): (request: XMLHttpRequest) => void; + on(type: "progress"): (request: XMLHttpRequest) => void; + on(type: "load"): (response: T) => void; + on(type: "error"): (err: any) => void; + on(type: string): (...args: any[]) => void; + + on(type: "beforesend", listener: (request: XMLHttpRequest) => void): DsvXhr; + on(type: "progress", listener: (request: XMLHttpRequest) => void): DsvXhr; + on(type: "load", listener: (response: T) => void): DsvXhr; + on(type: "error", listener: (err: any) => void): DsvXhr; + on(type: string, listener: (...args: any[]) => void): DsvXhr; + } + + export function locale(definition: LocaleDefinition): Locale; + + interface LocaleDefinition { + decimal: string; + thousands: string; + grouping: number[]; + currency: [string, string]; + dateTime: string; + date: string; + time: string; + periods: [string, string]; + days: [string, string, string, string, string, string, string]; + shortDays: [string, string, string, string, string, string, string]; + months: [string, string, string, string, string, string, string, string, string, string, string, string]; + shortMonths: [string, string, string, string, string, string, string, string, string, string, string, string]; + } + + interface Locale { + numberFormat(specifier: string): (n: number) => string; + timeFormat: { + (specifier: string): time.Format; + utc(specifier: string): time.Format; + } + } + + module layout { + export function bundle(): Bundle; + export function bundle(): Bundle + + module bundle { + interface Node { + parent: Node; + } + + interface Link { + source: T; + target: T; + } + } + + interface Bundle { + (links: bundle.Link[]): T[][]; + } + + export function chord(): Chord; + + module chord { + interface Link { + source: Node; + target: Node; + } + + interface Node { + index: number; + subindex: number; + startAngle: number; + endAngle: number; + value: number; + } + + interface Group { + index: number; + startAngle: number; + endAngle: number; + value: number; + } + } + + interface Chord { + matrix(): number[][]; + matrix(matrix: number[][]): Chord; + + padding(): number; + padding(padding: number): Chord; + + sortGroups(): (a: number, b: number) => number; + sortGroups(comparator: (a: number, b: number) => number): Chord; + + sortSubgroups(): (a: number, b: number) => number; + sortSubgroups(comparator: (a: number, b: number) => number): Chord; + + sortChords(): (a: number, b: number) => number; + sortChords(comparator: (a: number, b: number) => number): Chord; + + chords(): chord.Link[]; + groups(): chord.Group[]; + } + + export function cluster(): Cluster; + export function cluster(): Cluster; + + module cluster { + interface Result { + parent?: Result; + children?: Result[]; + depth?: number; + x?: number; + y?: number; + } + + interface Link { + source: T; + target: T; + } + } + + interface Cluster { + (root: T): T[]; + + nodes(root: T): T[]; + + links(nodes: T[]): cluster.Link; + + children(): (node: T) => T[]; + children(accessor: (node: T) => T[]): Cluster; + + sort(): (a: T, b: T) => number; + sort(comparator: (a: T, b: T) => number): Cluster; + + separation(): (a: T, b: T) => number; + separation(separation: (a: T, b: T) => number): Cluster; + + size(): [number, number]; + size(size: [number, number]): Cluster; + + nodeSize(): [number, number]; + nodeSize(nodeSize: [number, number]): Cluster; + + value(): (a: T) => number; + value(value: (a: T) => number): Cluster; + } + + export function force(): Force, force.Node>; + export function force(): Force, Node>; + export function force, Node extends force.Node>(): Force; + + module force { + interface Link { + source: T; + target: T; + } + + interface Node { + index?: number; + x?: number; + y?: number; + px?: number; + py?: number; + fixed?: boolean; + weight?: number; + } + + interface Event { + type: string; + alpha: number; + } + } + + interface Force, Node extends force.Node> { + size(): [number, number]; + size(size: [number, number]): Force; + + linkDistance(): number | ((link: Link, index: number) => number); + linkDistance(distance: number): Force; + linkDistance(distance: (link: Link, index: number) => number): Force; + + linkStrength(): number | ((link: Link, index: number) => number); + linkStrength(strength: number): Force; + linkStrength(strength: (link: Link, index: number) => number): Force; + + friction(): number; + friction(friction: number): Force; + + charge(): number | ((node: Node, index: number) => number); + charge(charge: number): Force; + charge(charge: (node: Node, index: number) => number): Force; + + chargeDistance(): number; + chargeDistance(distance: number): Force; + + theta(): number; + theta(theta: number): Force; + + gravity(): number; + gravity(gravity: number): Force; + + nodes(): Node[]; + nodes(nodes: Node[]): Force; + + links(): Link[]; + links(links: { source: number; target: number }[]): Force; + links(links: Link[]): Force; + + start(): Force; + + alpha(): number; + alpha(value: number): Force; + + resume(): Force; + + stop(): Force; + + on(type: string): (event: force.Event) => void; + on(type: string, listener: (event: force.Event) => void): Force; + + drag(): behavior.Drag; + drag(selection: Selection): void; + } + + export function hierarchy(): Hierarchy; + export function hierarchy(): Hierarchy; + + module hierarchy { + interface Result { + parent?: Result; + children?: Result[]; + value?: number; + depth?: number; + } + } + + interface Hierarchy { + (root: T): T[]; + + children(): (node: T) => T[]; + children(accessor: (node: T) => T[]): Hierarchy; + + sort(): (a: T, b: T) => number; + sort(comparator: (a: T, b: T) => number): Hierarchy; + + value(): (node: T) => number; + value(accessor: (node: T) => number): Hierarchy; + + revalue(root: T): T[]; + } + + export function histogram(): Histogram; + export function histogram(): Histogram; + + module histogram { + interface Bin extends Array { + x: number; + dx: number; + y: number; + } + } + + interface Histogram { + (values: T[], index?: number): histogram.Bin[]; + + value(): (datum: T, index: number) => number; + value(value: (datum: T, index: number) => number): Histogram; + + range(): (values: T[], index: number) => [number, number]; + range(range: (values: T[], index: number) => [number, number]): Histogram; + + bins(): (range: [number, number], values: T[], index: number) => number[]; + bins(count: number): Histogram; + bins(thresholds: number[]): Histogram; + bins(func: (range: [number, number], values: T[], index: number) => number[]): Histogram; + + frequency(): boolean; + frequency(frequency: boolean): Histogram; + } + + export function pack(): Pack; + export function pack(): Pack; + + module pack { + interface Node { + parent?: Node; + children?: Node[]; + value?: number; + depth?: number; + x?: number; + y?: number; + r?: number; + } + + interface Link { + source: Node; + target: Node; + } + } + + interface Pack { + (root: T): T[]; + + nodes(root: T): T[]; + + links(nodes: T[]): pack.Link[]; + + children(): (node: T, depth: number) => T[]; + children(children: (node: T, depth: number) => T[]): Pack; + + sort(): (a: T, b: T) => number; + sort(comparator: (a: T, b: T) => number): Pack; + + value(): (node: T) => number; + value(value: (node: T) => number): Pack; + + size(): [number, number]; + size(size: [number, number]): Pack; + + radius(): number | ((node: T) => number); + radius(radius: number): Pack; + radius(radius: (node: T) => number): Pack; + + padding(): number; + padding(padding: number): Pack; + } + + export function pie(): Pie; + export function pie(): Pie; + + module pie { + interface Arc { + value: number; + startAngle: number; + endAngle: number; + padAngle: number; + data: T; + } + } + + interface Pie { + (data: T[], index?: number): pie.Arc[]; + + value(): (datum: T, index: number) => number; + value(accessor: (datum: T, index: number) => number): Pie; + + sort(): (a: T, b: T) => number; + sort(comparator: (a: T, b: T) => number): Pie; + + startAngle(): number | ((data: T[], index: number) => number); + startAngle(angle: number): Pie; + startAngle(angle: (data: T[], index: number) => number): Pie; + + endAngle(): number | ((data: T[], index: number) => number); + endAngle(angle: number): Pie; + endAngle(angle: (data: T[], index: number) => number): Pie; + + padAngle(): number | ((data: T[], index: number) => number); + padAngle(angle: number): Pie; + padAngle(angle: (data: T[], index: number) => number): Pie; + } + + export function stack(): Stack; + export function stack(): Stack; + export function stack(): Stack; + module stack { + interface Value { + x: number; + y: number; + y0?: number; + } + } + + interface Stack { + (layers: Series[], index?: number): Series[]; + + values(): (layer: Series, index: number) => Value[]; + values(accessor: (layer: Series, index: number) => Value[]): Stack; + + offset(): (data: Array<[number, number]>) => number[]; + offset(offset: "silhouette"): Stack; + offset(offset: "wiggle"): Stack; + offset(offset: "expand"): Stack; + offset(offset: "zero"): Stack; + offset(offset: string): Stack; + offset(offset: (data: Array<[number, number]>) => number[]): Stack; + + order(): (data: Array<[number, number]>) => number[]; + order(order: "inside-out"): Stack; + order(order: "reverse"): Stack; + order(order: "default"): Stack; + order(order: string): Stack; + order(order: (data: Array<[number, number]>) => number[]): Stack; + + x(): (value: Value, index: number) => number; + x(accessor: (value: Value, index: number) => number): Stack; + + y(): (value: Value, index: number) => number; + y(accesor: (value: Value, index: number) => number): Stack; + + out(): (value: Value, y0: number, y: number) => void; + out(setter: (value: Value, y0: number, y: number) => void): Stack; + } + + export function tree(): Tree; + export function tree(): Tree; + + module tree { + interface Link { + source: T; + target: T; + } + + interface Node { + parent?: Node; + children?: Node[]; + depth?: number; + x?: number; + y?: number; + } + } + + interface Tree { + (root: T, index?: number): T[]; + + nodes(root: T, index?: number): T[]; + + links(nodes: T[]): tree.Link[]; + + children(): (datum: T, index: number) => T[]; + children(children: (datum: T, index: number) => T[]): Tree; + + separation(): (a: T, b: T) => number; + separation(separation: (a: T, b: T) => number): Tree; + + size(): [number, number]; + size(size: [number, number]): Tree; + + nodeSize(): [number, number]; + nodeSize(size: [number, number]): Tree; + + sort(): (a: T, b: T) => number; + sort(comparator: (a: T, b: T) => number): Tree; + + value(): (datum: T, index: number) => number; + value(value: (datum: T, index: number) => number): Tree; + } + + export function treemap(): Treemap; + export function treemap(): Treemap; + + module treemap { + interface Node { + parent?: Node; + children?: Node[]; + value?: number; + depth?: number; + x?: number; + y?: number; + dx?: number; + dy?: number; + } + + interface Link { + source: T; + target: T; + } + + type Padding = number | [number, number, number, number]; + } + + interface Treemap { + (root: T, index?: number): T[]; + + nodes(root: T, index?: number): T[]; + + links(nodes: T[]): treemap.Link[]; + + children(): (node: T, depth: number) => T[]; + children(children: (node: T, depth: number) => T[]): Treemap; + + sort(): (a: T, b: T) => number; + sort(comparator: (a: T, b: T) => number): Treemap; + + value(): (node: T, index: number) => number; + value(value: (node: T, index: number) => number): Treemap; + + size(): [number, number]; + size(size: [number, number]): Treemap; + + padding(): (node: T, depth: number) => treemap.Padding; + padding(padding: treemap.Padding): Treemap; + padding(padding: (node: T, depth: number) => treemap.Padding): Treemap; + + round(): boolean; + round(round: boolean): Treemap; + + sticky(): boolean; + sticky(sticky: boolean): boolean; + + mode(): string; + mode(mode: "squarify"): Treemap; + mode(mode: "slice"): Treemap; + mode(mode: "dice"): Treemap; + mode(mode: "slice-dice"): Treemap; + mode(mode: string): Treemap; + + ratio(): number; + ratio(ratio: number): Treemap; + } + } + + module geom { + export function voronoi(): Voronoi<[number, number]>; + export function voronoi(): Voronoi; + + module voronoi { + interface Link { + source: T; + target: T; + } + } + + interface Voronoi { + (data: T[]): Array<[number, number]>; + + x(): (vertex: T) => number; + x(x: (vertex: T) => number): Voronoi; + + y(): (vertex: T) => number; + y(y: (vertex: T) => number): Voronoi; + + clipExtent(): [[number, number], [number, number]]; + clipExtent(extent: [[number, number], [number, number]]): Voronoi; + + links(data: T[]): voronoi.Link[]; + + triangles(data: T[]): Array<[T, T, T]>; + } + + /** + * @deprecated use d3.geom.voronoi().triangles() instead + */ + export function delaunay(vertices: Array<[number, number]>): Array<[[number, number], [number, number], [number, number]]>; + + export function quadtree(): Quadtree<[number, number]>; + export function quadtree(): Quadtree; + + module quadtree { + interface Node { + nodes: [Node, Node, Node, Node]; + leaf: boolean; + point: T; + x: number; + y: number; + } + + interface Quadtree extends Node { + add(point: T): void; + visit(callback: (node: Node, x1: number, y1: number, x2: number, y2: number) => boolean | void): void; + find(point: [number, number]): T; + } + } + + interface Quadtree { + (points: T[]): quadtree.Quadtree; + + x(): (datum: T, index: number) => number; + x(x: number): Quadtree; + x(x: (datum: T, index: number) => number): Quadtree; + + y(): (datum: T, index: number) => number; + y(y: number): Quadtree; + y(y: (datum: T, index: number) => number): Quadtree; + + extent(): [[number, number], [number, number]]; + extent(extent: [[number, number], [number, number]]): Quadtree; + } + + export function hull(vertices: Array<[number, number]>): Array<[number, number]>; + export function hull(): Hull<[number, number]>; + export function hull(): Hull; + + interface Hull { + (vertices: T[]): Array<[number, number]>; + + x(): (datum: T) => number; + x(x: (datum: T) => number): Hull; + + y(): (datum: T) => number; + y(y: (datum: T) => number): Hull; + } + + export function polygon(vertices: Array<[number, number]>): Polygon; + + interface Polygon { + area(): number; + + centroid(): [number, number]; + + clip(subject: Array<[number, number]>): Array<[number, number]>; + } + } +} + +// we need this to exist +interface TouchList { } + +declare module 'd3' { + export = d3; +} diff --git a/d3/plugins/d3.superformula-tests.ts b/d3/plugins/d3.superformula-tests.ts index 3e7dd4d58..432ea214c 100644 --- a/d3/plugins/d3.superformula-tests.ts +++ b/d3/plugins/d3.superformula-tests.ts @@ -12,7 +12,7 @@ function superformula() { .attr("width", 960) .attr("height", 500); - var small = d3.superformula() + var small = d3.superformula() .type(function (d) { return d; } ) .size(size); @@ -37,4 +37,4 @@ function superformula() { .attr("class", "big") .attr("transform", "translate(450,250)") .attr("d", big); -} \ No newline at end of file +} diff --git a/d3/plugins/d3.superformula.d.ts b/d3/plugins/d3.superformula.d.ts index 6f5c59b07..d9252a45d 100644 --- a/d3/plugins/d3.superformula.d.ts +++ b/d3/plugins/d3.superformula.d.ts @@ -1,38 +1,37 @@ /// +declare module d3 { + export function superformula(): Superformula; -declare module D3 { - interface SuperformulaPath - { - superformulaPath(params: number[], n: number, diameter: number): Superformula; + module superformula { + interface Type { + m: number; + n1: number; + n2: number; + n3: number; + a: number; + b: number; + } } + interface Superformula { + (datum: T, index: number): string; - interface SuperformulaType - { - (any: any): any;//hans - m: number; - n1: number; - n2: number; - n3: number; - a: number; - b: number; + type(): (datum: T, index: number) => string; + type(type: string): Superformula; + type(type: (datum: T, index: number) => string): Superformula; + + size(): (datum: T, index: number) => number; + size(size: number): Superformula; + size(size: (datum: T, index: number) => number): Superformula; + + segments(): (datum: T, index: number) => number; + segments(segments: number): Superformula; + segments(segments: (datum: T, index: number) => number): Superformula; + + param(name: string): number; + param(name: string, value: number): Superformula; } - interface Superformula - { - (): any; - type(any: any): any; - param(name: string, value: number): Superformula; - size(x: number): Superformula; - segments(x: number): Superformula; - } - - - interface Base extends Selectors - { - superformula: Superformula; - superformulaPath: SuperformulaPath; - superformulaTypes: SuperformulaType[]; - } + export var superformulaTypes: string[]; } From 39debc285e0827afc57b78c4f3d4fe1a345287f8 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Mon, 30 Mar 2015 15:26:22 -0400 Subject: [PATCH 002/137] Fix tests and broken references --- d3/d3-tests.ts | 12 ++++++------ dagre-d3/dagre-d3.d.ts | 2 +- dcjs/dc-1.6.0.d.ts | 8 ++++---- dcjs/dc.d.ts | 44 +++++++++++++++++++++--------------------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts index 70e4036dd..4750c2309 100644 --- a/d3/d3-tests.ts +++ b/d3/d3-tests.ts @@ -48,33 +48,33 @@ function testPieChart() { function testMapConstructor() { //No arg constructor - var emptyMap: D3.Map = d3.map(); + var emptyMap: d3.Map = d3.map(); //Object constructor var object:{[key: string]: number } = {a: 1, b: 2, c: 3}; - var objectMap: D3.Map = d3.map(object); + var objectMap: d3.Map = d3.map(object); //Array constructor var numberArray: number[] = [1, 2, 3] - var numberArrayMap: D3.Map = d3.map(numberArray); + var numberArrayMap: d3.Map = d3.map(numberArray); //Array with keyFn constructor var objectArray: {key: string}[] = [{key: "v1"}, {key: "v2"}, {key: "v3"}]; var indexes: number[] = []; //keyFn with index - var objectArrayMap1: D3.Map<{key: string}> + var objectArrayMap1: d3.Map<{key: string}> = d3.map<{key: string}>(objectArray, (o: {key: string}, index: number) => { indexes.push(index); return o.key; }); //keyFn without index - var objectArrayMap2: D3.Map<{key: string}> + var objectArrayMap2: d3.Map<{key: string}> = d3.map<{key: string}>(objectArray, (o: {key: string}) => { return o.key; }); //Map constructor - var duplicateMap: D3.Map = d3.map(numberArrayMap); + var duplicateMap: d3.Map = d3.map(numberArrayMap); } //Example from http://bl.ocks.org/3887051 diff --git a/dagre-d3/dagre-d3.d.ts b/dagre-d3/dagre-d3.d.ts index d088d1d82..d654fa0b4 100644 --- a/dagre-d3/dagre-d3.d.ts +++ b/dagre-d3/dagre-d3.d.ts @@ -24,7 +24,7 @@ declare module Dagre { interface Render { new (): Render; - (selection: D3.Selection, g: Dagre.Graph): void; + (selection: d3.Selection, g: Dagre.Graph): void; } } diff --git a/dcjs/dc-1.6.0.d.ts b/dcjs/dc-1.6.0.d.ts index 2b06c34dd..2feed9a8c 100644 --- a/dcjs/dc-1.6.0.d.ts +++ b/dcjs/dc-1.6.0.d.ts @@ -47,8 +47,8 @@ export interface ILegendwidget { legend: (l:ILegendwidget) => T; chartID: () => number; options: (o:Object)=>void ; - select: (selector: D3.Selection) => D3.Selection; - selectAll: (selector: D3.Selection) => D3.Selection; + select: (selector: d3.Selection) => d3.Selection; + selectAll: (selector: d3.Selection) => d3.Selection; } export interface IEvents { @@ -85,8 +85,8 @@ export interface ILegendwidget { x: IGetSet; y: IGetSet; elasticY: IGetSet; - xAxis: IGetSet; - yAxis: IGetSet; + xAxis: IGetSet; + yAxis: IGetSet; yAxisPadding: IGetSet; xAxisPadding: IGetSet; renderHorizontalGridLines: IGetSet; diff --git a/dcjs/dc.d.ts b/dcjs/dc.d.ts index 5a83b5c7c..5382c9b76 100644 --- a/dcjs/dc.d.ts +++ b/dcjs/dc.d.ts @@ -86,7 +86,7 @@ declare module DC { clamp(n: number, min: number, max: number): number; uniqueId(): number; nameToId(name: string): string; - appendOrSelect(parent: D3.Selection, selector: string, tag: any): D3.Selection; + appendOrSelect(parent: d3.Selection, selector: string, tag: any): d3.Selection; safeNumber(n: any): number; } @@ -112,11 +112,11 @@ declare module DC { group: IGetSet; ordering: IGetSet, T>; filterAll(): void; - select(selector: D3.Selection|string): D3.Selection; - selectAll(selector: D3.Selection|string): D3.Selection; - anchor(anchor: BaseMixin|D3.Selection|string, chartGroup?: string): D3.Selection; + select(selector: d3.Selection|string): d3.Selection; + selectAll(selector: d3.Selection|string): d3.Selection; + anchor(anchor: BaseMixin|d3.Selection|string, chartGroup?: string): d3.Selection; anchorName(): string; - svg: IGetSet; + svg: IGetSet, d3.Selection>; resetSvg(): void; filterPrinter: IGetSet<(filters: Array) => string, T>; turnOnControls(): void; @@ -160,7 +160,7 @@ declare module DC { } export interface ColorMixin { - colors: IGetSet|Array, T>; + colors: IGetSet | { (n: number): string; domain(colors: any[]): any }, T>; ordinalColors(r: Array): void; linearColors(r: Array): void; colorAccessor: IGetSet, T>; @@ -174,12 +174,12 @@ declare module DC { rangeChart: IGetSet, T>; zoomScale: IGetSet, T>; zoomOutRestrict: IGetSet; - g: IGetSet; + g: IGetSet, T>; mouseZoomable: IGetSet; - chartBodyG(): D3.Selection; - x: IGetSet, T>; + chartBodyG(): d3.Selection; + x: IGetSet<(n: any) => any, T>; xUnits: IGetSet; - xAxis: IGetSet; + xAxis: IGetSet; elasticX: IGetSet; xAxisPadding: IGetSet; xUnitCount(): number; @@ -187,8 +187,8 @@ declare module DC { isOrdinal(): boolean; xAxisLabel: IBiGetSet; yAxisLabel: IBiGetSet; - y: IGetSet, T>; - yAxis: IGetSet; + y: IGetSet<(n: any) => any, T>; + yAxis: IGetSet; elasticY: IGetSet; renderHorizontalGridLines: IGetSet; renderVerticalGridLines: IGetSet; @@ -209,7 +209,7 @@ declare module DC { hideStack(name: string): void; showStack(name: string): void; // title(stackName: string, titleFn: Accessor); - stackLayout: IGetSet; + stackLayout: IGetSet, T>; } export interface CapMixin { @@ -219,7 +219,7 @@ declare module DC { } export interface BubbleMixin extends ColorMixin { - r: IGetSet, T>; + r: IGetSet<(n: any) => any, T>; radiusValueAccessor: IGetSet, T>; minRadiusWithLabel: IGetSet; maxBubbleRelativeSize: IGetSet; @@ -295,8 +295,8 @@ declare module DC { children(): Array>; shareColors: IGetSet; shareTitle: IGetSet; - rightY: IGetSet, CompositeChart>; - rightYAxis: IGetSet; + rightY: IGetSet<(n: any) => any, CompositeChart>; + rightYAxis: IGetSet; } export interface SeriesChart extends CompositeChart { @@ -314,9 +314,9 @@ declare module DC { export interface GeoChoroplethChart extends ColorMixin, BaseMixin { overlayGeoJson(json: any, name: string, keyAccessor: Accessor): void; - projection: IGetSet; + projection: IGetSet; geoJsons(): Array; - geoPath(): D3.Geo.Path; + geoPath(): d3.geo.Path; removeGeoJson(name: string): void; } @@ -325,9 +325,9 @@ declare module DC { } export interface RowChart extends CapMixin, MarginMixin, ColorMixin, BaseMixin { - x: IGetSet, RowChart>; + x: IGetSet<(n: any) => any, RowChart>; renderTitleLabel: IGetSet; - xAxis: IGetSet; + xAxis: IGetSet; fixedBarHeight: IGetSet; gap: IGetSet; elasticX: IGetSet; @@ -338,7 +338,7 @@ declare module DC { export interface ScatterPlot extends CoordinateGridMixin { existenceAccessor: IGetSet, ScatterPlot>; - symbol: IGetSet; + symbol: IGetSet, ScatterPlot>; symbolSize: IGetSet; highlightedSize: IGetSet; hiddenSize: IGetSet; @@ -392,7 +392,7 @@ declare module DC { renderAll(group?: string): void; redrawAll(group?: string): void; disableTransitions: boolean; - transition(selections: D3.Selection, duration: number, callback: (s: D3.Selection) => void): void; + transition(selections: d3.Selection, duration: number, callback: (s: d3.Selection) => void): void; units: Units; events: Events; From 6f60566a5e6cedc17778624d1a231be4f0745031 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Mon, 30 Mar 2015 15:28:48 -0400 Subject: [PATCH 003/137] add self to contributor header --- d3/d3.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index dddef751b..e5b9c86c6 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -1,6 +1,6 @@ // Type definitions for d3JS // Project: http://d3js.org/ -// Definitions by: Boris Yankov +// Definitions by: Alex Ford , Boris Yankov // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module d3 { From 16d084b052cbbae8826835c2ab5fe1109bc1f9dd Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Tue, 31 Mar 2015 10:51:43 -0400 Subject: [PATCH 004/137] Add more default types for D3 scales --- d3/d3.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index e5b9c86c6..9aa91a874 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -1502,8 +1502,11 @@ declare module d3 { copy(): Linear; } + export function sqrt(): Pow; export function sqrt(): Pow; export function sqrt(): Pow; + + export function pow(): Pow; export function pow(): Pow; export function pow(): Pow; @@ -1538,6 +1541,7 @@ declare module d3 { copy(): Pow; } + export function log(): Log; export function log(): Log; export function log(): Log; From b9546998e3f65e39b944164846396d13cd195986 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Tue, 31 Mar 2015 10:51:58 -0400 Subject: [PATCH 005/137] noImplicitAny compliance --- d3/d3-tests.ts | 193 +++++++++++++++++++++++++------------------------ 1 file changed, 100 insertions(+), 93 deletions(-) diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts index 4750c2309..2bae83e43 100644 --- a/d3/d3-tests.ts +++ b/d3/d3-tests.ts @@ -113,11 +113,11 @@ function groupedBarChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.csv("data.csv", function (error, data: Array) { + d3.csv("data.csv", function (error: any, data: Array) { var ageNames = d3.keys(data[0]).filter(function (key) { return key !== "State"; }); data.forEach(function (d) { - d.ages = ageNames.map(function (name) { return { name: name, value: +d[name] }; }); + d.ages = ageNames.map(function (name) { return { name: name, value: +( d)[name] }; }); }); x0.domain(data.map(function (d) { return d.State; })); @@ -206,18 +206,18 @@ function stackedBarChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.csv("data.csv", function (error, data: any) { + d3.csv("data.csv", function (error: any, data: any) { color.domain(d3.keys(data[0]).filter(function (key) { return key !== "State"; })); - data.forEach(function (d) { + data.forEach(function (d: any) { var y0 = 0; d.ages = color.domain().map(function (name) { return { name: name, y0: y0, y1: y0 += +d[name] }; }); d.total = d.ages[d.ages.length - 1].y1; }); - data.sort(function (a, b) { return b.total - a.total; }); + data.sort(function (a: any, b: any) { return b.total - a.total; }); - x.domain(data.map(function (d) { return d.State; })); + x.domain(data.map(function (d: any) { return d.State; })); y.domain([0, d3.max(data, function (d: { total: number }) { return d.total; })]); svg.append("g") @@ -304,15 +304,15 @@ function normalizedBarChart() { d3.csv("data.csv", function (error, data) { color.domain(d3.keys(data[0]).filter(function (key) { return key !== "State"; })); - data.forEach(function (d) { + data.forEach(function (d: any) { var y0 = 0; d.ages = color.domain().map(function (name) { return { name: name, y0: y0, y1: y0 += +d[name] }; }); - d.ages.forEach(function (d) { d.y0 /= y0; d.y1 /= y0; }); + d.ages.forEach(function (d: any) { d.y0 /= y0; d.y1 /= y0; }); }); - data.sort(function (a, b) { return b.ages[0].y1 - a.ages[0].y1; }); + data.sort(function (a: any, b: any) { return b.ages[0].y1 - a.ages[0].y1; }); - x.domain(data.map(function (d) { return d.State; })); + x.domain(data.map(function (d: any) { return d.State; })); svg.append("g") .attr("class", "x axis") @@ -383,13 +383,13 @@ function sortablebarChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.tsv("data.tsv", function (error, data: any) { + d3.tsv("data.tsv", function (error: any, data: any) { - data.forEach(function (d) { + data.forEach(function (d: any) { d.frequency = +d.frequency; }); - x.domain(data.map(function (d) { return d.letter; })); + x.domain(data.map(function (d: any) { return d.letter; })); y.domain([0, d3.max(data, function (d: any) { return d.frequency; })]); svg.append("g") @@ -426,17 +426,17 @@ function sortablebarChart() { clearTimeout(sortTimeout); var x0 = x.domain(data.sort(this.checked - ? function (a, b) { return b.frequency - a.frequency; } - : function (a, b) { return d3.ascending(a.letter, b.letter); }) - .map(function (d) { return d.letter; })) + ? function (a: any, b: any) { return b.frequency - a.frequency; } + : function (a: any, b: any) { return d3.ascending(a.letter, b.letter); }) + .map(function (d: any) { return d.letter; })) .copy(); var transition = svg.transition().duration(750), - delay = function (d, i) { return i * 50; }; + delay = function (d: any, i: number) { return i * 50; }; transition.selectAll(".bar") .delay(delay) - .attr("x", function (d) { return x0(d.letter); }); + .attr("x", function (d: any) { return x0(d.letter); }); transition.select(".x.axis") .call(xAxis) @@ -506,7 +506,7 @@ function callenderView() { .text(function (d) { return d + ": " + percent(data[d]); }); }); - function monthPath(t0) { + function monthPath(t0: Date) { var t1 = new Date(t0.getFullYear(), t0.getMonth() + 1, 0), d0 = +day(t0), w0 = +week(t0), d1 = +day(t1), w1 = +week(t1); @@ -552,8 +552,8 @@ function lineChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.tsv("data.tsv", function (error, data) { - data.forEach(function (d) { + d3.tsv("data.tsv", function (error: any, data: any) { + data.forEach(function (d: any) { d.date = parseDate(d.date); d.close = +d.close; }); @@ -616,8 +616,8 @@ function bivariateAreaChart() { .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); - d3.tsv("data.tsv", function (error, data: any) { - data.forEach(function (d) { + d3.tsv("data.tsv", function (error: any, data: any) { + data.forEach(function (d: any) { d.date = parseDate(d.date); d.low = +d.low; d.high = +d.high; @@ -670,7 +670,7 @@ function dragMultiples() { .attr("cy", function (d) { return d.y; }) .call(drag); - function dragmove(d) { + function dragmove(d: { x: number; y: number }) { d3.select(this) .attr("cx", d.x = Math.max(radius, Math.min(width - radius, ( d3.event).x))) .attr("cy", d.y = Math.max(radius, Math.min(height - radius, ( d3.event).y))); @@ -753,7 +753,7 @@ function chainedTransitions() { .attr("cy", y) .each(slide(20, w - 20)); - function slide(x0, x1) { + function slide(x0: number, x1: number) { t += 50; return function() { d3.select(this).transition() @@ -805,7 +805,7 @@ function populationPyramid() { .attr("dy", ".71em") .text(2000); - d3.csv("population.csv", function (error, rows: Array) { + d3.csv("population.csv", function (error: any, rows: Array) { // Convert strings to numbers. rows.forEach(function (d) { @@ -980,7 +980,7 @@ module forcedBasedLabelPlacemant { } ).style("fill", "#555").style("font-family", "Arial").style("font-size", 12); var updateLink = function () { - this.attr("x1", function (d) { + (> this).attr("x1", function (d) { return d.source.x; } ).attr("y1", function (d) { return d.source.y; @@ -993,7 +993,7 @@ module forcedBasedLabelPlacemant { } var updateNode = function () { - this.attr("transform", function (d) { + (> this).attr("transform", function (d) { return "translate(" + d.x + "," + d.y + ")"; } ); @@ -1044,9 +1044,9 @@ module forceCollapsable { var w = 1280, h = 800, - node, - link, - root; + node: d3.selection.Update, + link: d3.selection.Update>, + root: any; var force = d3.layout.force() .on("tick", tick) @@ -1124,12 +1124,12 @@ module forceCollapsable { } // Color leaf nodes orange, and packages white or blue. - function color(d) { + function color(d: Node) { return d._children ? "#3182bd" : d.children ? "#c6dbef" : "#fd8d3c"; } // Toggle children on click. - function click(d) { + function click(d: Node) { if (d.children) { d._children = d.children; d.children = null; @@ -1141,12 +1141,12 @@ module forceCollapsable { } // Returns a list of all nodes under the root. - function flatten(root) { - var nodes = [], i = 0; + function flatten(root: Node) { + var nodes: Node[] = [], i = 0; - function recurse(node) { + function recurse(node: Node) { if (node.children) node.size = node.children.reduce(function (p, v) { return p + recurse(v); } , 0); - if (!node.id) node.id = ++i; + if (!node.id) node.id = String(++i); nodes.push(node); return node.size; } @@ -1202,7 +1202,7 @@ function azimuthalEquidistant() { .attr("d", path); svg.insert("path", ".graticule") - .datum(topojson.mesh(world, world.objects.countries, function (a, b) { return a !== b; } )) + .datum(topojson.mesh(world, world.objects.countries, function (a: any, b: any) { return a !== b; } )) .attr("class", "boundary") .attr("d", path); } ); @@ -1251,7 +1251,6 @@ function forceDirectedVoronoi() { var w = window.innerWidth > 960 ? 960 : (window.innerWidth || 960), h = window.innerHeight > 500 ? 500 : (window.innerHeight || 500), radius = 5.25, - links = [], simulate = true, zoomToAdd = true, color = d3.scale.quantize().domain([10000, 7250]).range(["#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]) @@ -1441,7 +1440,7 @@ function quadtree() { brushed(); function brushed() { - var extent = brush.extent(); + var extent = <[[number, number], [number, number]]> brush.extent(); point.each(function (d) { d.scanned = d.selected = false; } ); search(quadtree, extent[0][0], extent[0][1], extent[1][0], extent[1][1]); point.classed("scanned", function (d) { return d.scanned; } ); @@ -1449,8 +1448,8 @@ function quadtree() { } // Collapse the quadtree into an array of rectangles. - function nodes(quadtree) { - var nodes = []; + function nodes(quadtree: d3.geom.quadtree.Quadtree<[number, number]>) { + var nodes: Array<{x: number; y: number; width: number; height: number}> = []; quadtree.visit(function (node, x1, y1, x2, y2) { nodes.push({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 }); } ); @@ -1458,12 +1457,12 @@ function quadtree() { } // Find the nodes within the specified rectangle. - function search(quadtree, x0, y0, x3, y3) { + function search(quadtree: d3.geom.quadtree.Quadtree<{ scanned?: boolean; selected?: boolean; 0: number; 1: number }>, x0: number, y0: number, x3: number, y3: number) { quadtree.visit(function (node, x1, y1, x2, y2) { var p = node.point; if (p) { p.scanned = true; - p.selected = (p.x >= x0) && (p.x < x3) && (p.y >= y0) && (p.y < y3); + p.selected = (p[0] >= x0) && (p[0] < x3) && (p[1] >= y0) && (p[1] < y3); } return x1 >= x3 || y1 >= y3 || x2 < x0 || y2 < y0; } ); @@ -1563,11 +1562,11 @@ module hierarchicalEdgeBundling { var packages = { // Lazily construct the package hierarchy from class names. - root: function (classes) { - var map = {}; + root: function (classes: any[]) { + var map: {[key: string]: Result} = {}; - function find(name, data?) { - var node = map[name], i; + function find(name: string, data?: any) { + var node: Result = map[name], i: number; if (!node) { node = map[name] = data || { name: name, children: [] }; if (name.length) { @@ -1587,9 +1586,9 @@ module hierarchicalEdgeBundling { } , // Return a list of imports for the given array of nodes. - imports: function (nodes) { - var map = {}, - imports = []; + imports: function (nodes: any[]) { + var map: {[key: string]: Result} = {}, + imports: d3.layout.cluster.Link[] = []; // Compute a map from name to node. nodes.forEach(function (d) { @@ -1598,7 +1597,7 @@ module hierarchicalEdgeBundling { // For each import, construct a link from the source to target node. nodes.forEach(function (d) { - if (d.imports) d.imports.forEach(function (i) { + if (d.imports) d.imports.forEach(function (i: string) { imports.push({ source: map[d.name], target: map[i] }); } ); } ); @@ -1702,9 +1701,9 @@ function streamGraph() { } // Inspired by Lee Byron's test data generator. - function bumpLayer(n): Array<{x: number; y: number;y0?:number;}> { + function bumpLayer(n: number): Array<{x: number; y: number;y0?:number;}> { - function bump(a) { + function bump(a: number[]) { var x = 1 / (.1 + Math.random()), y = 2 * Math.random() - .5, z = 10 / (.1 + Math.random()); @@ -1714,7 +1713,7 @@ function streamGraph() { } } - var a = [], i; + var a: number[] = [], i: number; for (i = 0; i < n; ++i) a[i] = 0; for (i = 0; i < 5; ++i) bump(a); return a.map(function (d, i) { return { x: i, y: Math.max(0, d) }; } ); @@ -1724,6 +1723,7 @@ function streamGraph() { // example from http://mbostock.github.io/d3/talk/20111116/force-collapsible.html module forceCollapsable2 { interface Node extends d3.layout.force.Node { + children: Node[]; _children: Node[]; size: number; id: string; @@ -1731,9 +1731,9 @@ module forceCollapsable2 { var w = 1280, h = 800, - node, - link, - root; + node: d3.selection.Update, + link: d3.selection.Update>, + root: Node; var force = d3.layout.force() .on("tick", tick) @@ -1811,12 +1811,12 @@ module forceCollapsable2 { } // Color leaf nodes orange, and packages white or blue. - function color(d) { + function color(d: Node) { return d._children ? "#3182bd" : d.children ? "#c6dbef" : "#fd8d3c"; } // Toggle children on click. - function click(d) { + function click(d: Node) { if (d.children) { d._children = d.children; d.children = null; @@ -1828,12 +1828,12 @@ module forceCollapsable2 { } // Returns a list of all nodes under the root. - function flatten(root) { - var nodes = [], i = 0; + function flatten(root: Node) { + var nodes: Node[] = [], i = 0; - function recurse(node) { + function recurse(node: Node) { if (node.children) node.size = node.children.reduce(function (p, v) { return p + recurse(v); } , 0); - if (!node.id) node.id = ++i; + if (!node.id) node.id = String(++i); nodes.push(node); return node.size; } @@ -1915,7 +1915,7 @@ function chordDiagram() { .style("opacity", 1); // Returns an array of tick angles and labels, given a group. - function groupTicks(d) { + function groupTicks(d: d3.layout.chord.Node) { var k = (d.endAngle - d.startAngle) / d.value; return d3.range(0, d.value, 1000).map(function (v, i) { return { @@ -1926,8 +1926,8 @@ function chordDiagram() { } // Returns an event handler for fading a given chord group. - function fade(opacity) { - return function (g, i) { + function fade(opacity: number) { + return function (g: {}, i: number) { svg.selectAll(".chord path") .filter(function (d) { return d.source.index != i && d.target.index != i; } ) .transition() @@ -1946,11 +1946,11 @@ function irisParallel() { h = 800 - m[0] - m[2]; var x = d3.scale.ordinal().domain(traits).rangePoints([0, w]), - y = {}; + y: {[key: string]: any} = {}; var line = d3.svg.line(), axis = d3.svg.axis().orient("left"), - foreground; + foreground: d3.Selection<{ [key: string]: string}>; var svg = d3.select("body").append("svg:svg") .attr("width", w + m[1] + m[3]) @@ -2004,7 +2004,7 @@ function irisParallel() { .attr("class", "trait") .attr("transform", function (d) { return "translate(" + x(d) + ")"; } ) .call(d3.behavior.drag() - .origin(function (d) { return { x: x(d), y: undefined }; } ) + .origin(function (d) { return { x: x(d), y: NaN }; } ) .on("dragstart", dragstart) .on("drag", drag) .on("dragend", dragend)); @@ -2026,18 +2026,18 @@ function irisParallel() { .attr("x", -8) .attr("width", 16); - function dragstart(d) { + function dragstart(d: string) { i = traits.indexOf(d); } - function drag(d) { + function drag(d: string) { x.range()[i] = ( d3.event).x; traits.sort(function (a, b) { return x(a) - x(b); } ); g.attr("transform", function (d) { return "translate(" + x(d) + ")"; } ); foreground.attr("d", path); } - function dragend(d) { + function dragend(d: string) { x.domain(traits).rangePoints([0, w]); var t = d3.transition().duration(500); t.selectAll(".trait").attr("transform", function (d) { return "translate(" + x(d) + ")"; } ); @@ -2046,7 +2046,7 @@ function irisParallel() { } ); // Returns the path for a given data point. - function path(d) { + function path(d: any): string { return line(traits.map(function (p): [number, number] { return [x(p), y[p](d[p])]; } )); } @@ -2065,11 +2065,11 @@ function irisParallel() { //example from function healthAndWealth() { // Various accessors that specify the four dimensions of data to visualize. - function x(d) { return d.income; } - function y(d) { return d.lifeExpectancy; } - function radius(d) { return d.population; } - function color(d) { return d.region; } - function key(d) { return d.name; } + function x(d: any) { return d.income; } + function y(d: any) { return d.lifeExpectancy; } + function radius(d: any) { return d.population; } + function color(d: any) { return d.region; } + function key(d: any) { return d.name; } // Chart dimensions. var margin = { top: 19.5, right: 19.5, bottom: 19.5, left: 39.5 }, @@ -2133,7 +2133,7 @@ function healthAndWealth() { d3.json("nations.json", function (nations: any[]) { // A bisector since many nation's data is sparsely-defined. - var bisect = d3.bisector(function (d) { return d[0]; } ); + var bisect = d3.bisector(function (d: any) { return d[0]; } ); // Add a dot per nation. Initialize the data at 1800, and set the colors. var dot = svg.append("g") @@ -2169,14 +2169,14 @@ function healthAndWealth() { .each("end", enableInteraction); // Positions the dots based on data. - function position(dot) { + function position(dot: d3.Selection) { dot.attr("cx", function (d) { return xScale(x(d)); } ) .attr("cy", function (d) { return yScale(y(d)); } ) .attr("r", function (d) { return radiusScale(radius(d)); } ); } // Defines a sort order so that the smallest dots are drawn on top. - function order(a, b) { + function order(a: any, b: any) { return radius(b) - radius(a); } @@ -2213,17 +2213,17 @@ function healthAndWealth() { // For the interpolated data, the dots and label are redrawn. function tweenYear() { var year = d3.interpolateNumber(1800, 2009); - return function (t) { displayYear(year(t)); }; + return function (t: number) { displayYear(year(t)); }; } // Updates the display to show the specified year. - function displayYear(year) { + function displayYear(year: number) { dot.data(interpolateData(year), key).call(position).sort(order); label.text(Math.round(year)); } // Interpolates the dataset for the given (fractional) year. - function interpolateData(year) { + function interpolateData(year: number) { return nations.map(function (d) { return { name: d.name, @@ -2236,7 +2236,7 @@ function healthAndWealth() { } // Finds (and possibly interpolates) the value for the specified year. - function interpolateValues(values, year) { + function interpolateValues(values: any[], year: number) { var i = bisect.left(values, year, 0, values.length - 1), a = values[i]; if (i > 0) { @@ -2252,7 +2252,7 @@ function healthAndWealth() { // Test for d3.functor function functorTest () { var f: (n: number) => number = d3.functor(10); - var g = d3.functor(function (v) { return v; }); + var g = d3.functor(function (v: number) { return v; }); return f(10) === g(10); } @@ -2287,7 +2287,7 @@ function nestTest () { var n2 = d3.nest<{ a: number; b: number[] }>() .key(function (d) { return String(d.a); }) .sortValues(function (x1, x2) { - return x1[0] < x1[1] ? -1 : (x1[0] > x1[0] ? 1 : 0); }); + return x1.b[0] < x1.b[1] ? -1 : (x1.b[0] > x1.b[0] ? 1 : 0); }); n2.map(data); n2.entries(data); @@ -2387,7 +2387,7 @@ function brushTest() { .x(xScale) .y(yScale) .on('brush', function () { - var extent = brush2.extent(); + var extent = <[[number, number], [number, number]]> brush2.extent(); var xExtent = extent[0], yExtent = extent[1]; @@ -2538,25 +2538,32 @@ function svgArcTest () { l.innerRadius(f).innerRadius() === f; l.innerRadius(0); - l.innerRadius(function (d) { return d[0]; }); + l.innerRadius(function (d) { return d.innerRadius; }); l.innerRadius(function (d, i) { return i; }); l.outerRadius(f).outerRadius() === f; l.outerRadius(0); - l.outerRadius(function (d) { return d[1]; }); + l.outerRadius(function (d) { return d.outerRadius; }); l.outerRadius(function (d, i) { return i; }); l.startAngle(f).startAngle() === f; l.startAngle(0); - l.startAngle(function (d) { return d[0]; }); + l.startAngle(function (d) { return d.innerRadius; }); l.startAngle(function (d, i) { return i; }); l.endAngle(f).endAngle() === f; l.endAngle(0); - l.endAngle(function (d) { return d[1]; }); + l.endAngle(function (d) { return d.outerRadius; }); l.endAngle(function (d, i) { return i; }); } +function svgArcTest2 () { + var l = d3.svg.arc<[number, number]>(); + + l.innerRadius(d => d[0]); + l.outerRadius(d => d[1]); +} + // Tests for d3.svg.diagonal // Adopted from: https://github.com/mbostock/d3/blob/master/test/svg/diagonal-test.js function svgDiagonalTest () { From 663240f96936f0aa16f9e175241e3890f3c461dc Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Tue, 31 Mar 2015 11:03:02 -0400 Subject: [PATCH 006/137] ordinal scales use any string-coercible type --- d3/d3-tests.ts | 6 +++--- d3/d3.d.ts | 39 ++++++++++++++++++++++----------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts index 2bae83e43..5db3528f5 100644 --- a/d3/d3-tests.ts +++ b/d3/d3-tests.ts @@ -738,7 +738,7 @@ function panAndZoom() { function chainedTransitions() { var w = 960, h = 500, - y = d3.scale.ordinal().domain(d3.range(50)).rangePoints([20, h - 20]), + y = d3.scale.ordinal().domain(d3.range(50)).rangePoints([20, h - 20]), t = Date.now(); var svg = d3.select("body").append("svg:svg") @@ -1629,7 +1629,7 @@ function roundedRectangles() { .attr("width", 25) .attr("height", 25) .attr("transform", function (d, i) { return "scale(" + (1 - d / 25) * 20 + ")"; } ) - .style("fill", d3.scale.category20c()); + .style("fill", d3.scale.category20c()); var g0 = g.datum(function (d) { return { center: [0, 0], angle: 0 }; @@ -1862,7 +1862,7 @@ function chordDiagram() { innerRadius = Math.min(width, height) * .41, outerRadius = innerRadius * 1.1; - var fill = d3.scale.ordinal() + var fill = d3.scale.ordinal() .domain(d3.range(4)) .range(["#000000", "#FFDD89", "#957244", "#F26223"]); diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 9aa91a874..18a27790b 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -1627,31 +1627,36 @@ declare module d3 { copy(): Threshold; } - export function ordinal(): Ordinal; - export function category10(): Ordinal; - export function category20(): Ordinal; - export function category20b(): Ordinal; - export function category20c(): Ordinal; + export function ordinal(): Ordinal; + export function ordinal(): Ordinal; + export function category10(): Ordinal; + export function category10(): Ordinal; + export function category20(): Ordinal; + export function category20(): Ordinal; + export function category20b(): Ordinal; + export function category20b(): Ordinal; + export function category20c(): Ordinal; + export function category20c(): Ordinal; + + interface Ordinal { + (x: Domain): Range; - interface Ordinal { - (x: Primitive): T; + domain(): Domain[]; + domain(values: Domain[]): Ordinal; - domain(): string[]; - domain(values: Primitive[]): Ordinal; + range(): Range[]; + range(values: Range[]): Ordinal; - range(): T[]; - range(values: T[]): Ordinal; + rangePoints(interval: [number, number], padding?: number): Ordinal; + rangeRoundPoints(interval: [number, number], padding?: number): Ordinal; - rangePoints(interval: [number, number], padding?: number): Ordinal; - rangeRoundPoints(interval: [number, number], padding?: number): Ordinal; - - rangeBands(interval: [number, number], padding?: number, outerPadding?: number): Ordinal; - rangeRoundBands(interval: [number, number], padding?: number, outerPadding?: number): Ordinal; + rangeBands(interval: [number, number], padding?: number, outerPadding?: number): Ordinal; + rangeRoundBands(interval: [number, number], padding?: number, outerPadding?: number): Ordinal; rangeBand(): number; rangeExtent(): [number, number]; - copy(): Ordinal; + copy(): Ordinal; } } From c390cc036fa7b9336ba8be9784c0e18c459dacc3 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Tue, 31 Mar 2015 11:06:14 -0400 Subject: [PATCH 007/137] Correct failing build. --- d3.cloud.layout/d3.cloud.layout-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d3.cloud.layout/d3.cloud.layout-tests.ts b/d3.cloud.layout/d3.cloud.layout-tests.ts index c22d76b36..9d5ed7b71 100644 --- a/d3.cloud.layout/d3.cloud.layout-tests.ts +++ b/d3.cloud.layout/d3.cloud.layout-tests.ts @@ -10,7 +10,7 @@ } - var fill = d3.scale.category20(); + var fill = d3.scale.category20(); d3.layout.cloud().size([300, 300]) .words([ "Hello", "world", "normally", "you", "want", "more", "words", @@ -40,4 +40,4 @@ return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; }) .text(function(d:ICompTextSize) { return d.text; }); - } \ No newline at end of file + } From 5532887980800ceef4d93f7a6b43188662d709f9 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Tue, 31 Mar 2015 19:44:31 -0400 Subject: [PATCH 008/137] require scale-like behavior of dc.js scales --- dcjs/dc.d.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dcjs/dc.d.ts b/dcjs/dc.d.ts index 5382c9b76..62739e16a 100644 --- a/dcjs/dc.d.ts +++ b/dcjs/dc.d.ts @@ -20,6 +20,16 @@ declare module DC { (t: T, r?: R): V; } + export interface Scale { + (x: any): T; + + domain(values: any[]): Scale; + domain(): any[]; + + range(values: T[]): Scale; + range(): T[]; + } + export interface Accessor { (datum: T, index?: number): V; } @@ -160,9 +170,9 @@ declare module DC { } export interface ColorMixin { - colors: IGetSet | { (n: number): string; domain(colors: any[]): any }, T>; + colors: IGetSet | Scale, T>; ordinalColors(r: Array): void; - linearColors(r: Array): void; + linearColors(r: Array): void; colorAccessor: IGetSet, T>; colorDomain: IGetSet, T>; calculateColorDomain(): void; @@ -187,7 +197,7 @@ declare module DC { isOrdinal(): boolean; xAxisLabel: IBiGetSet; yAxisLabel: IBiGetSet; - y: IGetSet<(n: any) => any, T>; + y: IGetSet, T>; yAxis: IGetSet; elasticY: IGetSet; renderHorizontalGridLines: IGetSet; @@ -219,7 +229,7 @@ declare module DC { } export interface BubbleMixin extends ColorMixin { - r: IGetSet<(n: any) => any, T>; + r: IGetSet, T>; radiusValueAccessor: IGetSet, T>; minRadiusWithLabel: IGetSet; maxBubbleRelativeSize: IGetSet; @@ -325,7 +335,7 @@ declare module DC { } export interface RowChart extends CapMixin, MarginMixin, ColorMixin, BaseMixin { - x: IGetSet<(n: any) => any, RowChart>; + x: IGetSet, RowChart>; renderTitleLabel: IGetSet; xAxis: IGetSet; fixedBarHeight: IGetSet; From 23515939b9df8c4525dad8ac3d063810700ec9cf Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Fri, 3 Apr 2015 15:36:58 -0400 Subject: [PATCH 009/137] remove refs to non-existent "D3" --- d3/d3-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts index 15be39839..5db3528f5 100644 --- a/d3/d3-tests.ts +++ b/d3/d3-tests.ts @@ -475,7 +475,7 @@ function callenderView() { .style("text-anchor", "middle") .text(function (d) { return d; }); - var rect: D3.UpdateSelection = svg.selectAll(".day") + var rect = svg.selectAll(".day") .data(function (d) { return d3.time.days(new Date(d, 0, 1), new Date(d + 1, 0, 1)); }) .enter().append("rect") .attr("class", "day") @@ -973,7 +973,7 @@ module forcedBasedLabelPlacemant { var anchorLink = vis.selectAll("line.anchorLink").data(labelAnchorLinks)//.enter().append("svg:line").attr("class", "anchorLink").style("stroke", "#999"); - var anchorNode: D3.Selection = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode"); + var anchorNode = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode"); anchorNode.append("svg:circle").attr("r", 0).style("fill", "#FFF"); anchorNode.append("svg:text").text(function (d, i) { return i % 2 == 0 ? "" : d.node.label From 639337b32bed76f70e1e7918c4ad076c4492e1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Eichler?= Date: Mon, 18 May 2015 14:57:14 +0200 Subject: [PATCH 010/137] fixed *withMatch methods incorrectly requiring SinonMatcher type arguments --- sinon/sinon-tests.ts | 13 +++++++++++++ sinon/sinon.d.ts | 14 +++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/sinon/sinon-tests.ts b/sinon/sinon-tests.ts index ccc9819e5..ca916788d 100644 --- a/sinon/sinon-tests.ts +++ b/sinon/sinon-tests.ts @@ -76,6 +76,18 @@ function testEight() { sinon.match.typeOf("object").and(sinon.match.has("pages")); } +function testNine() { + var callback = sinon.stub().returns(42); + callback({ x: 5, y: 5 }); + callback.calledWithMatch({ x: 5 }); + callback.alwaysCalledWithMatch({ y: 5 }); + callback.neverCalledWithMatch({ x: 6 }); + callback.notCalledWithMatch({ x: 6 }); + sinon.assert.calledWithMatch(callback, { x: 5 }); + sinon.assert.alwaysCalledWithMatch(callback, { y: 5 }); + sinon.assert.neverCalledWithMatch(callback, { x: 6 }); +} + function testSandbox() { var sandbox = sinon.sandbox.create(); if (sandbox.spy().called) { @@ -96,3 +108,4 @@ testFive(); testSix(); testSeven(); testEight(); +testNine(); diff --git a/sinon/sinon.d.ts b/sinon/sinon.d.ts index 7dc5bc1d6..6440dda90 100644 --- a/sinon/sinon.d.ts +++ b/sinon/sinon.d.ts @@ -15,9 +15,9 @@ declare module Sinon { calledOn(obj: any): boolean; calledWith(...args: any[]): boolean; calledWithExactly(...args: any[]): boolean; - calledWithMatch(...args: SinonMatcher[]): boolean; + calledWithMatch(...args: any[]): boolean; notCalledWith(...args: any[]): boolean; - notCalledWithMatch(...args: SinonMatcher[]): boolean; + notCalledWithMatch(...args: any[]): boolean; returned(value: any): boolean; threw(): boolean; threw(type: string): boolean; @@ -64,9 +64,9 @@ declare module Sinon { alwaysCalledOn(obj: any): boolean; alwaysCalledWith(...args: any[]): boolean; alwaysCalledWithExactly(...args: any[]): boolean; - alwaysCalledWithMatch(...args: SinonMatcher[]): boolean; + alwaysCalledWithMatch(...args: any[]): boolean; neverCalledWith(...args: any[]): boolean; - neverCalledWithMatch(...args: SinonMatcher[]): boolean; + neverCalledWithMatch(...args: any[]): boolean; alwaysThrew(): boolean; alwaysThrew(type: string): boolean; alwaysThrew(obj: any): boolean; @@ -307,9 +307,9 @@ declare module Sinon { neverCalledWith(spy: SinonSpy, ...args: any[]): void; calledWithExactly(spy: SinonSpy, ...args: any[]): void; alwaysCalledWithExactly(spy: SinonSpy, ...args: any[]): void; - calledWithMatch(spy: SinonSpy, ...args: SinonMatcher[]): void; - alwaysCalledWithMatch(spy: SinonSpy, ...args: SinonMatcher[]): void; - neverCalledWithMatch(spy: SinonSpy, ...args: SinonMatcher[]): void; + calledWithMatch(spy: SinonSpy, ...args: any[]): void; + alwaysCalledWithMatch(spy: SinonSpy, ...args: any[]): void; + neverCalledWithMatch(spy: SinonSpy, ...args: any[]): void; threw(spy: SinonSpy): void; threw(spy: SinonSpy, exception: string): void; threw(spy: SinonSpy, exception: any): void; From a38b9565636e8fd7720c02b77e4e617e26760fd0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 May 2015 10:45:42 +0200 Subject: [PATCH 011/137] backgrid.d.ts: added some class and exported the module --- backgrid/backgrid.d.ts | 133 +++++++++++++++++++++++++++-------------- 1 file changed, 87 insertions(+), 46 deletions(-) diff --git a/backgrid/backgrid.d.ts b/backgrid/backgrid.d.ts index fcae05d80..3a75e6142 100644 --- a/backgrid/backgrid.d.ts +++ b/backgrid/backgrid.d.ts @@ -8,12 +8,12 @@ declare module Backgrid { interface GridOptions { - columns: Column[]; - collection: Backbone.Collection; - header: Header; - body: Body; - row: Row; - footer: Footer; + columns: Column[]; + collection: Backbone.Collection; + header: Header; + body: Body; + row: Row; + footer: Footer; } class Header extends Backbone.View { @@ -21,65 +21,106 @@ declare module Backgrid { class Footer extends Backbone.View { } - + class Row extends Backbone.View { } class Command { - cancel(); - moveDown(); - moveLeft(); - moveRight(); - moveUp(); - passThru(); - save(); + moveUp(): boolean; + moveDown(): boolean; + moveLeft(): boolean; + moveRight(): boolean; + save(): boolean; + cancel(): boolean; + passThru(): boolean; + } + + class CellFormatter { + fromRaw(rawData: any, model: Backbone.Model); + toRaw(formattedData: any, model: Backbone.Model); + } + + class NumberFormatter extends CellFormatter {} + + class PercentFormatter extends NumberFormatter {} + + class DateTimeFormatter extends CellFormatter {} + + class StringFormatter extends CellFormatter {} + + class EmailFormatter extends CellFormatter {} + + class SelectFormatter extends CellFormatter {} + + class CellEditor extends Backbone.View{ + initialize(options?: any); + postRender(model: Backbone.Model, column: Backbone.Model); + } + + class InputCellEditor extends CellEditor { + render(); + saveOrCancel(event: any); + } + + class Cell extends Backbone.View{ + tagName: string; + formatter: CellFormatter; + editor: InputCellEditor; + enterEditMode(); + renderError(); + exitEditMode(); + remove(); + } + + class StringCell extends Cell { } interface ColumnAttr { - name: string; - cell: string; - headerCell: string; - label: string; - sortable: boolean; - editable: boolean; - renderable: boolean; - formater: string; + name: string; + cell: string; + headerCell: string; + label: string; + sortable: boolean; + editable: boolean; + renderable: boolean; + formater: string; } class Column extends Backbone.Model { - initialize(options?: any); + initialize(options?: any); } class Body extends Backbone.View { - tagName: string; + tagName: string; - initialize(options?: any); - insertRow(model: Backbone.Model, collection: Backbone.Collection, options: any); - moveToNextCell(model: Backbone.Model, cell: Column, command: Command); - refresh(): Body; - remove(): Body; - removeRow(model: Backbone.Model, collection: Backbone.Collection, options: any); - render(): Body; + initialize(options?: any); + insertRow(model: Backbone.Model, collection: Backbone.Collection, options: any); + moveToNextCell(model: Backbone.Model, cell: Column, command: Command); + refresh(): Body; + remove(): Body; + removeRow(model: Backbone.Model, collection: Backbone.Collection, options: any); + render(): Body; } class Grid extends Backbone.View { - body: Backgrid.Body; - className: string; - footer: any; - header: any; - tagName: string; + body: Backgrid.Body; + className: string; + footer: any; + header: any; + tagName: string; - initialize(options: any); - getSelectedModels(): Backbone.Model[]; - insertColumn(...options: any[]): Grid; - insertRow(model: Backbone.Model, collection: Backbone.Collection, options: any); - remove():Grid; - removeColumn(...options: any[]): Grid; - removeRow(model: Backbone.Model, collection: Backbone.Collection, options: any); - render():Grid; + initialize(options: any); + getSelectedModels(): Backbone.Model[]; + insertColumn(...options: any[]): Grid; + insertRow(model: Backbone.Model, collection: Backbone.Collection, options: any); + remove(): Grid; + removeColumn(...options: any[]): Grid; + removeRow(model: Backbone.Model, collection: Backbone.Collection, options: any); + render(): Grid; } - - } +declare module "backgrid" { + export = Backgrid; +} From 2dc99a01410103c3e935d6946c195ed1d31edc4e Mon Sep 17 00:00:00 2001 From: Jordi Aranda Date: Tue, 19 May 2015 18:31:48 +0200 Subject: [PATCH 012/137] Callback type definition fix in xhr methods --- d3/d3.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 0bf3d599d..fd81d7e9a 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -304,7 +304,7 @@ declare module D3 { * @param url Url to request * @param callback Function to invoke when resource is loaded or the request fails */ - (url: string, callback?: (xhr: XMLHttpRequest) => void ): Xhr; + (url: string, callback?: (error: any, xhr: XMLHttpRequest) => void ): Xhr; /** * Creates an asynchronous request for specified url * @@ -312,7 +312,7 @@ declare module D3 { * @param mime MIME type to request * @param callback Function to invoke when resource is loaded or the request fails */ - (url: string, mime: string, callback?: (xhr: XMLHttpRequest) => void ): Xhr; + (url: string, mime: string, callback?: (error: any, xhr: XMLHttpRequest) => void ): Xhr; }; /** * Request a text file @@ -324,7 +324,7 @@ declare module D3 { * @param url Url to request * @param callback Function to invoke when resource is loaded or the request fails */ - (url: string, callback?: (response: string) => void ): Xhr; + (url: string, callback?: (error: any, responseText: string) => void ): Xhr; /** * Request a text file * @@ -332,7 +332,7 @@ declare module D3 { * @param mime MIME type to request * @param callback Function to invoke when resource is loaded or the request fails */ - (url: string, mime: string, callback?: (response: string) => void ): Xhr; + (url: string, mime: string, callback?: (error: any, responseText: string) => void ): Xhr; }; /** * Request a JSON blob @@ -351,7 +351,7 @@ declare module D3 { * @param url Url to request * @param callback Function to invoke when resource is loaded or the request fails */ - (url: string, callback?: (response: Document) => void ): Xhr; + (url: string, callback?: (error: any, response: Document) => void ): Xhr; /** * Request an HTML document fragment. * @@ -359,7 +359,7 @@ declare module D3 { * @param mime MIME type to request * @param callback Function to invoke when resource is loaded or the request fails */ - (url: string, mime: string, callback?: (response: Document) => void ): Xhr; + (url: string, mime: string, callback?: (error: any, response: Document) => void ): Xhr; }; /** * Request an XML document fragment. @@ -367,7 +367,7 @@ declare module D3 { * @param url Url to request * @param callback Function to invoke when resource is loaded or the request fails */ - html: (url: string, callback?: (response: DocumentFragment) => void ) => Xhr; + html: (url: string, callback?: (error: any, response: DocumentFragment) => void ) => Xhr; /** * Request a comma-separated values (CSV) file. */ @@ -654,7 +654,7 @@ declare module D3 { * * @param callback Function to invoke on completion of request */ - get(callback?: (xhr: XMLHttpRequest) => void ): Xhr; + get(callback?: (error: any, xhr: XMLHttpRequest) => void ): Xhr; /** * Issue the request using the POST method */ From c514d8784a943e7f9cc470999fabd7689e8695fa Mon Sep 17 00:00:00 2001 From: Jordi Aranda Date: Tue, 19 May 2015 18:57:52 +0200 Subject: [PATCH 013/137] Fixes in callback type definition in xhr methods --- d3/d3.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index fd81d7e9a..ae0c8911a 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -664,14 +664,14 @@ declare module D3 { * * @param callback Function to invoke on completion of request */ - (callback?: (xhr: XMLHttpRequest) => void ): Xhr; + (callback?: (error: any, xhr: XMLHttpRequest) => void ): Xhr; /** * Issue the request using the POST method * * @param data Data to post back in the request * @param callback Function to invoke on completion of request */ - (data: any, callback?: (xhr: XMLHttpRequest) => void ): Xhr; + (data: any, callback?: (error: any, xhr: XMLHttpRequest) => void ): Xhr; }; /** * Issues this request using the specified method @@ -683,7 +683,7 @@ declare module D3 { * @param method Method to use to make the request * @param callback Function to invoke on completion of request */ - (method: string, callback?: (xhr: XMLHttpRequest) => void ): Xhr; + (method: string, callback?: (eror: any, xhr: XMLHttpRequest) => void ): Xhr; /** * Issues this request using the specified method * @@ -691,7 +691,7 @@ declare module D3 { * @param data Data to post back in the request * @param callback Function to invoke on completion of request */ - (method: string, data: any, callback?: (xhr: XMLHttpRequest) => void ): Xhr; + (method: string, data: any, callback?: (error: any, xhr: XMLHttpRequest) => void ): Xhr; }; /** * Aborts this request, if it is currently in-flight From 3efc88b49af47c3632f953a5b2763da364b35332 Mon Sep 17 00:00:00 2001 From: Nick Lee Date: Tue, 19 May 2015 15:14:55 -0400 Subject: [PATCH 014/137] Added uri validator to Joi --- joi/joi.d.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/joi/joi.d.ts b/joi/joi.d.ts index 951fc4045..5e4bfc37b 100644 --- a/joi/joi.d.ts +++ b/joi/joi.d.ts @@ -61,6 +61,11 @@ declare module 'joi' { options?: ValidationOptions; } + export interface ValidationResult { + error: ValidationError; + value: T; + } + export interface SchemaMap { [key: string]: Schema; } @@ -252,6 +257,11 @@ declare module 'joi' { * Requires the string value to contain no whitespace before or after. If the validation convert option is on (enabled by default), the string will be trimmed. */ trim(): StringSchema; + + /** + * Requires the string value to be a valid uri with the passed scheme. + */ + uri(options?: { scheme?: string }): StringSchema; } export interface ArraySchema extends AnySchema { @@ -461,8 +471,7 @@ declare module 'joi' { */ export function validate(value: T, schema: Schema, callback: (err: ValidationError, value: T) => void): void; export function validate(value: T, schema: Object, callback: (err: ValidationError, value: T) => void): void; - export function validate(value: T, schema: Schema, options?: ValidationOptions, callback?: (err: ValidationError, value: T) => void): void; - export function validate(value: T, schema: Object, options?: ValidationOptions, callback?: (err: ValidationError, value: T) => void): void; + export function validate(value: T, schema: Object, options?: ValidationOptions, callback?: (err: ValidationError, value: T) => void): ValidationResult; /** * Converts literal schema definition to joi schema object (or returns the same back if already a joi schema object). From 962cf3f96bf7aa45cf34c5575fb0a70d98a8aa80 Mon Sep 17 00:00:00 2001 From: hansrwindhoff Date: Tue, 19 May 2015 16:29:28 -0600 Subject: [PATCH 015/137] adding defs for https://github.com/gkz/type-check --- type-check/type-check-tests.ts | 95 ++++++++++++++++++++++++++++++++++ type-check/type-check.d.ts | 33 ++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 type-check/type-check-tests.ts create mode 100644 type-check/type-check.d.ts diff --git a/type-check/type-check-tests.ts b/type-check/type-check-tests.ts new file mode 100644 index 000000000..d0c40ba8b --- /dev/null +++ b/type-check/type-check-tests.ts @@ -0,0 +1,95 @@ +// run this in node +/// +import tchecker = require("type-check"); + +var typeCheck = (i1:string|string[],i2:any,i3?: TypeCheck.Options ) => { + console.log(tchecker.typeCheck(i1,i2,i3)); + } ; +var parseType = (i1:string) => { + var res = tchecker.parseType(i1); + console.log(res); + return res; + } ; +var parsedTypeCheck= (i1:any,i2:any) => { + var res =tchecker.parsedTypeCheck(i1,i2); + console.log(res); + return res; + } ; +var TCVersion= () => { console.log(tchecker.VERSION); } ; + + + +console.log("===>testing typeCheck function"); +typeCheck('Number', 1); // true +typeCheck('Number', 2); // true +typeCheck('Number', 'str'); // false +typeCheck('Error', new Error); // true +typeCheck('Undefined', undefined); // true + +console.log("===>testing typeCheck function on Date"); +typeCheck('Date', new Date()); // true +typeCheck('Date', new Date("invalid")); // false + +// Comment +typeCheck('count::Number', 1); // true + +// One type OR another type: +typeCheck('Number | String', 2); // true +typeCheck('Number | String', 'str'); // true + +// Wildcard, matches all types: +typeCheck('*', 2) // true + +// Array, all elements of a single type: +typeCheck('[Number]', [1, 2, 3]); // true +typeCheck('[Number]', [1, 'str', 3]); // false + +// Tuples, or fixed length arrays with elements of different types: +typeCheck('(String, Number)', ['str', 2]); // true +typeCheck('(String, Number)', ['str']); // false +typeCheck('(String, Number)', ['str', 2, 5]); // false + +// Object properties: +typeCheck('{x: Number, y: Boolean}', {x: 2, y: false}); // true +typeCheck('{x: Number, y: Boolean}', {x: 2}); // false +typeCheck('{x: Number, y: Maybe Boolean}', {x: 2}); // true +typeCheck('{x: Number, y: Boolean}', {x: 2, y: false, z: 3}); // false +typeCheck('{x: Number, y: Boolean, ...}', {x: 2, y: false, z: 3}); // true + +// A particular type AND object properties: +typeCheck('RegExp{source: String, ...}', /re/i); // true +typeCheck('RegExp{source: String, ...}', {source: 're'}); // false + + + +console.log("===>testing custom types"); +// Custom types: +var opt = {customTypes: + {Even: { typeOf: 'Number', + validate: function(x:number) { console.log("=>testing even"); return x % 2 === 0; } +}}}; +typeCheck('Even', 2, opt); // true + + +opt = {customTypes: +{Odd : { typeOf: 'Number', + validate: function(x:number) { console.log("=>testing odd");return x % 2 !== 0; } +}}}; +typeCheck('Odd', 3, opt); // true + + +console.log("===>testing nested types"); +// Nested: +var type = '{a: (String, [Number], {y: Array, ...}), b: Error{message: String, ...}}' +typeCheck(type, {a: ['hi', [1, 2, 3], {y: [1, 'ms']}], b: new Error('oh no')}); // true + + + + + +console.log("===>testing parseType function"); +// parseType(type); +var parsedType = parseType( 'Number'); // object +console.log("===>testing parsedTypeCheck function"); +// parsedTypeCheck(parsedType, input, options); +parsedTypeCheck(parsedType, 2); // true diff --git a/type-check/type-check.d.ts b/type-check/type-check.d.ts new file mode 100644 index 000000000..12b7de594 --- /dev/null +++ b/type-check/type-check.d.ts @@ -0,0 +1,33 @@ +// Type definitions for type-check v0.3.1 +// Project: https://github.com/gkz/type-check +// Definitions by: Hans Windhoff +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +declare module TypeCheck { + + export interface CustomType { + [typeName: string]: { + typeOf: string; + validate: (x: any)=> any; + } + } + + export interface Options { + customTypes: CustomType; + } + + export interface TC{ + VERSION: string; + typeCheck: (typeDescription: string , inst: any, options?: Options) => boolean; + parseType: (typeDescription: string) => Object; + parsedTypeCheck: (parsedType: any, obj: any) => boolean; + + } +} + +declare var typecheck: TypeCheck.TC; + +declare module "type-check" { + export=typecheck; +} From 05b8636b50e52f265bd49f42a411f9f92edd799e Mon Sep 17 00:00:00 2001 From: hansrwindhoff Date: Tue, 19 May 2015 16:40:08 -0600 Subject: [PATCH 016/137] adapt test --- type-check/type-check-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/type-check/type-check-tests.ts b/type-check/type-check-tests.ts index d0c40ba8b..b1d629309 100644 --- a/type-check/type-check-tests.ts +++ b/type-check/type-check-tests.ts @@ -2,7 +2,7 @@ /// import tchecker = require("type-check"); -var typeCheck = (i1:string|string[],i2:any,i3?: TypeCheck.Options ) => { +var typeCheck = (i1:string,i2:any,i3?: TypeCheck.Options ) => { console.log(tchecker.typeCheck(i1,i2,i3)); } ; var parseType = (i1:string) => { From c1dcab7dc47e2abbe5bdf560f8129f4fa44d5ae9 Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Tue, 19 May 2015 16:34:16 -0700 Subject: [PATCH 017/137] Updating browser-sync to 2.6.0 This primarily adds watch options --- browser-sync/browser-sync-tests.ts | 10 ++ browser-sync/browser-sync.d.ts | 187 ++++++++++++++++------------- 2 files changed, 112 insertions(+), 85 deletions(-) diff --git a/browser-sync/browser-sync-tests.ts b/browser-sync/browser-sync-tests.ts index 2f5459c2f..0af5dfc00 100644 --- a/browser-sync/browser-sync-tests.ts +++ b/browser-sync/browser-sync-tests.ts @@ -70,3 +70,13 @@ evt.on("init", function () { }); browserSync(config); + +var bs = browserSync.create(); + +bs.init({ + server: "./app" +}); + +bs.reload(); + + diff --git a/browser-sync/browser-sync.d.ts b/browser-sync/browser-sync.d.ts index 4b0cd72c0..db9f3ad3b 100644 --- a/browser-sync/browser-sync.d.ts +++ b/browser-sync/browser-sync.d.ts @@ -3,96 +3,113 @@ // Definitions by: Asana // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// /// declare module "browser-sync" { + import chokidar = require("chokidar"); + import fs = require("fs"); import http = require("http"); - - function BrowserSync(config?: BrowserSync.Options, callback?: (err: Error, bs: Object) => any): void; - - module BrowserSync { - export function reload(): void; - export function reload(file: string): void; - export function reload(files: string[]): void; - export function reload(options: {stream: boolean}): NodeJS.ReadWriteStream; - export function notify(message: string, timeout?: number): void; - - export function exit(): void; - - export var active: boolean; - - export var emitter: NodeJS.EventEmitter; - - interface Options { - files?: string | string[]; - watchOptions?: GazeOptions; - server?: ServerOptions; - proxy?: string | boolean; - port?: number; - https?: boolean; - ghostMode?: GhostOptions | boolean; - logLevel?: string; - logPrefix?: string; - logConnections?: boolean; - logFileChanges?: boolean; - logSnippet?: boolean; - snippetOptions?: SnippetOptions; - tunnel?: string | boolean; - online?: boolean; - open?: string | boolean; - browser?: string | string[]; - xip?: boolean; - notify?: boolean; - scrollProportionally?: boolean; - scrollThrottle?: number; - reloadDelay?: number; - injectChanges?: boolean; - startPath?: string; - minify?: boolean; - host?: string; - codeSync?: boolean; - timestamps?: boolean; - scriptPath?: (path: string) => string; - socket?: SocketOptions; - } - - interface GazeOptions { - interval?: number; - debounceDelay?: number; - mode?: string; - cwd?: string; - } - - interface ServerOptions { - baseDir?: string | string[]; - directory?: boolean; - index?: string; - routes?: {[path: string]: string}; - middleware?: MiddlewareHandler[]; - } - - interface MiddlewareHandler { - (req: http.ServerRequest, res: http.ServerResponse, next: Function): any; - } - - interface GhostOptions { - clicks?: boolean; - scroll?: boolean; - forms?: boolean; - } - - interface SnippetOptions { - ignorePaths?: string; - rule?: {match?: RegExp; fn?: (snippet: string, match: string) => any}; - } - - interface SocketOptions { - path?: string; - clientPath?: string; - namespace?: string; - } + interface Options { + files?: string | string[]; + watchOptions?: GazeOptions; + server?: ServerOptions; + proxy?: string | boolean; + port?: number; + https?: boolean; + ghostMode?: GhostOptions | boolean; + logLevel?: string; + logPrefix?: string; + logConnections?: boolean; + logFileChanges?: boolean; + logSnippet?: boolean; + snippetOptions?: SnippetOptions; + rewriteRules?: boolean | RewriteRules[]; + tunnel?: string | boolean; + online?: boolean; + open?: string | boolean; + browser?: string | string[]; + xip?: boolean; + notify?: boolean; + scrollProportionally?: boolean; + scrollThrottle?: number; + reloadDelay?: number; + reloadDebounce?: number; + plugins?: any[]; + injectChanges?: boolean; + startPath?: string; + minify?: boolean; + host?: string; + codeSync?: boolean; + timestamps?: boolean; + scriptPath?: (path: string) => string; + socket?: SocketOptions; } - export = BrowserSync; + interface GazeOptions { + interval?: number; + debounceDelay?: number; + mode?: string; + cwd?: string; + } + + interface ServerOptions { + baseDir?: string | string[]; + directory?: boolean; + index?: string; + routes?: {[path: string]: string}; + middleware?: MiddlewareHandler[]; + } + + interface MiddlewareHandler { + (req: http.ServerRequest, res: http.ServerResponse, next: Function): any; + } + + interface GhostOptions { + clicks?: boolean; + scroll?: boolean; + forms?: boolean; + } + + interface SnippetOptions { + ignorePaths?: string; + rule?: {match?: RegExp; fn?: (snippet: string, match: string) => any}; + } + + interface SocketOptions { + path?: string; + clientPath?: string; + namespace?: string; + } + + interface RewriteRules { + match: RegExp; + fn: (match: string) => string; + } + + interface BrowserSync { + init(config?: Options, callback?: (err: Error, bs: Object) => any): void; + reload(): void; + reload(file: string): void; + reload(files: string[]): void; + reload(options: {stream: boolean}): NodeJS.ReadWriteStream; + notify(message: string, timeout?: number): void; + exit(): void; + watch(patterns: string, opts?: chokidar.WatchOptions, fn?: (event: string, file: fs.Stats) => any): NodeJS.EventEmitter; + pause(): void; + resume(): void; + emitter: NodeJS.EventEmitter; + active: boolean; + paused: boolean; + } + + interface Exports extends BrowserSync { + create(): BrowserSync; + (config?: Options, callback?: (err: Error, bs: Object) => any): void; + } + + var browserSync: Exports; + + export = browserSync; } From a358c640e7f7110d950f84c419190ee7a11fe5df Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 20 May 2015 01:21:44 +0100 Subject: [PATCH 018/137] #4372 - add `should` support for fluent & `should` extras --- chai-subset/chai-subset.d.ts | 6 +- chai/chai-tests.ts | 346 +++++++++++++++++++++++++++++++++++ chai/chai.d.ts | 27 ++- 3 files changed, 373 insertions(+), 6 deletions(-) diff --git a/chai-subset/chai-subset.d.ts b/chai-subset/chai-subset.d.ts index 44bbef9cc..b9605241b 100644 --- a/chai-subset/chai-subset.d.ts +++ b/chai-subset/chai-subset.d.ts @@ -1,6 +1,6 @@ // Type definitions for chai-subset 1.0.0 // Project: https://github.com/e-conomic/chai-subset -// Definitions by: Sam Noedel +// Definitions by: Sam Noedel , Andrew Brown // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -11,10 +11,6 @@ declare module Chai { } } -interface Object { - should: Chai.Assertion; -} - declare module "chai-subset" { function chaiSubset(chai: any, utils: any): void; export = chaiSubset; diff --git a/chai/chai-tests.ts b/chai/chai-tests.ts index c3f6fe06a..fdd23da16 100644 --- a/chai/chai-tests.ts +++ b/chai/chai-tests.ts @@ -5,290 +5,416 @@ import chai = require('chai'); var expect = chai.expect; var assert = chai.assert; +var should = chai.should(); declare var err: Function; function chaiVersion() { expect(chai).to.have.property('version'); + (<{}>chai).should.have.property('version'); } function assertion() { expect('test').to.be.a('string'); + 'test'.should.be.a('string'); expect('foo').to.equal('foo'); + 'foo'.should.equal('foo'); + should.equal('foo', 'foo'); +} + +function fail() { + err(() => { + should.fail('foo', 'bar'); + }, 'expected fail to throw an AssertionError'); + err(() => { + should.fail('foo', 'bar', 'should fail'); + }, 'expected fail to throw an AssertionError'); + err(() => { + should.fail('foo', 'bar', 'should fail', 'equal'); + }, 'expected fail to throw an AssertionError'); } // ReSharper disable once InconsistentNaming function _true() { expect(true).to.be.true; + true.should.be.true; expect(false).to.not.be.true; + false.should.not.be.true; expect(1).to.not.be.true; + (1).should.not.be.true; err(() => { expect('test').to.be.true; + 'test'.should.be.true; }, 'expected \'test\' to be true'); } function ok() { expect(true).to.be.ok; + true.should.be.ok; expect(false).to.not.be.ok; + false.should.not.be.ok; expect(1).to.be.ok; + (1).should.be.ok; expect(0).to.not.be.ok; + (0).should.not.be.ok; err(() => { expect('').to.be.ok; + ''.should.be.ok; }, 'expected \'\' to be truthy'); err(() => { expect('test').to.not.be.ok; + 'test'.should.not.be.ok; }, 'expected \'test\' to be falsy'); } function _false() { expect(false).to.be.false; + false.should.be.false; expect(true).to.not.be.false; + true.should.not.be.false; expect(0).to.not.be.false; + (0).should.not.be.false; err(() => { expect('').to.be.false; + ''.should.be.false; }, 'expected \'\' to be false'); } function _null() { expect(null).to.be.null; + should.equal(null, null); expect(false).to.not.be.null; + false.should.not.be.null; err(() => { expect('').to.be.null; + ''.should.be.null; }, 'expected \'\' to be null'); } function _undefined() { expect(undefined).to.be.undefined; + should.equal(undefined, undefined); expect(null).to.not.be.undefined; + should.not.equal(null, undefined); err(() => { expect('').to.be.undefined; + ''.should.be.undefined; }, 'expected \'\' to be undefined'); } function exist() { var foo = 'bar'; expect(foo).to.exist; + should.exist(foo); expect(void(0)).to.not.exist; + should.not.exist(void (0)); } function arguments() { var args = arguments; expect(args).to.be.arguments; + args.should.be.arguments; expect([]).to.not.be.arguments; + [].should.not.be.arguments; expect(args).to.be.an('arguments').and.be.arguments; + args.should.be.an('arguments').and.be.arguments; expect([]).to.be.an('array').and.not.be.Arguments; + [].should.be.an('array').and.not.be.Arguments; } function equal() { expect(undefined).to.equal(void(0)); + should.equal(undefined, void(0)); } function _typeof() { expect('test').to.be.a('string'); + 'test'.should.be.a('string'); err(() => { expect('test').to.not.be.a('string'); + 'test'.should.not.be.a('string'); }, 'expected \'test\' not to be a string'); expect(arguments).to.be.an('arguments'); + arguments.should.be.an('arguments'); expect(5).to.be.a('number'); + (5).should.be.a('number'); + expect(new Number(1)).to.be.a('number'); + (new Number(1)).should.be.a('number'); expect(Number(1)).to.be.a('number'); + Number(1).should.be.a('number'); expect(true).to.be.a('boolean'); + true.should.be.a('boolean'); expect(new Array()).to.be.a('array'); + (new Array()).should.be.a('array'); expect(new Object()).to.be.a('object'); + (new Object()).should.be.a('object'); expect({}).to.be.a('object'); + ({}).should.be.a('object'); expect([]).to.be.a('array'); + [].should.be.a('array'); expect(() => { }).to.be.a('function'); + (() => { }).should.be.a('function'); expect(null).to.be.a('null'); + // N.B. previous line has no should equivalent err(() => { expect(5).to.not.be.a('number', 'blah'); + (5).should.not.be.a('number', 'blah'); }, 'blah: expected 5 not to be a number'); } class Foo { } function _instanceof() { expect(new Foo()).to.be.an.instanceof(Foo); + (new Foo()).should.be.an.instanceof(Foo); err(() => { expect(3).to.an.instanceof(Foo, 'blah'); + (3).should.an.instanceof(Foo, 'blah'); }, 'blah: expected 3 to be an instance of Foo'); } function within() { expect(5).to.be.within(5, 10); + (5).should.be.within(5, 10); expect(5).to.be.within(3, 6); + (5).should.be.within(3, 6); expect(5).to.be.within(3, 5); + (5).should.be.within(3, 5); expect(5).to.not.be.within(1, 3); + (5).should.not.be.within(1, 3); expect('foo').to.have.length.within(2, 4); + 'foo'.should.have.length.within(2, 4); expect([1, 2, 3]).to.have.length.within(2, 4); + [1, 2, 3].should.have.length.within(2, 4); err(() => { expect(5).to.not.be.within(4, 6, 'blah'); + (5).should.not.be.within(4, 6, 'blah'); }, 'blah: expected 5 to not be within 4..6', 'blah'); err(() => { expect(10).to.be.within(50, 100, 'blah'); + (10).should.be.within(50, 100, 'blah'); }, 'blah: expected 10 to be within 50..100'); err(() => { expect('foo').to.have.length.within(5, 7, 'blah'); + 'foo'.should.have.length.within(5, 7, 'blah'); }, 'blah: expected \'foo\' to have a length within 5..7'); err(() => { expect([1, 2, 3]).to.have.length.within(5, 7, 'blah'); + [1, 2, 3].should.have.length.within(5, 7, 'blah'); }, 'blah: expected [ 1, 2, 3 ] to have a length within 5..7'); } function above() { expect(5).to.be.above(2); + (5).should.be.above(2); expect(5).to.be.greaterThan(2); + (5).should.be.greaterThan(2); expect(5).to.not.be.above(5); + (5).should.not.be.above(5); expect(5).to.not.be.above(6); + (5).should.not.be.above(6); expect('foo').to.have.length.above(2); + 'foo'.should.have.length.above(2); expect([1, 2, 3]).to.have.length.above(2); + [1, 2, 3].should.have.length.above(2); err(() => { expect(5).to.be.above(6, 'blah'); + (5).should.be.above(6, 'blah'); }, 'blah: expected 5 to be above 6', 'blah'); err(() => { expect(10).to.not.be.above(6, 'blah'); + (10).should.not.be.above(6, 'blah'); }, 'blah: expected 10 to be at most 6'); err(() => { expect('foo').to.have.length.above(4, 'blah'); + 'foo'.should.have.length.above(4, 'blah'); }, 'blah: expected \'foo\' to have a length above 4 but got 3'); err(() => { expect([1, 2, 3]).to.have.length.above(4, 'blah'); + [1, 2, 3].should.have.length.above(4, 'blah'); }, 'blah: expected [ 1, 2, 3 ] to have a length above 4 but got 3'); } function least() { expect(5).to.be.at.least(2); + (5).should.be.at.least(2); expect(5).to.be.at.least(5); + (5).should.be.at.least(5); expect(5).to.not.be.at.least(6); + (5).should.not.be.at.least(6); expect('foo').to.have.length.of.at.least(2); + 'foo'.should.have.length.of.at.least(2); expect([1, 2, 3]).to.have.length.of.at.least(2); + [1, 2, 3].should.have.length.of.at.least(2); err(() => { expect(5).to.be.at.least(6, 'blah'); + (5).should.be.at.least(6, 'blah'); }, 'blah: expected 5 to be at least 6', 'blah'); err(() => { expect(10).to.not.be.at.least(6, 'blah'); + (10).should.not.be.at.least(6, 'blah'); }, 'blah: expected 10 to be below 6'); err(() => { expect('foo').to.have.length.of.at.least(4, 'blah'); + 'foo'.should.have.length.of.at.least(4, 'blah'); }, 'blah: expected \'foo\' to have a length at least 4 but got 3'); err(() => { expect([1, 2, 3]).to.have.length.of.at.least(4, 'blah'); + [1, 2, 3].should.have.length.of.at.least(4, 'blah'); }, 'blah: expected [ 1, 2, 3 ] to have a length at least 4 but got 3'); err(() => { expect([1, 2, 3, 4]).to.not.have.length.of.at.least(4, 'blah'); + [1, 2, 3, 4].should.not.have.length.of.at.least(4, 'blah'); }, 'blah: expected [ 1, 2, 3, 4 ] to have a length below 4'); } function below() { expect(2).to.be.below(5); + (2).should.be.below(5); expect(2).to.be.lessThan(5); + (2).should.be.lessThan(5); expect(2).to.not.be.below(2); + (2).should.not.be.below(2); expect(2).to.not.be.below(1); + (2).should.not.be.below(1); expect('foo').to.have.length.below(4); + 'foo'.should.have.length.below(4); expect([1, 2, 3]).to.have.length.below(4); + [1, 2, 3].should.have.length.below(4); err(() => { expect(6).to.be.below(5, 'blah'); + (6).should.be.below(5, 'blah'); }, 'blah: expected 6 to be below 5'); err(() => { expect(6).to.not.be.below(10, 'blah'); + (6).should.not.be.below(10, 'blah'); }, 'blah: expected 6 to be at least 10'); err(() => { expect('foo').to.have.length.below(2, 'blah'); + 'foo'.should.have.length.below(2, 'blah'); }, 'blah: expected \'foo\' to have a length below 2 but got 3'); err(() => { expect([1, 2, 3]).to.have.length.below(2, 'blah'); + [1, 2, 3].should.have.length.below(2, 'blah'); }, 'blah: expected [ 1, 2, 3 ] to have a length below 2 but got 3'); } function most() { expect(2).to.be.at.most(5); + (2).should.be.at.most(5); expect(2).to.be.at.most(2); + (2).should.be.at.most(2); expect(2).to.not.be.at.most(1); + (2).should.not.be.at.most(1); expect(2).to.not.be.at.most(1); + (2).should.not.be.at.most(1); expect('foo').to.have.length.of.at.most(4); + 'foo'.should.have.length.of.at.most(4); expect([1, 2, 3]).to.have.length.of.at.most(4); + [1, 2, 3].should.have.length.of.at.most(4); err(() => { expect(6).to.be.at.most(5, 'blah'); + (6).should.be.at.most(5, 'blah'); }, 'blah: expected 6 to be at most 5'); err(() => { expect(6).to.not.be.at.most(10, 'blah'); + (6).should.not.be.at.most(10, 'blah'); }, 'blah: expected 6 to be above 10'); err(() => { expect('foo').to.have.length.of.at.most(2, 'blah'); + 'foo'.should.have.length.of.at.most(2, 'blah'); }, 'blah: expected \'foo\' to have a length at most 2 but got 3'); err(() => { expect([1, 2, 3]).to.have.length.of.at.most(2, 'blah'); + [1, 2, 3].should.have.length.of.at.most(2, 'blah'); }, 'blah: expected [ 1, 2, 3 ] to have a length at most 2 but got 3'); err(() => { expect([1, 2]).to.not.have.length.of.at.most(2, 'blah'); + [1, 2].should.not.have.length.of.at.most(2, 'blah'); }, 'blah: expected [ 1, 2 ] to have a length above 2'); } function match() { expect('foobar').to.match(/^foo/); + 'foobar'.should.match(/^foo/); expect('foobar').to.not.match(/^bar/); + 'foobar'.should.not.match(/^bar/); err(() => { expect('foobar').to.match(/^bar/i, 'blah'); + 'foobar'.should.match(/^bar/i, 'blah'); }, 'blah: expected \'foobar\' to match /^bar/i'); err(() => { expect('foobar').to.not.match(/^foo/i, 'blah'); + 'foobar'.should.not.match(/^foo/i, 'blah'); }, 'blah: expected \'foobar\' not to match /^foo/i'); } function length2() { expect('test').to.have.length(4); + 'test'.should.have.length(4); expect('test').to.not.have.length(3); + 'test'.should.not.have.length(3); expect([1, 2, 3]).to.have.length(3); + [1, 2, 3].should.have.length(3); err(() => { expect(4).to.have.length(3, 'blah'); + (4).should.have.length(3, 'blah'); }, 'blah: expected 4 to have a property \'length\''); err(() => { expect('asd').to.not.have.length(3, 'blah'); + 'asd'.should.not.have.length(3, 'blah'); }, 'blah: expected \'asd\' to not have a length of 3'); } function eql() { expect('test').to.eql('test'); + 'test'.should.eql('test'); expect({ foo: 'bar' }).to.eql({ foo: 'bar' }); + ({ foo: 'bar' }).should.eql({ foo: 'bar' }); expect(1).to.eql(1); + (1).should.eql(1); expect('4').to.not.eql(4); + '4'.should.not.eql(4); err(() => { expect(4).to.eql(3, 'blah'); + (4).should.eql(3, 'blah'); }, 'blah: expected 4 to deeply equal 3'); } @@ -298,39 +424,54 @@ class Buffer { } function buffer() { expect(new Buffer([1])).to.eql(new Buffer([1])); + (new Buffer([1])).should.eql(new Buffer([1])); err(() => { expect(new Buffer([0])).to.eql(new Buffer([1])); + (new Buffer([0])).should.eql(new Buffer([1])); }, 'expected to deeply equal '); } function equal2() { expect('test').to.equal('test'); + 'test'.should.equal('test'); + should.equal('test', 'test'); expect(1).to.equal(1); + (1).should.equal(1); + should.equal(1, 1); err(() => { expect(4).to.equal(3, 'blah'); + (4).should.equal(3, 'blah'); + should.equal(4, 3, 'blah'); }, 'blah: expected 4 to equal 3'); err(() => { expect('4').to.equal(4, 'blah'); + '4'.should.equal(4, 'blah'); + should.equal(4, 4, 'blah'); }, 'blah: expected \'4\' to equal 4'); } function deepEqual() { expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' }); + ({ foo: 'bar' }).should.deep.equal({ foo: 'bar' }); expect({ foo: 'bar' }).not.to.deep.equal({ foo: 'baz' }); } function deepEqual2() { expect(/a/).to.deep.equal(/a/); + /a/.should.deep.equal(/a/); expect(/a/).not.to.deep.equal(/b/); expect(/a/).not.to.deep.equal({}); expect(/a/g).to.deep.equal(/a/g); + /a/g.should.deep.equal(/a/g); expect(/a/g).not.to.deep.equal(/b/g); expect(/a/i).to.deep.equal(/a/i); + /a/i.should.deep.equal(/a/i); expect(/a/i).not.to.deep.equal(/b/i); expect(/a/m).to.deep.equal(/a/m); + /a/m.should.deep.equal(/a/m); expect(/a/m).not.to.deep.equal(/b/m); } @@ -339,13 +480,18 @@ function deepEqual3() { var a = new Date(1, 2, 3); var b = new Date(4, 5, 6); expect(a).to.deep.equal(a); + a.should.deep.equal(a); expect(a).not.to.deep.equal(b); + a.should.not.deep.equal(b); expect(a).not.to.deep.equal({}); + a.should.not.deep.equal({}); } function deepInclude() { expect(['foo', 'bar']).to.deep.include(['bar', 'foo']); + ['foo', 'bar'].should.deep.include(['bar', 'foo']); expect(['foo', 'bar']).not.to.deep.equal(['foo', 'baz' ]); + ['foo', 'bar'].should.not.deep.equal(['foo', 'baz' ]); } class FakeArgs { @@ -356,239 +502,332 @@ function empty() { FakeArgs.prototype.length = 0; expect('').to.be.empty; + + ''.should.be.empty; expect('foo').not.to.be.empty; + 'foo'.should.not.be.empty; expect([]).to.be.empty; + [].should.be.empty; expect(['foo']).not.to.be.empty; + ['foo'].should.not.be.empty; expect(new FakeArgs).to.be.empty; + (new FakeArgs).should.be.empty; expect({ arguments: 0 }).not.to.be.empty; + ({ arguments: 0 }).should.not.be.empty; expect({}).to.be.empty; + ({}).should.be.empty; expect({ foo: 'bar' }).not.to.be.empty; + ({ foo: 'bar' }).should.not.be.empty; err(() => { expect('').not.to.be.empty; + ''.should.not.be.empty; }, 'expected \'\' not to be empty'); err(() => { expect('foo').to.be.empty; + 'foo'.should.be.empty; + 'foo'.should.be.empty; }, 'expected \'foo\' to be empty'); err(() => { expect([]).not.to.be.empty; + [].should.not.be.empty; }, 'expected [] not to be empty'); err(() => { expect(['foo']).to.be.empty; + ['foo'].should.be.empty; }, 'expected [ \'foo\' ] to be empty'); err(() => { expect(new FakeArgs).not.to.be.empty; + (new FakeArgs).should.not.be.empty; }, 'expected { length: 0 } not to be empty'); err(() => { expect({ arguments: 0 }).to.be.empty; + ({ arguments: 0 }).should.be.empty; }, 'expected { arguments: 0 } to be empty'); err(() => { expect({}).not.to.be.empty; + ({}).should.not.be.empty; }, 'expected {} not to be empty'); err(() => { expect({ foo: 'bar' }).to.be.empty; + ({ foo: 'bar' }).should.be.empty; }, 'expected { foo: \'bar\' } to be empty'); } function property() { expect('test').to.have.property('length'); + 'test'.should.have.property('length'); expect(4).to.not.have.property('length'); + (4).should.not.have.property('length'); expect({ 'foo.bar': 'baz' }) .to.have.property('foo.bar'); + ({ 'foo.bar': 'baz' }).should.have.property('foo.bar'); expect({ foo: { bar: 'baz' } }) .to.not.have.property('foo.bar'); + ({ foo: { bar: 'baz' } }).should.not.have.property('foo.bar'); err(() => { expect('asd').to.have.property('foo'); + 'asd'.should.have.property('foo'); }, 'expected \'asd\' to have a property \'foo\''); err(() => { expect({ foo: { bar: 'baz' } }) .to.have.property('foo.bar'); + ({ foo: { bar: 'baz' } }).should.have.property('foo.bar'); }, 'expected { foo: { bar: \'baz\' } } to have a property \'foo.bar\''); } function deepProperty() { expect({ 'foo.bar': 'baz' }) .to.not.have.deep.property('foo.bar'); + ({ 'foo.bar': 'baz' }).should + .not.have.deep.property('foo.bar'); expect({ foo: { bar: 'baz' } }) .to.have.deep.property('foo.bar'); + ({ foo: { bar: 'baz' } }).should + .have.deep.property('foo.bar'); err(() => { expect({ 'foo.bar': 'baz' }) .to.have.deep.property('foo.bar'); + ({ 'foo.bar': 'baz' }).should + .have.deep.property('foo.bar'); }, 'expected { \'foo.bar\': \'baz\' } to have a deep property \'foo.bar\''); } function property2() { expect('test').to.have.property('length', 4); + 'test'.should.have.property('length', 4); expect('asd').to.have.property('constructor', String); + 'asd'.should.have.property('constructor', String); err(() => { expect('asd').to.have.property('length', 4, 'blah'); + 'asd'.should.have.property('length', 4, 'blah'); }, 'blah: expected \'asd\' to have a property \'length\' of 4, but got 3'); err(() => { expect('asd').to.not.have.property('length', 3, 'blah'); + 'asd'.should.not.have.property('length', 3, 'blah'); }, 'blah: expected \'asd\' to not have a property \'length\' of 3'); err(() => { expect('asd').to.not.have.property('foo', 3, 'blah'); + 'asd'.should.not.have.property('foo', 3, 'blah'); }, 'blah: \'asd\' has no property \'foo\''); err(() => { expect('asd').to.have.property('constructor', Number, 'blah'); + 'asd'.should.have.property('constructor', Number, 'blah'); }, 'blah: expected \'asd\' to have a property \'constructor\' of [Function: Number], but got [Function: String]'); } function deepProperty2() { expect({ foo: { bar: 'baz' } }) .to.have.deep.property('foo.bar', 'baz'); + ({ foo: { bar: 'baz' } }).should + .have.deep.property('foo.bar', 'baz'); err(() => { expect({ foo: { bar: 'baz' } }) .to.have.deep.property('foo.bar', 'quux', 'blah'); + ({ foo: { bar: 'baz' } }).should + .have.deep.property('foo.bar', 'quux', 'blah'); }, 'blah: expected { foo: { bar: \'baz\' } } to have a deep property \'foo.bar\' of \'quux\', but got \'baz\''); err(() => { expect({ foo: { bar: 'baz' } }) .to.not.have.deep.property('foo.bar', 'baz', 'blah'); + ({ foo: { bar: 'baz' } }).should + .not.have.deep.property('foo.bar', 'baz', 'blah'); }, 'blah: expected { foo: { bar: \'baz\' } } to not have a deep property \'foo.bar\' of \'baz\''); err(() => { expect({ foo: 5 }) .to.not.have.deep.property('foo.bar', 'baz', 'blah'); + ({ foo: 5 }).should + .not.have.deep.property('foo.bar', 'baz', 'blah'); }, 'blah: { foo: 5 } has no deep property \'foo.bar\''); } function ownProperty() { expect('test').to.have.ownProperty('length'); + 'test'.should.have.ownProperty('length'); expect('test').to.haveOwnProperty('length'); + 'test'.should.haveOwnProperty('length'); expect({ length: 12 }).to.have.ownProperty('length'); + ({ length: 12 }).should.have.ownProperty('length'); err(() => { expect({ length: 12 }).to.not.have.ownProperty('length', 'blah'); + ({ length: 12 }).should.not.have.ownProperty('length', 'blah'); }, 'blah: expected { length: 12 } to not have own property \'length\''); } function string() { expect('foobar').to.have.string('bar'); + 'foobar'.should.have.string('bar'); expect('foobar').to.have.string('foo'); + 'foobar'.should.have.string('foo'); expect('foobar').to.not.have.string('baz'); + 'foobar'.should.not.have.string('baz'); err(() => { expect(3).to.have.string('baz'); + (3).should.have.string('baz'); }, 'expected 3 to be a string'); err(() => { expect('foobar').to.have.string('baz', 'blah'); + 'foobar'.should.have.string('baz', 'blah'); }, 'blah: expected \'foobar\' to contain \'baz\''); err(() => { expect('foobar').to.not.have.string('bar', 'blah'); + 'foobar'.should.not.have.string('bar', 'blah'); }, 'blah: expected \'foobar\' to not contain \'bar\''); } function include() { expect(['foo', 'bar']).to.include('foo'); + ['foo', 'bar'].should.include('foo'); expect(['foo', 'bar']).to.include('foo'); + ['foo', 'bar'].should.include('foo'); expect(['foo', 'bar']).to.include('bar'); + ['foo', 'bar'].should.include('bar'); expect([1, 2]).to.include(1); + [1, 2].should.include(1); expect(['foo', 'bar']).to.not.include('baz'); + ['foo', 'bar'].should.not.include('baz'); expect(['foo', 'bar']).to.not.include(1); + ['foo', 'bar'].should.not.include(1); err(() => { expect(['foo']).to.include('bar', 'blah'); + ['foo'].should.include('bar', 'blah'); }, 'blah: expected [ \'foo\' ] to include \'bar\''); err(() => { expect(['bar', 'foo']).to.not.include('foo', 'blah'); + ['bar', 'foo'].should.not.include('foo', 'blah'); }, 'blah: expected [ \'bar\', \'foo\' ] to not include \'foo\''); } function keys() { expect({ foo: 1 }).to.have.keys(['foo']); + ({ foo: 1 }).should.have.keys(['foo']); expect({ foo: 1, bar: 2 }).to.have.keys(['foo', 'bar']); + ({ foo: 1, bar: 2 }).should.have.keys(['foo', 'bar']); expect({ foo: 1, bar: 2 }).to.have.keys('foo', 'bar'); + ({ foo: 1, bar: 2 }).should.have.keys('foo', 'bar'); expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('foo', 'bar'); + ({ foo: 1, bar: 2, baz: 3 }).should.contain.keys('foo', 'bar'); expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('bar', 'foo'); + ({ foo: 1, bar: 2, baz: 3 }).should.contain.keys('bar', 'foo'); expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('baz'); + ({ foo: 1, bar: 2, baz: 3 }).should.contain.keys('baz'); expect({ foo: 1, bar: 2 }).to.contain.keys('foo'); + ({ foo: 1, bar: 2 }).should.contain.keys('foo'); expect({ foo: 1, bar: 2 }).to.contain.keys('bar', 'foo'); + ({ foo: 1, bar: 2 }).should.contain.keys('bar', 'foo'); expect({ foo: 1, bar: 2 }).to.contain.keys(['foo']); + ({ foo: 1, bar: 2 }).should.contain.keys(['foo']); expect({ foo: 1, bar: 2 }).to.contain.keys(['bar']); + ({ foo: 1, bar: 2 }).should.contain.keys(['bar']); expect({ foo: 1, bar: 2 }).to.contain.keys(['bar', 'foo']); + ({ foo: 1, bar: 2 }).should.contain.keys(['bar', 'foo']); expect({ foo: 1, bar: 2 }).to.not.have.keys('baz'); + ({ foo: 1, bar: 2 }).should.not.have.keys('baz'); expect({ foo: 1, bar: 2 }).to.not.have.keys('foo', 'baz'); + ({ foo: 1, bar: 2 }).should.not.have.keys('foo', 'baz'); expect({ foo: 1, bar: 2 }).to.not.contain.keys('baz'); + ({ foo: 1, bar: 2 }).should.not.contain.keys('baz'); expect({ foo: 1, bar: 2 }).to.not.contain.keys('foo', 'baz'); + ({ foo: 1, bar: 2 }).should.not.contain.keys('foo', 'baz'); expect({ foo: 1, bar: 2 }).to.not.contain.keys('baz', 'foo'); + ({ foo: 1, bar: 2 }).should.not.contain.keys('baz', 'foo'); err(() => { expect({ foo: 1 }).to.have.keys(); + ({ foo: 1 }).should.have.keys(); }, 'keys required'); err(() => { expect({ foo: 1 }).to.have.keys([]); + ({ foo: 1 }).should.have.keys([]); }, 'keys required'); err(() => { expect({ foo: 1 }).to.not.have.keys([]); + ({ foo: 1 }).should.not.have.keys([]); }, 'keys required'); err(() => { expect({ foo: 1 }).to.contain.keys([]); + ({ foo: 1 }).should.contain.keys([]); }, 'keys required'); err(() => { expect({ foo: 1 }).to.have.keys(['bar']); + ({ foo: 1 }).should.have.keys(['bar']); }, 'expected { foo: 1 } to have key \'bar\''); err(() => { expect({ foo: 1 }).to.have.keys(['bar', 'baz']); + ({ foo: 1 }).should.have.keys(['bar', 'baz']); }, 'expected { foo: 1 } to have keys \'bar\', and \'baz\''); err(() => { expect({ foo: 1 }).to.have.keys(['foo', 'bar', 'baz']); + ({ foo: 1 }).should.have.keys(['foo', 'bar', 'baz']); }, 'expected { foo: 1 } to have keys \'foo\', \'bar\', and \'baz\''); err(() => { expect({ foo: 1 }).to.not.have.keys(['foo']); + ({ foo: 1 }).should.not.have.keys(['foo']); }, 'expected { foo: 1 } to not have key \'foo\''); err(() => { expect({ foo: 1 }).to.not.have.keys(['foo']); + ({ foo: 1 }).should.not.have.keys(['foo']); }, 'expected { foo: 1 } to not have key \'foo\''); err(() => { expect({ foo: 1, bar: 2 }).to.not.have.keys(['foo', 'bar']); + ({ foo: 1, bar: 2 }).should.not.have.keys(['foo', 'bar']); }, 'expected { foo: 1, bar: 2 } to not have keys \'foo\', and \'bar\''); err(() => { expect({ foo: 1 }).to.not.contain.keys(['foo']); + ({ foo: 1 }).should.not.contain.keys(['foo']); }, 'expected { foo: 1 } to not contain key \'foo\''); err(() => { expect({ foo: 1 }).to.contain.keys('foo', 'bar'); + ({ foo: 1 }).should.contain.keys('foo', 'bar'); }, 'expected { foo: 1 } to contain keys \'foo\', and \'bar\''); } function chaining() { var tea = { name: 'chai', extras: ['milk', 'sugar', 'smile'] }; expect(tea).to.have.property('extras').with.lengthOf(3); + tea.should.have.property('extras').with.lengthOf(3); err(() => { expect(tea).to.have.property('extras').with.lengthOf(4); + tea.should.have.property('extras').with.lengthOf(4); }, 'expected [ \'milk\', \'sugar\', \'smile\' ] to have a length of 4 but got 3'); expect(tea).to.be.a('object').and.have.property('name', 'chai'); + tea.should.be.a('object').and.have.property('name', 'chai'); } class PoorlyConstructedError {} @@ -607,97 +846,180 @@ function _throw() { , specificErrFn = () => { throw specificError; }; expect(goodFn).to.not.throw(); + goodFn.should.not.throw(); + should.not.throw(goodFn); expect(goodFn).to.not.throw(Error); + goodFn.should.not.throw(Error); + should.not.throw(goodFn, Error); expect(goodFn).to.not.throw(specificError); + goodFn.should.not.throw(specificError); + should.not.throw(goodFn, specificError); + expect(badFn).to.throw(); + badFn.should.throw(); + should.throw(badFn); expect(badFn).to.throw(Error); + badFn.should.throw(Error); + should.throw(badFn, Error); expect(badFn).to.not.throw(ReferenceError); + badFn.should.not.throw(ReferenceError); + should.not.throw(badFn, ReferenceError); expect(badFn).to.not.throw(specificError); + badFn.should.not.throw(specificError); + should.not.throw(badFn, specificError); + expect(refErrFn).to.throw(); + refErrFn.should.throw(); + should.throw(refErrFn); expect(refErrFn).to.throw(ReferenceError); + refErrFn.should.throw(ReferenceError); + should.throw(refErrFn, ReferenceError); expect(refErrFn).to.throw(Error); + refErrFn.should.throw(Error); + should.throw(refErrFn, Error); expect(refErrFn).to.not.throw(TypeError); + refErrFn.should.not.throw(TypeError); + should.not.throw(refErrFn, TypeError); expect(refErrFn).to.not.throw(specificError); + refErrFn.should.not.throw(specificError); + should.not.throw(refErrFn, specificError); + expect(ickyErrFn).to.throw(); + ickyErrFn.should.throw(); + should.throw(ickyErrFn); expect(ickyErrFn).to.throw(PoorlyConstructedError); + ickyErrFn.should.throw(PoorlyConstructedError); + should.throw(ickyErrFn, PoorlyConstructedError); expect(ickyErrFn).to.throw(Error); + ickyErrFn.should.throw(Error); + should.throw(ickyErrFn, Error); expect(ickyErrFn).to.not.throw(specificError); + ickyErrFn.should.not.throw(specificError); + should.not.throw(ickyErrFn, specificError); expect(specificErrFn).to.throw(specificError); + specificErrFn.should.throw(specificError); + should.throw(ickyErrFn, specificError); expect(badFn).to.throw(/testing/); + badFn.should.throw(/testing/); + should.throw(badFn, /testing/); expect(badFn).to.not.throw(/hello/); + badFn.should.not.throw(/hello/); + should.not.throw(badFn, /hello/); expect(badFn).to.throw('testing'); + badFn.should.throw('testing'); + should.throw(badFn, 'testing'); expect(badFn).to.not.throw('hello'); + badFn.should.not.throw('hello'); + should.not.throw(badFn, 'hello'); expect(badFn).to.throw(Error, /testing/); + badFn.should.throw(Error, /testing/); + should.throw(badFn, Error, /testing/); expect(badFn).to.throw(Error, 'testing'); + badFn.should.throw(Error, 'testing'); + should.throw(badFn, Error, 'testing'); err(() => { expect(goodFn).to.throw(); + goodFn.should.throw(); + should.throw(goodFn); }, 'expected [Function] to throw an error'); err(() => { expect(goodFn).to.throw(ReferenceError); + goodFn.should.throw(ReferenceError); + should.throw(goodFn, ReferenceError); }, 'expected [Function] to throw ReferenceError'); err(() => { expect(goodFn).to.throw(specificError); + goodFn.should.throw(specificError); + should.throw(goodFn, specificError); }, 'expected [Function] to throw [RangeError: boo]'); err(() => { expect(badFn).to.not.throw(); + badFn.should.not.throw(); + should.not.throw(badFn); }, 'expected [Function] to not throw an error but [Error: testing] was thrown'); err(() => { expect(badFn).to.throw(ReferenceError); + badFn.should.throw(ReferenceError); + should.throw(badFn, ReferenceError); }, 'expected [Function] to throw \'ReferenceError\' but [Error: testing] was thrown'); err(() => { expect(badFn).to.throw(specificError); + badFn.should.throw(specificError); + should.throw(badFn, specificError); }, 'expected [Function] to throw [RangeError: boo] but [Error: testing] was thrown'); err(() => { expect(badFn).to.not.throw(Error); + badFn.should.not.throw(Error); + should.not.throw(badFn, Error); }, 'expected [Function] to not throw \'Error\' but [Error: testing] was thrown'); err(() => { expect(refErrFn).to.not.throw(ReferenceError); + refErrFn.should.not.throw(ReferenceError); + should.not.throw(refErrFn, ReferenceError); }, 'expected [Function] to not throw \'ReferenceError\' but [ReferenceError: hello] was thrown'); err(() => { expect(badFn).to.throw(PoorlyConstructedError); + badFn.should.throw(PoorlyConstructedError); + should.throw(badFn, PoorlyConstructedError); }, 'expected [Function] to throw \'PoorlyConstructedError\' but [Error: testing] was thrown'); err(() => { expect(ickyErrFn).to.not.throw(PoorlyConstructedError); + ickyErrFn.should.not.throw(PoorlyConstructedError); + should.not.throw(ickyErrFn, PoorlyConstructedError); }, /^(expected \[Function\] to not throw 'PoorlyConstructedError' but)(.*)(PoorlyConstructedError|\{ Object \()(.*)(was thrown)$/); err(() => { expect(ickyErrFn).to.throw(ReferenceError); + ickyErrFn.should.throw(ReferenceError); + should.throw(ickyErrFn, ReferenceError); }, /^(expected \[Function\] to throw 'ReferenceError' but)(.*)(PoorlyConstructedError|\{ Object \()(.*)(was thrown)$/); err(() => { expect(specificErrFn).to.throw(new ReferenceError('eek')); + specificErrFn.should.throw(new ReferenceError('eek')); + should.throw(specificErrFn, new ReferenceError('eek')); }, 'expected [Function] to throw [ReferenceError: eek] but [RangeError: boo] was thrown'); err(() => { expect(specificErrFn).to.not.throw(specificError); + specificErrFn.should.not.throw(specificError); + should.not.throw(specificErrFn, specificError); }, 'expected [Function] to not throw [RangeError: boo]'); err(() => { expect(badFn).to.not.throw(/testing/); + badFn.should.not.throw(/testing/); + should.not.throw(badFn, /testing/); }, 'expected [Function] to throw error not matching /testing/'); err(() => { expect(badFn).to.throw(/hello/); + badFn.should.throw(/hello/); + should.throw(badFn, /hello/); }, 'expected [Function] to throw error matching /hello/ but got \'testing\''); err(() => { expect(badFn).to.throw(Error, /hello/, 'blah'); + badFn.should.throw(Error, /hello/, 'blah'); + should.throw(badFn, Error, /hello/, 'blah'); }, 'blah: expected [Function] to throw error matching /hello/ but got \'testing\''); err(() => { expect(badFn).to.throw(Error, 'hello', 'blah'); + badFn.should.throw(Error, 'hello', 'blah'); + should.throw(badFn, Error, 'hello', 'blah'); }, 'blah: expected [Function] to throw error including \'hello\' but got \'testing\''); } @@ -712,18 +1034,23 @@ function respondTo() { var bar = {}; expect(Foo).to.respondTo('bar'); + Foo.should.respondTo('bar'); expect(Foo).to.not.respondTo('foo'); + Foo.should.not.respondTo('foo'); expect(Foo).itself.to.respondTo('func'); expect(Foo).itself.not.to.respondTo('bar'); expect(bar).to.respondTo('foo'); + bar.should.respondTo('foo'); err(() => { expect(Foo).to.respondTo('baz', 'constructor'); + Foo.should.respondTo('baz', 'constructor'); }, /^(constructor: expected)(.*)(\[Function: Foo\])(.*)(to respond to \'baz\')$/); err(() => { expect(bar).to.respondTo('baz', 'object'); + bar.should.respondTo('baz', 'object'); }, /^(object: expected)(.*)(\{ foo: \[Function\] \}|\{ Object \()(.*)(to respond to \'baz\')$/); } @@ -733,43 +1060,62 @@ function satisfy() { } expect(1).to.satisfy(matcher); + (1).should.satisfy(matcher); err(() => { expect(2).to.satisfy(matcher, 'blah'); + (2).should.satisfy(matcher, 'blah'); }, 'blah: expected 2 to satisfy [Function: matcher]'); } function closeTo() { expect(1.5).to.be.closeTo(1.0, 0.5); + (1.5).should.be.closeTo(1.0, 0.5); expect(10).to.be.closeTo(20, 20); + (10).should.be.closeTo(20, 20); expect(-10).to.be.closeTo(20, 30); + (-10).should.be.closeTo(20, 30); err(() => { expect(2).to.be.closeTo(1.0, 0.5, 'blah'); + (2).should.be.closeTo(1.0, 0.5, 'blah'); }, 'blah: expected 2 to be close to 1 +/- 0.5'); err(() => { expect(-10).to.be.closeTo(20, 29, 'blah'); + (-10).should.be.closeTo(20, 29, 'blah'); }, 'blah: expected -10 to be close to 20 +/- 29'); } function includeMembers() { expect([1, 2, 3]).to.include.members([]); + [1, 2, 3].should.include.members([]); expect([1, 2, 3]).to.include.members([3, 2]); + [1, 2, 3].should.include.members([3, 2]); + expect([1, 2, 3]).to.not.include.members([8, 4]); + [1, 2, 3].should.not.include.members([8, 4]); + expect([1, 2, 3]).to.not.include.members([1, 2, 3, 4]); + + [1, 2, 3].should.not.include.members([1, 2, 3, 4]); } function sameMembers() { expect([5, 4]).to.have.same.members([4, 5]); + [5, 4].should.have.same.members([4, 5]); expect([5, 4]).to.have.same.members([5, 4]); + [5, 4].should.have.same.members([5, 4]); expect([5, 4]).to.not.have.same.members([]); + [5, 4].should.not.have.same.members([]); expect([5, 4]).to.not.have.same.members([6, 3]); + [5, 4].should.not.have.same.members([6, 3]); expect([5, 4]).to.not.have.same.members([5, 4, 2]); + [5, 4].should.not.have.same.members([5, 4, 2]); } function members() { diff --git a/chai/chai.d.ts b/chai/chai.d.ts index 1134b137d..f693582c5 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -1,12 +1,15 @@ // Type definitions for chai 2.0.0 // Project: http://chaijs.com/ -// Definitions by: Jed Mao , Bart van der Schoor +// Definitions by: Jed Mao , +// Bart van der Schoor , +// Andrew Brown // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module Chai { interface ChaiStatic { expect: ExpectStatic; + should(): Should; /** * Provides a way to extend the internals of Chai */ @@ -25,6 +28,24 @@ declare module Chai { (target: any, message?: string): Assertion; } + interface ShouldAssertion { + equal(value1: any, value2: any, message?: string): void; + Throw: ShouldThrow; + throw: ShouldThrow; + exist(value: any, message?: string): void; + } + + interface Should extends ShouldAssertion { + not: ShouldAssertion; + fail(actual: any, expected: any, message?: string, operator?: string): void; + } + + interface ShouldThrow { + (actual: Function): void; + (actual: Function, expected: string|RegExp, message?: string): void; + (actual: Function, constructor: Error|Function, expected?: string|RegExp, message?: string): void; + } + interface Assertion extends LanguageChains, NumericComparison, TypeComparison { not: Assertion; deep: Deep; @@ -281,3 +302,7 @@ declare var chai: Chai.ChaiStatic; declare module "chai" { export = chai; } + +interface Object { + should: Chai.Assertion; +} From 908713394efc3c1e8e7ae131c7f7e4d6410551fb Mon Sep 17 00:00:00 2001 From: Sammy Chu Date: Wed, 20 May 2015 13:16:08 +0800 Subject: [PATCH 019/137] update moment-timezone constructor definition, to align the constructor definition of moment --- moment-timezone/moment-timezone-tests.ts | 32 ++++++++++++++++++++++-- moment-timezone/moment-timezone.d.ts | 18 +++++++++++-- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/moment-timezone/moment-timezone-tests.ts b/moment-timezone/moment-timezone-tests.ts index 6e818c742..7173b0257 100644 --- a/moment-timezone/moment-timezone-tests.ts +++ b/moment-timezone/moment-timezone-tests.ts @@ -12,14 +12,42 @@ var d = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", true, "America/Toronto" a.tz(); -var arr = [2013, 5, 1], +var num = 1367337600000, + arr = [2013, 5, 1], str = "2013-12-01", - obj = { year : 2013, month : 5, day : 1 }; + date = new Date(2013, 4, 1), + mo = moment([2013, 4, 1]), + obj = { year : 2013, month : 5, day : 1 }, + format = "YYYY-MM-DD", + formats = ["YYYY-MM-DD", "YYYY/MM/DD"], + formatsIncludingSpecial: ["YYYY-MM-DD", moment.ISO_8601], + language = "en"; +moment.tz(); moment.tz("America/Los_Angeles"); +moment.tz(num, "America/Los_Angeles"); moment.tz(arr, "America/Los_Angeles"); moment.tz(str, "America/Los_Angeles"); +moment.tz(str, format, "America/Los_Angeles"); +moment.tz(str, format, true, "America/Los_Angeles"); +moment.tz(str, format, language, "America/Los_Angeles"); +moment.tz(str, format, language, true, "America/Los_Angeles"); +moment.tz(str, formats, "America/Los_Angeles"); +moment.tz(str, formats, true, "America/Los_Angeles"); +moment.tz(str, formats, language, "America/Los_Angeles"); +moment.tz(str, formats, language, true, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, true, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, language, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, language, true, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, true, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, language, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, language, true, "America/Los_Angeles"); + +moment.tz(date, "America/Los_Angeles"); +moment.tz(mo, "America/Los_Angeles"); moment.tz(obj, "America/Los_Angeles"); moment.tz.zone('America/Los_Angeles').abbr(1403465838805); diff --git a/moment-timezone/moment-timezone.d.ts b/moment-timezone/moment-timezone.d.ts index 02d72ac2e..ef9a41142 100644 --- a/moment-timezone/moment-timezone.d.ts +++ b/moment-timezone/moment-timezone.d.ts @@ -28,11 +28,25 @@ interface MomentZone { } interface MomentTimezone { - (timezone: string): moment.Moment; (date: number, timezone: string): moment.Moment; (date: number[], timezone: string): moment.Moment; + (date: string, timezone: string): moment.Moment; (date: string, format: string, timezone: string): moment.Moment; - (date: string, format: string, useStrict: boolean, timezone: string): moment.Moment; + (date: string, format: string, strict: boolean, timezone: string): moment.Moment; + (date: string, format: string, language: string, timezone: string): moment.Moment; + (date: string, format: string, language: string, strict: boolean, timezone: string): moment.Moment; + (date: string, formats: string[], timezone: string): moment.Moment; + (date: string, formats: string[], strict: boolean, timezone: string): moment.Moment; + (date: string, formats: string[], language: string, timezone: string): moment.Moment; + (date: string, formats: string[], language: string, strict: boolean, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, strict: boolean, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, language: string, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, language: string, strict: boolean, timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], strict: boolean, timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], language: string, timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], language: string, strict: boolean, timezone: string): moment.Moment; (date: Date, timezone: string): moment.Moment; (date: moment.Moment, timezone: string): moment.Moment; (date: Object, timezone: string): moment.Moment; From 379e9c0805bca2d0361dc6e9b5206801471fd709 Mon Sep 17 00:00:00 2001 From: Sammy Chu Date: Wed, 20 May 2015 13:16:08 +0800 Subject: [PATCH 020/137] update moment-timezone constructor definition, to align the constructor definition of moment --- moment-timezone/moment-timezone-tests.ts | 32 ++++++++++++++++++++++-- moment-timezone/moment-timezone.d.ts | 18 +++++++++++-- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/moment-timezone/moment-timezone-tests.ts b/moment-timezone/moment-timezone-tests.ts index 6e818c742..b7624b63a 100644 --- a/moment-timezone/moment-timezone-tests.ts +++ b/moment-timezone/moment-timezone-tests.ts @@ -12,14 +12,42 @@ var d = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", true, "America/Toronto" a.tz(); -var arr = [2013, 5, 1], +var num = 1367337600000, + arr = [2013, 5, 1], str = "2013-12-01", - obj = { year : 2013, month : 5, day : 1 }; + date = new Date(2013, 4, 1), + mo = moment([2013, 4, 1]), + obj = { year : 2013, month : 5, day : 1 }, + format = "YYYY-MM-DD", + formats = ["YYYY-MM-DD", "YYYY/MM/DD"], + formatsIncludingSpecial = ["YYYY-MM-DD", moment.ISO_8601], + language = "en"; +moment.tz(); moment.tz("America/Los_Angeles"); +moment.tz(num, "America/Los_Angeles"); moment.tz(arr, "America/Los_Angeles"); moment.tz(str, "America/Los_Angeles"); +moment.tz(str, format, "America/Los_Angeles"); +moment.tz(str, format, true, "America/Los_Angeles"); +moment.tz(str, format, language, "America/Los_Angeles"); +moment.tz(str, format, language, true, "America/Los_Angeles"); +moment.tz(str, formats, "America/Los_Angeles"); +moment.tz(str, formats, true, "America/Los_Angeles"); +moment.tz(str, formats, language, "America/Los_Angeles"); +moment.tz(str, formats, language, true, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, true, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, language, "America/Los_Angeles"); +moment.tz(str, moment.ISO_8601, language, true, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, true, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, language, "America/Los_Angeles"); +moment.tz(str, formatsIncludingSpecial, language, true, "America/Los_Angeles"); + +moment.tz(date, "America/Los_Angeles"); +moment.tz(mo, "America/Los_Angeles"); moment.tz(obj, "America/Los_Angeles"); moment.tz.zone('America/Los_Angeles').abbr(1403465838805); diff --git a/moment-timezone/moment-timezone.d.ts b/moment-timezone/moment-timezone.d.ts index 02d72ac2e..ef9a41142 100644 --- a/moment-timezone/moment-timezone.d.ts +++ b/moment-timezone/moment-timezone.d.ts @@ -28,11 +28,25 @@ interface MomentZone { } interface MomentTimezone { - (timezone: string): moment.Moment; (date: number, timezone: string): moment.Moment; (date: number[], timezone: string): moment.Moment; + (date: string, timezone: string): moment.Moment; (date: string, format: string, timezone: string): moment.Moment; - (date: string, format: string, useStrict: boolean, timezone: string): moment.Moment; + (date: string, format: string, strict: boolean, timezone: string): moment.Moment; + (date: string, format: string, language: string, timezone: string): moment.Moment; + (date: string, format: string, language: string, strict: boolean, timezone: string): moment.Moment; + (date: string, formats: string[], timezone: string): moment.Moment; + (date: string, formats: string[], strict: boolean, timezone: string): moment.Moment; + (date: string, formats: string[], language: string, timezone: string): moment.Moment; + (date: string, formats: string[], language: string, strict: boolean, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, strict: boolean, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, language: string, timezone: string): moment.Moment; + (date: string, specialFormat: () => void, language: string, strict: boolean, timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], strict: boolean, timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], language: string, timezone: string): moment.Moment; + (date: string, formatsIncludingSpecial: any[], language: string, strict: boolean, timezone: string): moment.Moment; (date: Date, timezone: string): moment.Moment; (date: moment.Moment, timezone: string): moment.Moment; (date: Object, timezone: string): moment.Moment; From f8a90040348e83926f44e690b209769c4f88b961 Mon Sep 17 00:00:00 2001 From: Sammy Chu Date: Wed, 20 May 2015 13:28:42 +0800 Subject: [PATCH 021/137] update moment-timezone constructor definition, to align the constructor definition of moment --- moment-timezone/moment-timezone.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moment-timezone/moment-timezone.d.ts b/moment-timezone/moment-timezone.d.ts index ef9a41142..2ac473057 100644 --- a/moment-timezone/moment-timezone.d.ts +++ b/moment-timezone/moment-timezone.d.ts @@ -28,6 +28,8 @@ interface MomentZone { } interface MomentTimezone { + (): moment.Moment; + (timezone: string): moment.Moment; (date: number, timezone: string): moment.Moment; (date: number[], timezone: string): moment.Moment; (date: string, timezone: string): moment.Moment; From 5e2826c8a55004946b0b00fd8823063912b8128f Mon Sep 17 00:00:00 2001 From: John Reilly Date: Wed, 20 May 2015 10:39:52 +0100 Subject: [PATCH 022/137] Update angular.d.ts - JSDoc-ed the $cacheFactory --- angularjs/angular.d.ts | 87 +++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 13 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 7d1f3140b..92784af38 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1032,37 +1032,98 @@ declare module angular { disableAutoScrolling(): void; } - /////////////////////////////////////////////////////////////////////////// - // CacheFactoryService - // see http://docs.angularjs.org/api/ng.$cacheFactory - /////////////////////////////////////////////////////////////////////////// + /** + * $cacheFactory - service in module ng + * + * Factory that constructs Cache objects and gives access to them. + * + * see https://docs.angularjs.org/api/ng/service/$cacheFactory + */ interface ICacheFactoryService { - // Lets not foce the optionsMap to have the capacity member. Even though - // it's the ONLY option considered by the implementation today, a consumer - // might find it useful to associate some other options to the cache object. - //(cacheId: string, optionsMap?: { capacity: number; }): CacheObject; - (cacheId: string, optionsMap?: { capacity: number; }): ICacheObject; + /** + * Factory that constructs Cache objects and gives access to them. + * + * @param cacheId Name or id of the newly created cache. + * @param optionsMap Options object that specifies the cache behavior. Properties: + * + * capacity — turns the cache into LRU cache. + */ + (cacheId: string, optionsMap?: { capacity?: number; }): ICacheObject; - // Methods bellow are not documented + /** + * Get information about all the caches that have been created. + * @returns key-value map of cacheId to the result of calling cache#info + */ info(): any; + + /** + * Get access to a cache object by the cacheId used when it was created. + * + * @param cacheId Name or id of a cache to access. + */ get(cacheId: string): ICacheObject; } + /** + * $cacheFactory.Cache - type in module ng + * + * A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data. + * + * see https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache + */ interface ICacheObject { + /** + * Retrieve information regarding a particular Cache. + */ info(): { + /** + * the id of the cache instance + */ id: string; + + /** + * the number of entries kept in the cache instance + */ size: number; - // Not garanteed to have, since it's a non-mandatory option - //capacity: number; + //...: any additional properties from the options object when creating the cache. }; + + /** + * Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache. If behaving like an LRU cache, it will also remove stale entries from the set. + * + * It will not insert undefined values into the cache. + * + * @param key the key under which the cached data is stored. + * @param value the value to store alongside the key. If it is undefined, the key will not be stored. + */ put(key: string, value?: T): T; + + /** + * Retrieves named data stored in the Cache object. + * + * @param key the key of the data to be retrieved + */ get(key: string): any; + + /** + * Removes an entry from the Cache object. + * + * @param key the key of the entry to be removed + */ remove(key: string): void; + + /** + * Clears the cache object of any entries. + */ removeAll(): void; + + /** + * Destroys the Cache object entirely, removing it from the $cacheFactory set. + */ destroy(): void; } - + /////////////////////////////////////////////////////////////////////////// // CompileService // see http://docs.angularjs.org/api/ng.$compile From f275bd2ed5814e1c881b47f8211852c56db9d826 Mon Sep 17 00:00:00 2001 From: Chris Barr Date: Wed, 20 May 2015 08:37:26 -0400 Subject: [PATCH 023/137] (angular-file-upload) Adding missing a typedef for progress event --- angular-file-upload/angular-file-upload.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/angular-file-upload/angular-file-upload.d.ts b/angular-file-upload/angular-file-upload.d.ts index bd76a6e7e..635180a54 100644 --- a/angular-file-upload/angular-file-upload.d.ts +++ b/angular-file-upload/angular-file-upload.d.ts @@ -23,4 +23,9 @@ declare module angular.angularFileUpload { file: File; fileName?: string; } + + interface IFileProgressEvent extends ProgressEvent { + + config: IFileUploadConfig; + } } From 0daffc5de026726e3248ac99165da6c3c1719d2d Mon Sep 17 00:00:00 2001 From: Chris Barr Date: Wed, 20 May 2015 09:01:09 -0400 Subject: [PATCH 024/137] Updating tests to match new defs & updating links in the defs --- .../angular-file-upload-tests.ts | 48 ++++++++++--------- angular-file-upload/angular-file-upload.d.ts | 10 ++-- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/angular-file-upload/angular-file-upload-tests.ts b/angular-file-upload/angular-file-upload-tests.ts index d59e65b4e..8b8fe7490 100644 --- a/angular-file-upload/angular-file-upload-tests.ts +++ b/angular-file-upload/angular-file-upload-tests.ts @@ -10,35 +10,37 @@ module controllers { static $inject = ["$upload"]; constructor( - private $upload: ng.angularFileUpload.IUploadService + private $upload: angular.angularFileUpload.IUploadService ) { } onFileSelect($files: File[]) { - //$files: an array of files selected, each file has name, size, and type. - var uploads: ng.IPromise[] = []; + // $files: an array of files selected, each file has name, size, and type. for (var i = 0; i < $files.length; i++) { var file = $files[i]; - uploads.push(this.$upload.upload({ - url: "/api/upload", - method: "POST", - data: { - extraData: { - fileName: file.name, test: "anything" - } - }, - file: file - }) - .progress((evt: any) => { - console.log('progress'); - }) - .then(success => { - // file is uploaded successfully - console.log(success.data); - }) - .catch(err => { - console.error(err); - })); + this.$upload.upload({ + url: "/api/upload", + method: "POST", + data: { + extraData: { + fileName: file.name, + test: "anything" + } + }, + file: file + }) + .progress((evt: angular.angularFileUpload.IFileProgressEvent) => { + var percent = parseInt((100.0 * evt.loaded / evt.total).toString(), 10); + console.log("upload progress: " + percent + "% for " + evt.config.file.name); + }) + .error((data: any, status: number, response: any, headers: any) => { + console.error(data, status, response, headers); + }) + .success((data: any, status: number, headers: any, config: angular.angularFileUpload.IFileUploadConfig) => { + // file is uploaded successfully + console.log("Success!", data, status, headers, config); + }); + } } } diff --git a/angular-file-upload/angular-file-upload.d.ts b/angular-file-upload/angular-file-upload.d.ts index 635180a54..499fdf185 100644 --- a/angular-file-upload/angular-file-upload.d.ts +++ b/angular-file-upload/angular-file-upload.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Angular File Upload 1.6.7 -// Project: https://github.com/danialfarid/angular-file-upload -// Definitions by: John Reilly +// Type definitions for Angular File Upload 4.2.1 +// Project: https://github.com/danialfarid/ng-file-upload +// Definitions by: John Reilly & Chris Barr // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -23,9 +23,9 @@ declare module angular.angularFileUpload { file: File; fileName?: string; } - + interface IFileProgressEvent extends ProgressEvent { config: IFileUploadConfig; } -} +} \ No newline at end of file From 0c58c5a9ebf79e0585b3fb0aec7dc109889d154a Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 20 May 2015 20:35:41 +0200 Subject: [PATCH 025/137] added type definition file for PapaParse --- papaparse/papaparse-tests.ts | 55 +++++++++++++ papaparse/papaparse.d.ts | 144 +++++++++++++++++++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 papaparse/papaparse-tests.ts create mode 100644 papaparse/papaparse.d.ts diff --git a/papaparse/papaparse-tests.ts b/papaparse/papaparse-tests.ts new file mode 100644 index 000000000..14cc40bb3 --- /dev/null +++ b/papaparse/papaparse-tests.ts @@ -0,0 +1,55 @@ +/// + +import Papa = require("papaparse"); + +/** + * Parsing + */ +var res = Papa.parse("3,3,3"); + +res.errors[0].code; + +Papa.parse("3,3,3", { + delimiter: ';', + comments: false, + + step: function(results, p) { + p.abort(); + results.data.length; + } +}); + +var file = new File(); + +Papa.parse(file, { + complete: function(a, b) { + a.meta.fields; + b.name; + } +}); + +/** + * Unparsing + */ +Papa.unparse([{a: 1, b: 1, c: 1}]); +Papa.unparse([[1, 2, 3], [4, 5, 6]]); +Papa.unparse({ + fields: ["3"], + data: [] +}); + + + +/** + * Properties + */ +Papa.SCRIPT_PATH; +Papa.LocalChunkSize; + +/** + * Parser + */ +var parser = new Papa.Parser({}) +parser.getCharIndex(); +parser.abort(); +parser.parse("", 0, false); \ No newline at end of file diff --git a/papaparse/papaparse.d.ts b/papaparse/papaparse.d.ts new file mode 100644 index 000000000..028dd2aab --- /dev/null +++ b/papaparse/papaparse.d.ts @@ -0,0 +1,144 @@ +// Type definitions for PapaParse v4.1 +// Project: https://github.com/mholt/PapaParse +// Definitions by: Pedro Flemming +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module PapaParse { + interface Static { + /** + * Parse a csv string or a csv file + */ + parse(csvString: string, config?: ParseConfig): ParseResult; + + parse(file: File, config?: ParseConfig): ParseResult; + + /** + * Unparses javascript data objects and returns a csv string + */ + unparse(data: Array, config?: UnparseConfig): string; + + unparse(data: Array>, config?: UnparseConfig): string; + + unparse(data: UnparseObject, config?: UnparseConfig): string; + + /** + * Read-Only Properties + */ + // An array of characters that are not allowed as delimiters. + BAD_DELIMETERS: Array; + + // The true delimiter. Invisible. ASCII code 30. Should be doing the job we strangely rely upon commas and tabs for. + RECORD_SEP: string; + + // Also sometimes used as a delimiting character. ASCII code 31. + UNIT_SEP: string; + + // Whether or not the browser supports HTML5 Web Workers. If false, worker: true will have no effect. + WORKERS_SUPPORTED: boolean; + + // The relative path to Papa Parse. This is automatically detected when Papa Parse is loaded synchronously. + SCRIPT_PATH: string; + + /** + * Configurable Properties + */ + // The size in bytes of each file chunk. Used when streaming files obtained from the DOM that exist on the local computer. Default 10 MB. + LocalChunkSize: string; + + // Same as LocalChunkSize, but for downloading files from remote locations. Default 5 MB. + RemoteChunkSize: string; + + // The delimiter used when it is left unspecified and cannot be detected automatically. Default is comma. + DefaultDelimiter: string; + + /** + * On Papa there are actually more classes exposed + * but none of them are officially documented + * Since we can interact with the Parser from one of the callbacks + * I have included the API for this class. + */ + Parser: ParserConstructor; + } + + interface ParseConfig { + delimiter?: string; // default: "" + newline?: string; // default: "" + header?: boolean; // default: false + dynamicTyping?: boolean; // default: false + preview?: number; // default: 0 + encoding?: string; // default: "" + worker?: boolean; // default: false + comments?: boolean; // default: false + download?: boolean; // default: false + skipEmptyLines?: boolean; // default: false + fastMode?: boolean; // default: undefined + + // Callbacks + step?(results: ParseResult, parser: Parser): void; // default: undefined + complete?(results: ParseResult, file?: File): void; // default: undefined + error?(error: ParseError, file?: File): void; // default: undefined + chunk?(results: ParseResult, parser: Parser): void; // default: undefined + beforeFirstChunk?(chunk: string): string|void; // default: undefined + } + + interface UnparseConfig { + quotes: boolean; // default: false + delimiter: string; // default: "," + newline: string; // default: "\r\n" + } + + interface UnparseObject { + fields: Array; + data: string | Array; + } + + interface ParseError { + type: string; // A generalization of the error + code: string; // Standardized error code + message: string; // Human-readable details + row: number; // Row index of parsed data where error is + } + + interface ParseMeta { + delimiter: string; // Delimiter used + linebreak: string; // Line break sequence used + aborted: boolean; // Whether process was aborted + fields: Array; // Array of field names + truncated: boolean; // Whether preview consumed all input + } + + /** + * @interface ParseResult + * + * data: is an array of rows. If header is false, rows are arrays; otherwise they are objects of data keyed by the field name. + * errors: is an array of errors + * meta: contains extra information about the parse, such as delimiter used, the newline sequence, whether the process was aborted, etc. Properties in this object are not guaranteed to exist in all situations + */ + interface ParseResult { + data: Array; + errors: Array; + meta: ParseMeta; + } + + /** + * Parser + */ + interface ParserConstructor { new(config: ParseConfig): Parser; } + interface Parser { + // Parses the input + parse(input: string, baseIndex: number, ignoreLastRow: boolean): any; + + // Sets the abort flag + abort(): void; + + // Gets the cursor position + getCharIndex(): number; + } +} + +declare var Papa: PapaParse.Static; + +declare module "papaparse" { + var Papa: PapaParse.Static; + export = Papa; +} From 8bc91d57f68517ccea6c50b30f4a3e8ffe2bd97b Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Wed, 20 May 2015 17:00:13 -0700 Subject: [PATCH 026/137] Adding autoprefixer-core This is actually more useful than autoprefixer since this is the programmatic interface --- autoprefixer-core/autoprefixer-core-tests.ts | 9 ++++ autoprefixer-core/autoprefixer-core.d.ts | 44 ++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 autoprefixer-core/autoprefixer-core-tests.ts create mode 100644 autoprefixer-core/autoprefixer-core.d.ts diff --git a/autoprefixer-core/autoprefixer-core-tests.ts b/autoprefixer-core/autoprefixer-core-tests.ts new file mode 100644 index 000000000..9ff4e7695 --- /dev/null +++ b/autoprefixer-core/autoprefixer-core-tests.ts @@ -0,0 +1,9 @@ +/// +import autoprefixer = require("autoprefixer-core"); + +var css: string; + +var prefixed = autoprefixer.process(css).css; + +var processor = autoprefixer({ browsers: ['> 1%', 'IE 7'], cascade: false }); +console.log(processor.info()); diff --git a/autoprefixer-core/autoprefixer-core.d.ts b/autoprefixer-core/autoprefixer-core.d.ts new file mode 100644 index 000000000..905447acf --- /dev/null +++ b/autoprefixer-core/autoprefixer-core.d.ts @@ -0,0 +1,44 @@ +// Type definitions for Autoprefixer Core 5.1.11 +// Project: https://github.com/postcss/autoprefixer-core +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "autoprefixer-core" { + interface Config { + browsers?: string[]; + cascade?: boolean; + remove?: boolean; + } + + interface Options { + from?: string; + to?: string; + safe?: boolean; + map?: { + inline?: boolean; + prev?: string | Object; + } + } + + interface Result { + css: string; + map: string; + opts: Options; + } + + interface Processor { + postcss: any; + info(): string; + process(css: string, opts?: Options): Result; + } + + interface Exports { + (config: Config): Processor; + postcss: any; + info(): string; + process(css: string, opts?: Options): Result; + } + + var exports: Exports; + export = exports; +} From cfc0247741abbad9d12472cac7ec4a6e97f1f474 Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Wed, 20 May 2015 17:12:21 -0700 Subject: [PATCH 027/137] Adding type definitions for node-sass --- node-sass/node-sass-tests.ts | 71 ++++++++++++++++++++++++++++++++++++ node-sass/node-sass.d.ts | 56 ++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 node-sass/node-sass-tests.ts create mode 100644 node-sass/node-sass.d.ts diff --git a/node-sass/node-sass-tests.ts b/node-sass/node-sass-tests.ts new file mode 100644 index 000000000..a7c1477cb --- /dev/null +++ b/node-sass/node-sass-tests.ts @@ -0,0 +1,71 @@ +/// +import sass = require('node-sass'); +sass.render({ + file: '/path/to/myFile.scss', + data: 'body{background:blue; a{color:black;}}', + importer: function(url, prev, done) { + // url is the path in import as is, which libsass encountered. + // prev is the previously resolved path. + // done is an optional callback, either consume it or return value synchronously. + // this.options contains this options hash, this.callback contains the node-style callback + someAsyncFunction(url, prev, function(result) { + done({ + file: result.path, // only one of them is required, see section Sepcial Behaviours. + contents: result.data + }); + }); + // OR + var result = someSyncFunction(url, prev); + return { file: result.path, contents: result.data }; + }, + includePaths: ['lib/', 'mod/'], + outputStyle: 'compressed' +}, function(error, result) { // node-style callback from v3.0.0 onwards + if (error) { + console.log(error.status); // used to be "code" in v2x and below + console.log(error.column); + console.log(error.message); + console.log(error.line); + } + else { + console.log(result.css.toString()); + + console.log(result.stats); + + console.log(result.map.toString()); + // or better + console.log(JSON.stringify(result.map)); // note, JSON.stringify accepts Buffer too + } +}); +// OR +var result = sass.renderSync({ + file: '/path/to/file.scss', + data: 'body{background:blue; a{color:black;}}', + outputStyle: 'compressed', + outFile: '/to/my/output.css', + sourceMap: true, // or an absolute or relative (to outFile) path + importer: function(url, prev, done) { + // url is the path in import as is, which libsass encountered. + // prev is the previously resolved path. + // done is an optional callback, either consume it or return value synchronously. + // this.options contains this options hash + someAsyncFunction(url, prev, function(result) { + done({ + file: result.path, // only one of them is required, see section Sepcial Behaviours. + contents: result.data + }); + }); + // OR + var result = someSyncFunction(url, prev); + return { file: result.path, contents: result.data }; + }, +}); + +console.log(result.css); +console.log(result.map); +console.log(result.stats); + +function someAsyncFunction(url: string, prev: string, callback: (result: { path: string; data: string }) => void): void {} +function someSyncFunction(url: string, prev: string): { path: string; data: string} { + return null; +} diff --git a/node-sass/node-sass.d.ts b/node-sass/node-sass.d.ts new file mode 100644 index 000000000..09ea71d4e --- /dev/null +++ b/node-sass/node-sass.d.ts @@ -0,0 +1,56 @@ +// Type definitions for Node Sass +// Project: https://github.com/sass/node-sass +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "node-sass" { + interface Importer { + (url: string, prev: string, done: (data: { file: string; contents: string; }) => void): void; + } + + interface Options { + file?: string; + data?: string; + importer?: Importer | Importer[]; + functions?: { [key: string]: Function }; + includePaths?: string[]; + indentedSyntax?: boolean; + indentType?: string; + indentWidth?: number; + linefeed?: string; + omitSourceMapUrl?: boolean; + outFile?: string; + outputStyle?: string; + precision?: number; + sourceComments?: boolean; + sourceMap?: boolean | string; + sourceMapContents?: boolean; + sourceMapEmbed?: boolean; + sourceMapRoot?: boolean; + } + + interface SassError extends Error { + message: string; + line: number; + column: number; + status: number; + file: string; + } + + interface Result { + css: Buffer; + map: Buffer; + stats: { + entry: string; + start: number; + end: number; + duration: number; + includedFiles: string[]; + } + } + + export function render(options: Options, callback: (err: SassError, result: Result) => any): void; + export function renderSync(options: Options): Result; +} From 720878aee7051a9bed9c6e63eb1e41e77c37cf57 Mon Sep 17 00:00:00 2001 From: Inez Korczynski Date: Wed, 20 May 2015 17:31:28 -0700 Subject: [PATCH 028/137] Transition.then - it's optional, really is, to pass "onRejected" callback --- ember/ember.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ember/ember.d.ts b/ember/ember.d.ts index a35d51eb9..48aa81aa2 100644 --- a/ember/ember.d.ts +++ b/ember/ember.d.ts @@ -58,7 +58,7 @@ declare module EmberStates { @arg {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} */ - then(onFulfilled: Function, onRejected: Function, label?: string): Ember.RSVP.Promise; + then(onFulfilled: Function, onRejected?: Function, label?: string): Ember.RSVP.Promise; /** Forwards to the internal `promise` property which you can From b003ec5aef9063d5a99c834612d213f109b1b56a Mon Sep 17 00:00:00 2001 From: Stefan Profanter Date: Tue, 19 May 2015 15:16:33 +0200 Subject: [PATCH 029/137] Vortex Web Client definitions --- vortex-web-client/vortex-web-client-tests.ts | 23 + vortex-web-client/vortex-web-client.d.ts | 488 +++++++++++++++++++ 2 files changed, 511 insertions(+) create mode 100644 vortex-web-client/vortex-web-client-tests.ts create mode 100644 vortex-web-client/vortex-web-client.d.ts diff --git a/vortex-web-client/vortex-web-client-tests.ts b/vortex-web-client/vortex-web-client-tests.ts new file mode 100644 index 000000000..216e268c5 --- /dev/null +++ b/vortex-web-client/vortex-web-client-tests.ts @@ -0,0 +1,23 @@ +/// + +var runtime = new dds.runtime.Runtime(); +runtime.connect("ws://localhost:9000", "user:pass"); + +var tqos = new dds.TopicQos(); +var chatTopic = new dds.Topic(0, 'ChatMessage', tqos); +runtime.registerTopic(chatTopic); + +var writerQos = new dds.DataWriterQos(); +var writer = new dds.DataWriter(runtime, chatTopic, writerQos); + +writer.write({ + user: "John Smith", + msg : "Hello World!" +}); + +var readerQos = new dds.DataReaderQos(); +var reader = new dds.DataReader(runtime, chatTopic, readerQos); + +reader.addListener(function(msg) { + console.log(JSON.stringify(msg)); +}); diff --git a/vortex-web-client/vortex-web-client.d.ts b/vortex-web-client/vortex-web-client.d.ts new file mode 100644 index 000000000..de665c780 --- /dev/null +++ b/vortex-web-client/vortex-web-client.d.ts @@ -0,0 +1,488 @@ +// Type definitions for Vortex Web 1.2.0p1 +// Project: http://www.prismtech.com/vortex/vortex-web +// Definitions by: Stefan Profanter +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/* + Vortex Web + + This software and documentation are Copyright 2010 to 2015 PrismTech + Limited and its licensees. All rights reserved. See file: + + docs/LICENSE.html + + for full copyright notice and license terms. + */ + +declare module DDS { + + + /** + * Base class for all policies + */ + interface Policy { + + } + + /** + * History policy + */ + export enum HistoryKind { + KeepAll = 0, + KeepLast = 1 + } + + /** + * History policy + */ + export class History implements Policy { + /** + * KeepAll - KEEP_ALL qos policy + */ + KeepAll:any; + /** + * KeepLast - KEEP_LAST qos policy + */ + KeepLast:any; + } + + /** + * Reliability Policy + * @example var qos = Reliability.Reliable + */ + export enum ReliabilityKind { + Reliable = 0, + BestEffort = 1 + } + + /** + * History policy + */ + export class Reliability implements Policy { + /** + * Reliable - 'Reliable' reliability policy + */ + Reliable:any; + /** + * BestEffort - 'BestEffort' reliability policy + */ + BestEffort:any; + } + + /** + * Partition policy + */ + export class Partition implements Policy { + /** + * Create new partition policy + * + * @param policies - partition names + * @example var qos = Partition('p1', 'p2') + */ + constructor(...policies:string[]); + } + + /** + * Content Filter policy + */ + export class ContentFilter implements Policy { + /** + * Create new content filter policy + * + * @param expr - filter expression + * @example var filter = ContentFilter("x>10 AND y<50") + */ + constructor(expr:string); + } + + /** + * Time Filter policy + */ + export class TimeFilter implements Policy { + /** + * Create new content filter policy + * + * @param period - time duration (unit ?) + * @example var filter = TimeFilter(100) + */ + constructor(period:number); + } + + /** + * Durability Policy + */ + export enum DurabilityKind { + Volatile = 0, + TransientLocal = 1, + Transient = 2, + Persistent = 3 + } + + /** + * Durability Qos Policy + */ + export class Durability implements Policy { + /** + * Volatile - Volatile durability policy + */ + Volatile:any; + /** + * TransientLocal - TransientLocal durability policy + */ + TransientLocal:any; + /** + * Transient - Transient durability policy + */ + Transient:any; + /** + * Persistent - Persistent durability policy + */ + Persistent:any; + } + + + interface EntityQos { + /** + * Creates any of the DDS entities quality of service, including DataReaderQos and DataWriterQos. + * + * @param policies - list of policies for the Qos entity + */ + new (...policies:Policy[]): EntityQos; + + /** + * Adds the given policy to this instance. + * @param policy - the policy to add + * @return A new copy of this instance with the combined policies + */ + add (policy:Policy): EntityQos; + } + + + /** + * Topic quality of service object + */ + export var TopicQos:EntityQos; + /** + * DataReader quality of service object + */ + export var DataReaderQos:EntityQos; + + /** + * DataWriter quality of service object + */ + export var DataWriterQos:EntityQos; + + export class Topic { + /** + * Creates a `Topic` in the domain `did`, named `tname`, having `qos` Qos, + * for the type `ttype` whose registered name is `tregtype` + * @param {number} did - DDS domain ID + * @param {string} tname - topic name + * @param {TopicQos} qos - topic Qos + * @param {string} ttype - topic type. If not specified, a generic type is used. + * @param {string} tregtype - topic registered type name. If not specified, 'ttype' is used. + */ + constructor(did:number, tname:string, qos:EntityQos, ttype?:string, tregtype?:string); + + /** + * Called when topic gets registered in the runtime + */ + onregistered():void; + + /** + * Called when topic gets unregistered in the runtime + */ + onunregistered():void; + } + + export class DataReader { + /** + * Creates a `DataReader` for a given topic and a specific in a specific DDS runtime. + * + * A `DataReader` allows to read data for a given topic with a specific QoS. A `DataReader` + * * goes through different states, it is intially disconnected and changes to the connected state + * when the underlying transport connection is successfully established with the server. At this point + * a `DataReader` can be explicitely closed or disconnected. A disconnection can happen as the result + * of a network failure or server failure. Disconnection and reconnections are managed by the runtime. + * + * @param runtime - DDS Runtime + * @param topic - DDS Topic + * @param qos - DataReader quality of service + */ + constructor(runtime:Runtime, topic:Topic, qos:EntityQos); + + resetStats():void; + + /** + * Attaches the listener `l` to this data reader and returns + * the id associated to the listener. + * @param l - listener code + * @returns listener handle + */ + addListener(l:(msg:any) => void):number; + + /** + * removes a listener from this data reader. + * @param idx - listener id + */ + removeListener(idx:number):void; + + /** + * closes the DataReader + */ + close():void; + } + + export class DataWriter { + /** + * Creates a `DataWriter` for a given topic and a specific in a specific DDS runtime + * + * defines a DDS data writer. This type + * is used to write data for a specific topic with a given QoS. + * A `DataWriter` goes through different states, it is intially disconnected and changes to the connected + * state when the underlying transport connection is successfully established with the server. + * At this point a `DataWriter` can be explicitely closed or disconnected. A disconnection can happen + * as the result of a network failure or server failure. Disconnection and reconnections are managed by the + * runtime. + * + * @param runtime - DDS Runtime + * @param topic - DDS Topic + * @param qos - DataWriter quality of service + */ + constructor(runtime:Runtime, topic:Topic, qos:EntityQos); + + /** + * Writes one or more samples. + * @param ds - data sample + */ + write(...ds:any[]):void; + + /** + * Closes the DataWriter + */ + close():void; + } + + + export class DataCache { + /** + * Constructs a `DataCache` with a given `depth`. If the `cache` parameter + * is present, then the current cache is initialized with this parameter. + * + * Provides a way of storing and flexibly accessing the + * data received through a `DataReader`. A `DataCache` is organized as + * a map of queues. The depth of the queues is specified at construction + * time. + * + * @param depth - cache size + * @param cache - cache data structure + */ + constructor(depth:number, cache:any); + + /** + * Register a listener to be notified whenever data which matches a predicate is written into the cache. + * If no predicate is provided then the listeners is always notified upon data inserion. + * + * @param l - listener function + * @param p - predicate + */ + addListener(l:(data:any) => void, p?:(data:any) => boolean):void; + + /** + * Write the element `data` with key `k` into the cache. + * + * @param k - data key + * @param data - data value + * @returns the written data value + */ + write(k:any, data:any):any; + + /** + * Same as forEach but applied, for each key, only to the first `n` samples of the cache + * + * @param f - the function to be applied + * @param n - samples set size + */ + forEachN(f:(data:any) => any, n:number):any[]; + + /** + * Execute the function `f` for each element of the cache. + * + * @memberof! dds.DataCache# + * @param f - the function to be applied + * @returns results of the function execution + */ + forEach(f:(data:any) => any):any[]; + + /** + * Returns a cache that is the result of applying `f` to each element of the cache. + * + * @param f - the function to be applied + * @returns A cache holding the results of the function execution + */ + map(f:(data:any) => any):DataCache; + + /** + * Returns the list of elements in the cache that satisfy the predicate `f`. + * + * @param f - the predicate to be applied to filter the cache values + * @returns An array holding the filtered values + */ + filter(f:(data:any) => boolean):any[]; + + /** + * Returns the list of elements in the cache that doesn't satisfy the predicate `f`. + * + * @returns An array holding the filtered values + * @see DataCache#filter + */ + filterNot(f:(data:any) => boolean):any[]; + + /** + * Returns the values included in the cache as an array. + * + * @return All the cache values + */ + read():any[]; + + /** + * Returns the last value of the cache in an array. + * + * @return the last value of the cache + */ + readLast():any; + + /** + * Returns all the values included in the cache as an array and empties the cache. + * + * @return All the cache values + */ + takeAll():any[]; + + /** + * Returns the `K`ith value of the cache as Monad, ie: `coffez.Some` if it exists, `coffez.None` if not. + * + * @return the 'k'th value + */ + take():any; + + /** + * Takes elements from the cache up to when the predicate `f` is satisfied + * + * @param f - the predicate + * @return taken cache values + */ + takeWithFilter(f:(data:any) => boolean):any[]; + + /** + * Return `coffez.Some(v)` if there is an element in the cache corresponding to the + * key `k` otherwise it returns `coffez.None`. + * + * @param k - key + */ + get(k:any):any; + + /** + * Return `coffez.Some(v)` if there is an element in the cache corresponding to the + * key `k` otherwise executes `f` and returns its result. + * + * @param k - key + * @param f - the function to apply + */ + getOrElse(k:any, f:(data:any)=> any):any; + + /** + * folds the element of the cache using `z` as the `zero` element and + * `f` as the binary operator. + * + * @param z - initial value + * @param {function} f - reduce function + */ + fold(z:any, f:(data:any) => any):void; + + /** + * clears the data cache + */ + clear():void; + + } + + interface Runtime { + /** + * Constructs a DDS Runtime object + * + * maintains the connection with the server, re-establish the connection + * if dropped and mediates the `DataReader` and `DataWriter` communication. + */ + new (): Runtime; + + /** + * Connect the runtime to the server. If the runtime is already connected an exception is thrown + * + * @param srv - Vortex Web server WebSocket URL + * @param authToken - Authorization token + */ + connect(server:string, authToken?:string): void; + + /** + * Disconnects, withouth closing, a `Runtime`. Notice that upon re-connection all existing + * subscriptions and publications will be re-restablished. + */ + disconnect(): void; + + /** + * Registers the provided Topic. + * + * @param t - Topic to be registered + */ + registerTopic(t:Topic): void; + + /** + * Function called when runtime is connected. + * + * @param e + */ + onconnect(e:any): void; + + + /** + * Function called when runtime is disconnected. + * + * @param e + */ + ondisconnect(e:any): void; + + /** + * Closes the DDS runtime and as a consequence all the `DataReaders` and `DataWriters` that belong to this runtime. + * + */ + close(): void; + + /** + * Checks whether the Runtime is connected. + * @return `true` if connected, `false` if not + */ + isConnected() : boolean; + + /** + * Checks whether the Runtime is closed. + * @return `true` if connected, `false` if not + */ + isClosed() : boolean; + } + + export var runtime:{ + Runtime : Runtime; + } + + export var VERSION:string; +} + +/** + * Defines the core Vortex-Web-Client javascript library. It includes the JavaScript API for DDS. This API allows + * web applications to share data among them as well as with native DDS applications. + */ +declare +var dds:typeof DDS; + + From 2c3f84a797387fb4b275b027d946694c4326ec11 Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Thu, 21 May 2015 19:14:33 +1000 Subject: [PATCH 030/137] getTabSize returns number --- ace/ace.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ace/ace.d.ts b/ace/ace.d.ts index 29fadf3bc..9866e1e28 100644 --- a/ace/ace.d.ts +++ b/ace/ace.d.ts @@ -576,7 +576,7 @@ declare module AceAjax { /** * Returns the current tab size. **/ - getTabSize(): string; + getTabSize(): number; /** * Returns `true` if the character at the position is a soft tab. From bfbc30d83298099af8743b114d1a9065220a1fdd Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Thu, 21 May 2015 19:31:40 +1000 Subject: [PATCH 031/137] Editor is an event emitter --- ace/ace.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ace/ace.d.ts b/ace/ace.d.ts index 9866e1e28..410df1039 100644 --- a/ace/ace.d.ts +++ b/ace/ace.d.ts @@ -1035,6 +1035,8 @@ declare module AceAjax { **/ export interface Editor { + addEventListener(ev: string, callback: Function); + inMultiSelectMode: boolean; selectMoreLines(n: number); From ecc3f26f9cdaaa9db07504495ac05ccb0afb0ace Mon Sep 17 00:00:00 2001 From: Danyil Bohdan Date: Thu, 21 May 2015 12:58:12 +0300 Subject: [PATCH 032/137] Add missing typing for utcOffset for Moment --- moment/moment-external-tests.ts | 1 + moment/moment-tests.ts | 1 + moment/moment.d.ts | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/moment/moment-external-tests.ts b/moment/moment-external-tests.ts index 1b1d083ba..c5855c12c 100644 --- a/moment/moment-external-tests.ts +++ b/moment/moment-external-tests.ts @@ -188,6 +188,7 @@ moment(1318874398806).valueOf(); moment(1318874398806).unix(); moment([2000]).isLeapYear(); moment().zone(); +moment().utcOffset(); moment("2012-2", "YYYY-MM").daysInMonth(); moment([2011, 2, 12]).isDST(); diff --git a/moment/moment-tests.ts b/moment/moment-tests.ts index dc11eeac8..16490d2e1 100644 --- a/moment/moment-tests.ts +++ b/moment/moment-tests.ts @@ -188,6 +188,7 @@ moment(1318874398806).valueOf(); moment(1318874398806).unix(); moment([2000]).isLeapYear(); moment().zone(); +moment().utcOffset(); moment("2012-2", "YYYY-MM").daysInMonth(); moment([2011, 2, 12]).isDST(); diff --git a/moment/moment.d.ts b/moment/moment.d.ts index d26834a03..e09aab1d5 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -224,7 +224,7 @@ declare module moment { diff(b: Moment): number; diff(b: Moment, unitOfTime: string): number; diff(b: Moment, unitOfTime: string, round: boolean): number; - + toArray(): number[]; toDate(): Date; toISOString(): string; @@ -235,6 +235,9 @@ declare module moment { zone(): number; zone(b: number): Moment; zone(b: string): Moment; + utcOffset(): number; + utcOffset(b: number): Moment; + utcOffset(b: string): Moment; daysInMonth(): number; isDST(): boolean; @@ -318,7 +321,7 @@ declare module moment { } - interface BaseMomentLanguage { + interface BaseMomentLanguage { months ?: any; monthsShort ?: any; weekdays ?: any; From 2aac6c6f5072c58ed6055c71f15705ed8bbcb90d Mon Sep 17 00:00:00 2001 From: Emiliano Marino Date: Thu, 21 May 2015 10:47:22 -0300 Subject: [PATCH 033/137] added $setDirty method to INgModelController (added in v1.3.15+) For Angular version 1.3.15+ INgModelController brings $setDirty method. --- angularjs/angular.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 92784af38..719e84139 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -474,6 +474,7 @@ declare module angular { // types do work and it's common to use them. $setViewValue(value: any, trigger?: string): void; $setPristine(): void; + $setDirty(): void; $validate(): void; $setTouched(): void; $setUntouched(): void; From c5a17104d40e0c0f6cc26fe02172ba6dcff0bae0 Mon Sep 17 00:00:00 2001 From: SaschaNaz Date: Fri, 22 May 2015 00:50:44 +0900 Subject: [PATCH 034/137] readBytes fix --- winrt/winrt.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winrt/winrt.d.ts b/winrt/winrt.d.ts index 883860b00..1247d0940 100644 --- a/winrt/winrt.d.ts +++ b/winrt/winrt.d.ts @@ -9268,7 +9268,7 @@ declare module Windows { unconsumedBufferLength: number; unicodeEncoding: Windows.Storage.Streams.UnicodeEncoding; readByte(): number; - readBytes(): Uint8Array; + readBytes(value: Uint8Array): void; readBuffer(length: number): Windows.Storage.Streams.IBuffer; readBoolean(): boolean; readGuid(): string; @@ -9297,7 +9297,7 @@ declare module Windows { unconsumedBufferLength: number; unicodeEncoding: Windows.Storage.Streams.UnicodeEncoding; readByte(): number; - readBytes(): Uint8Array; + readBytes(value: Uint8Array): void; readBuffer(length: number): Windows.Storage.Streams.IBuffer; readBoolean(): boolean; readGuid(): string; From 92e29d7ca898ab585f8dd2304dc78aa001e421e6 Mon Sep 17 00:00:00 2001 From: SaschaNaz Date: Fri, 22 May 2015 01:12:41 +0900 Subject: [PATCH 035/137] readBytes/writeBytes receives array of number --- winrt/winrt.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winrt/winrt.d.ts b/winrt/winrt.d.ts index 1247d0940..ed4f33e77 100644 --- a/winrt/winrt.d.ts +++ b/winrt/winrt.d.ts @@ -9268,6 +9268,7 @@ declare module Windows { unconsumedBufferLength: number; unicodeEncoding: Windows.Storage.Streams.UnicodeEncoding; readByte(): number; + readBytes(value: number[]): void; readBytes(value: Uint8Array): void; readBuffer(length: number): Windows.Storage.Streams.IBuffer; readBoolean(): boolean; @@ -9297,6 +9298,7 @@ declare module Windows { unconsumedBufferLength: number; unicodeEncoding: Windows.Storage.Streams.UnicodeEncoding; readByte(): number; + readBytes(value: number[]): void; readBytes(value: Uint8Array): void; readBuffer(length: number): Windows.Storage.Streams.IBuffer; readBoolean(): boolean; @@ -9345,6 +9347,7 @@ declare module Windows { unicodeEncoding: Windows.Storage.Streams.UnicodeEncoding; unstoredBufferLength: number; writeByte(value: number): void; + writeBytes(value: number[]): void; writeBytes(value: Uint8Array): void; writeBuffer(buffer: Windows.Storage.Streams.IBuffer): void; writeBuffer(buffer: Windows.Storage.Streams.IBuffer, start: number, count: number): void; @@ -9377,6 +9380,7 @@ declare module Windows { unicodeEncoding: Windows.Storage.Streams.UnicodeEncoding; unstoredBufferLength: number; writeByte(value: number): void; + writeBytes(value: number[]): void; writeBytes(value: Uint8Array): void; writeBuffer(buffer: Windows.Storage.Streams.IBuffer): void; writeBuffer(buffer: Windows.Storage.Streams.IBuffer, start: number, count: number): void; From 9a8c0ea74e849c796d4a01e42b42dc5d2761b41c Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Fri, 22 May 2015 18:00:08 +1000 Subject: [PATCH 036/137] feat(ace) specialize 'change' --- ace/ace.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ace/ace.d.ts b/ace/ace.d.ts index 410df1039..72fefbc6e 100644 --- a/ace/ace.d.ts +++ b/ace/ace.d.ts @@ -1034,9 +1034,10 @@ declare module AceAjax { * Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them. **/ export interface Editor { - - addEventListener(ev: string, callback: Function); + addEventListener(ev: 'change', callback: (ev: EditorChangeEvent) => any); + addEventListener(ev: string, callback: Function); + inMultiSelectMode: boolean; selectMoreLines(n: number); @@ -1712,6 +1713,13 @@ declare module AceAjax { **/ new(renderer: VirtualRenderer, session?: IEditSession): Editor; } + + interface EditorChangeEvent { + start: Position; + end: Position; + action: string; // insert, remove + lines: any[]; + } //////////////////////////////// /// PlaceHolder From c3125d7aebd46b9bd024287b12eaf3438cc500c1 Mon Sep 17 00:00:00 2001 From: Chris Barr Date: Fri, 22 May 2015 07:50:50 -0400 Subject: [PATCH 037/137] Fixing header format --- angular-file-upload/angular-file-upload.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-file-upload/angular-file-upload.d.ts b/angular-file-upload/angular-file-upload.d.ts index 499fdf185..fa7aaa54e 100644 --- a/angular-file-upload/angular-file-upload.d.ts +++ b/angular-file-upload/angular-file-upload.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular File Upload 4.2.1 // Project: https://github.com/danialfarid/ng-file-upload -// Definitions by: John Reilly & Chris Barr +// Definitions by: John Reilly // Definitions: https://github.com/borisyankov/DefinitelyTyped /// From f42164e284d20bfebdea9a6283dc387359f1a46a Mon Sep 17 00:00:00 2001 From: Sascha Thiel Date: Fri, 22 May 2015 14:19:45 +0200 Subject: [PATCH 038/137] fixed the collection TModel workaround. --- backbone/backbone.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index 7de8eb807..9d54361d5 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -169,9 +169,7 @@ declare module Backbone { **/ private static extend(properties: any, classProperties?: any): any; - // TODO: this really has to be typeof TModel - //model: typeof TModel; - model: { new(): TModel; }; // workaround + model: new (...args:any[]) => TModel; models: TModel[]; length: number; From 0deb573197c1be1859e9433012b4df6f78fa9795 Mon Sep 17 00:00:00 2001 From: Sascha Thiel Date: Fri, 22 May 2015 15:00:44 +0200 Subject: [PATCH 039/137] added the missing ui property --- marionette/marionette.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/marionette/marionette.d.ts b/marionette/marionette.d.ts index 2b9b25635..4a2bfac10 100644 --- a/marionette/marionette.d.ts +++ b/marionette/marionette.d.ts @@ -1291,6 +1291,15 @@ declare module Marionette { options: any; + /** + * Behaviors can have their own ui hash, which will be mixed into the ui + * hash of its associated View instance. ui elements defined on either the + * Behavior or the View will be made available within events and triggers. + * They also are attached directly to the Behavior and can be accessed within + * Behavior methods as this.ui. + */ + ui: any; + /** * Any triggers you define on the Behavior will be triggered in response to the appropriate event on the view. */ From fcec5c68577433516aaf6ea2dd95bf9264928ada Mon Sep 17 00:00:00 2001 From: jandic Date: Fri, 22 May 2015 15:25:46 +0200 Subject: [PATCH 040/137] Fixed - Parameters made optional Some parameters were mandatory while they were supposed to be optional --- dojo/dojo.d.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts index 7b95efdfa..e39db0583 100644 --- a/dojo/dojo.d.ts +++ b/dojo/dojo.d.ts @@ -4873,7 +4873,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: any[], callback: Function, thisObject: Object): boolean; + every(arr: any[], callback: Function, thisObject?: Object): boolean; /** * Determines whether or not every item in arr satisfies the * condition implemented by callback. @@ -4887,7 +4887,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: String, callback: Function, thisObject: Object): boolean; + every(arr: String, callback: Function, thisObject?: Object): boolean; /** * Determines whether or not every item in arr satisfies the * condition implemented by callback. @@ -4901,7 +4901,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: any[], callback: String, thisObject: Object): boolean; + every(arr: any[], callback: String, thisObject?: Object): boolean; /** * Determines whether or not every item in arr satisfies the * condition implemented by callback. @@ -4915,7 +4915,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - every(arr: String, callback: String, thisObject: Object): boolean; + every(arr: String, callback: String, thisObject?: Object): boolean; /** * Returns a new Array with those items from arr that match the * condition implemented by callback. @@ -4929,7 +4929,7 @@ declare module dojo { * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. * @param thisObject Optionalmay be used to scope the call to callback */ - filter(arr: any[], callback: Function, thisObject: Object): any[]; + filter(arr: any[], callback: Function, thisObject?: Object): any[]; /** * Returns a new Array with those items from arr that match the * condition implemented by callback. @@ -4943,7 +4943,7 @@ declare module dojo { * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. * @param thisObject Optionalmay be used to scope the call to callback */ - filter(arr: any[], callback: String, thisObject: Object): any[]; + filter(arr: any[], callback: String, thisObject?: Object): any[]; /** * for every item in arr, callback is invoked. Return values are ignored. * If you want to break out of the loop, consider using array.every() or array.some(). @@ -5020,7 +5020,7 @@ declare module dojo { * @param fromIndex Optional * @param findLast OptionalMakes indexOf() work like lastIndexOf(). Used internally; not meant for external usage. */ - indexOf(arr: any[], value: Object, fromIndex: number, findLast: boolean): number; + indexOf(arr: any[], value: Object, fromIndex?: number, findLast?: boolean): number; /** * locates the last index of the provided value in the passed * array. If the value is not found, -1 is returned. @@ -5036,7 +5036,7 @@ declare module dojo { * @param value * @param fromIndex Optional */ - lastIndexOf(arr: any, value: any, fromIndex: number): number; + lastIndexOf(arr: any, value: any, fromIndex?: number): number; /** * applies callback to each element of arr and returns * an Array with the results @@ -5051,7 +5051,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: any[], callback: Function, thisObject: Object, Ctr: any): any[]; + map(arr: any[], callback: Function, thisObject?: Object, Ctr: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5066,7 +5066,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: String, callback: Function, thisObject: Object, Ctr: any): any[]; + map(arr: String, callback: Function, thisObject?: Object, Ctr: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5081,7 +5081,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: any[], callback: String, thisObject: Object, Ctr: any): any[]; + map(arr: any[], callback: String, thisObject?: Object, Ctr: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5096,7 +5096,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: String, callback: String, thisObject: Object, Ctr: any): any[]; + map(arr: String, callback: String, thisObject?: Object, Ctr: any): any[]; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -5110,7 +5110,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: any[], callback: Function, thisObject: Object): boolean; + some(arr: any[], callback: Function, thisObject?: Object): boolean; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -5124,7 +5124,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: String, callback: Function, thisObject: Object): boolean; + some(arr: String, callback: Function, thisObject?: Object): boolean; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -5138,7 +5138,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: any[], callback: String, thisObject: Object): boolean; + some(arr: any[], callback: String, thisObject?: Object): boolean; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. @@ -5152,7 +5152,7 @@ declare module dojo { * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. * @param thisObject Optionalmay be used to scope the call to callback */ - some(arr: String, callback: String, thisObject: Object): boolean; + some(arr: String, callback: String, thisObject?: Object): boolean; } /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/connect.html From 95eac2d4ed66828e43fe10e0bd09515d5f5a62fe Mon Sep 17 00:00:00 2001 From: jandic Date: Fri, 22 May 2015 15:46:23 +0200 Subject: [PATCH 041/137] Fixed compilation issue --- dojo/dojo.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts index e39db0583..8ec115654 100644 --- a/dojo/dojo.d.ts +++ b/dojo/dojo.d.ts @@ -5051,7 +5051,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: any[], callback: Function, thisObject?: Object, Ctr: any): any[]; + map(arr: any[], callback: Function, thisObject: Object, Ctr: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5066,7 +5066,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: String, callback: Function, thisObject?: Object, Ctr: any): any[]; + map(arr: String, callback: Function, thisObject: Object, Ctr: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5081,7 +5081,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: any[], callback: String, thisObject?: Object, Ctr: any): any[]; + map(arr: any[], callback: String, thisObject: Object, Ctr: any): any[]; /** * applies callback to each element of arr and returns * an Array with the results @@ -5096,7 +5096,7 @@ declare module dojo { * @param thisObject Optionalmay be used to scope the call to callback * @param Ctr */ - map(arr: String, callback: String, thisObject?: Object, Ctr: any): any[]; + map(arr: String, callback: String, thisObject: Object, Ctr: any): any[]; /** * Determines whether or not any item in arr satisfies the * condition implemented by callback. From 043288c68ebef1b3c4c11cb1b96a04f8129405ae Mon Sep 17 00:00:00 2001 From: Slavo Vojacek Date: Fri, 22 May 2015 17:23:41 +0100 Subject: [PATCH 042/137] Update gapi.d.ts I am using Google+ Sign-In on one of my applications and I needed to add a couple of definitions into this file. The update is based on https://developers.google.com/+/web/signin/reference#javascript_api. --- gapi/gapi.d.ts | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gapi/gapi.d.ts b/gapi/gapi.d.ts index d9d6fb90b..8c50826d4 100644 --- a/gapi/gapi.d.ts +++ b/gapi/gapi.d.ts @@ -65,6 +65,45 @@ declare module gapi.auth { * @param token The token to set. */ export function setToken(token: GoogleApiOAuth2TokenObject): void; + /** + * Initiates the client-side Google+ Sign-In OAuth 2.0 flow. + * When the method is called, the OAuth 2.0 authorization dialog is displayed to the user and when they accept, the callback function is called. + * @param params + */ + export function signIn(params: { + /** + * Your OAuth 2.0 client ID that you obtained from the Google Developers Console. + */ + clientid?: string; + /** + * Directs the sign-in button to store user and session information in a session cookie and HTML5 session storage on the user's client for the purpose of minimizing HTTP traffic and distinguishing between multiple Google accounts a user might be signed into. + */ + cookiepolicy?: string; + /** + * A function in the global namespace, which is called when the sign-in button is rendered and also called after a sign-in flow completes. + */ + callback?: Function; + /** + * If true, all previously granted scopes remain granted in each incremental request, for incremental authorization. The default value true is correct for most use cases; use false only if employing delegated auth, where you pass the bearer token to a less-trusted component with lower programmatic authority. + */ + includegrantedscopes?: boolean; + /** + * If your app will write moments, list the full URI of the types of moments that you intend to write. + */ + requestvisibleactions?: any; + /** + * The OAuth 2.0 scopes for the APIs that you would like to use as a space-delimited list. + */ + scope?: any; + /** + * If you have an Android app, you can drive automatic Android downloads from your web sign-in flow. + */ + apppackagename?: string; + }): void; + /** + * Signs a user out of your app without logging the user out of Google. This method will only work when the user is signed in with Google+ Sign-In. + */ + export function signOut(): void; } declare module gapi.client { From dd10c1a6f9b2e243b34544334f160af03ab80459 Mon Sep 17 00:00:00 2001 From: Tom Hasner Date: Fri, 22 May 2015 15:47:41 -0400 Subject: [PATCH 043/137] scoping exported interfaces with an `Interact` module --- interactjs/interact.d.ts | 468 +++++++++++++++++++-------------------- 1 file changed, 234 insertions(+), 234 deletions(-) diff --git a/interactjs/interact.d.ts b/interactjs/interact.d.ts index 1ad864607..495e5e1a3 100644 --- a/interactjs/interact.d.ts +++ b/interactjs/interact.d.ts @@ -1,245 +1,245 @@ // Type definitions for Interacting for interact.js v1.0.25 // Project: https://github.com/taye/interact.js -// Definitions by: Douglas Eichelberger , Adi Dahiya +// Definitions by: Douglas Eichelberger , Adi Dahiya , Tom Hasner // Definitions: https://github.com/borisyankov/DefinitelyTyped // API documentation: http://interactjs.io/docs -interface Interactable { - // returns Element or string - accept(): any; - accept(newValue: Element): Interactable; - accept(newValue: string): Interactable; - actionChecker(): Function; - actionChecker(checker: Function): Interactable; - // returns boolean or {[key: string]: any} - autoScroll(): any; - autoScroll(options: boolean): Interactable; - autoScroll(options: {[key: string]: any}): Interactable; - context(): Node; - defaultActionChecker(event: any): string; - deltaSource(): string; - // returns Interactable if newValue is "page" or "client", otherwise returns string - deltaSource(newValue: String): Interactable; - draggable(): boolean; - draggable(options: boolean): Interactable; - draggable(options: {[key: string]: any}): Interactable; - dropCheck(event: MouseEvent): boolean; - dropCheck(event: TouchEvent): boolean; - dropChecker(): Function; - dropChecker(checker: Function): Interactable; - // returns boolean or {[key: string]: any} - dropzone(): any; - dropzone(options: boolean): Interactable; - dropzone(options: {[key: string]: any}): Interactable; - // return HTMLElement or SVGElement - element(): Element; - fire(iEvent: InteractEvent): Interactable; - // returns boolean or {[key: string]: any} - gesturable(): any; - gesturable(options: boolean): Interactable; - gesturable(options: {[key: string]: any}): Interactable; - getRect(): ClientRect; - // returns Element or string - ignoreFrom(): any; - ignoreFrom(newValue: string): Interactable; - ignoreFrom(newValue: Element): Interactable; - // returns boolean or {[key: string]: any} - inertia(): any; - inertia(options: boolean): Interactable; - inertia(options: {[key: string]: any}): Interactable; - off(eventType: string, listener: Function, useCapture?: boolean): Interactable; - on(eventType: string, listener: Function, useCapture?: boolean): Interactable; - origin(): Point; - origin(newValue: HTMLElement): Interactable; - origin(newValue: SVGElement): Interactable; - origin(newValue: Point): Interactable; - rectChecker(): Function; - rectChecker(newValue: Function): Interactable; - resizable(): Interactable; - resizable(options: boolean): Interactable; - resizable(options: {[key: string]: any}): Interactable; - restrict(): Restrict; - restrict(newValue: Restrict): Interactable; - set(options: {[key: string]: any}): Interactable; - // returns boolean or {[key: string]: any} - snap(): any; - snap(options: boolean): Interactable; - snap(options: {[key: string]: any}): Interactable; - squareResize(): boolean; - squareResize(newValue: boolean): Interactable; - styleCursor(): boolean; - styleCursor(newValue: boolean): Interactable; - unset(): InteractStatic; - validateSetting(context: string, option: string, value: any): any; +declare module Interact { + interface Interactable { + // returns Element or string + accept(): any; + accept(newValue: Element): Interactable; + accept(newValue: string): Interactable; + actionChecker(): Function; + actionChecker(checker: Function): Interactable; + // returns boolean or {[key: string]: any} + autoScroll(): any; + autoScroll(options: boolean): Interactable; + autoScroll(options: {[key: string]: any}): Interactable; + context(): Node; + defaultActionChecker(event: any): string; + deltaSource(): string; + // returns Interactable if newValue is "page" or "client", otherwise returns string + deltaSource(newValue: String): Interactable; + draggable(): boolean; + draggable(options: boolean): Interactable; + draggable(options: {[key: string]: any}): Interactable; + dropCheck(event: MouseEvent): boolean; + dropCheck(event: TouchEvent): boolean; + dropChecker(): Function; + dropChecker(checker: Function): Interactable; + // returns boolean or {[key: string]: any} + dropzone(): any; + dropzone(options: boolean): Interactable; + dropzone(options: {[key: string]: any}): Interactable; + // return HTMLElement or SVGElement + element(): Element; + fire(iEvent: InteractEvent): Interactable; + // returns boolean or {[key: string]: any} + gesturable(): any; + gesturable(options: boolean): Interactable; + gesturable(options: {[key: string]: any}): Interactable; + getRect(): ClientRect; + // returns Element or string + ignoreFrom(): any; + ignoreFrom(newValue: string): Interactable; + ignoreFrom(newValue: Element): Interactable; + // returns boolean or {[key: string]: any} + inertia(): any; + inertia(options: boolean): Interactable; + inertia(options: {[key: string]: any}): Interactable; + off(eventType: string, listener: Function, useCapture?: boolean): Interactable; + on(eventType: string, listener: Function, useCapture?: boolean): Interactable; + origin(): Point; + origin(newValue: HTMLElement): Interactable; + origin(newValue: SVGElement): Interactable; + origin(newValue: Point): Interactable; + rectChecker(): Function; + rectChecker(newValue: Function): Interactable; + resizable(): Interactable; + resizable(options: boolean): Interactable; + resizable(options: {[key: string]: any}): Interactable; + restrict(): Restrict; + restrict(newValue: Restrict): Interactable; + set(options: {[key: string]: any}): Interactable; + // returns boolean or {[key: string]: any} + snap(): any; + snap(options: boolean): Interactable; + snap(options: {[key: string]: any}): Interactable; + squareResize(): boolean; + squareResize(newValue: boolean): Interactable; + styleCursor(): boolean; + styleCursor(newValue: boolean): Interactable; + unset(): InteractStatic; + validateSetting(context: string, option: string, value: any): any; + } + + interface Coordinates { + clientX: number; + clientY: number; + pageX: number; + pageY: number; + timeStamp: number; + } + + interface Debug { + target: any; + dragging: any; + resizing: any; + gesturing: any; + prepared: any; + + prevCoords: Coordinates; + downCoords: Coordinates; + + pointerIds: any[]; + pointerMoves: any[]; + addPointer: any; + removePointer: any; + recordPointers: any; + + inertia: InertiaStatus; + + downTime: any; + downEvent: any; + prevEvent: any; + + Interactable: any; + IOptions: any; + interactables: any; + dropzones: any; + pointerIsDown: any; + defaultOptions: any; + defaultActionChecker: any; + + actions: any; + dragMove: any; + resizeMove: any; + gestureMove: any; + pointerUp: any; + pointerDown: any; + pointerMove: any; + pointerHover: any; + + events: any; + globalEvents: any; + delegatedEvents: any; + } + + interface InertiaStatus { + active: boolean; + target: any; + targetElement: any; + + startEvent: any; + pointerUp: any + + xe: number; + ye: number; + duration: number; + + t0: number; + vx0: number; + vys: number; + + lambda_v0: number; + one_ve_v0: number; + i: any; + } + + interface Point { + x: number; + y: number; + } + + // value types are either ClientRect or Element + interface Restrict { + drag?: any; + gesture?: any; + resize?: any; + elementRect?: {[direction: string]: number}; + } + + interface InteractEvent { + altKey: boolean; + axes: string; + button: number + clientX0: number; + clientX: number + clientY0: number; + clientY: number + ctrlKey: boolean + dt: number; + duration: number; + dx: number; + dy: number; + metaKey: boolean; + pageX: number; + pageY: number; + shiftKey: boolean; + speed: number; + t0: number; + target: any; + timeStamp: number; + type: string; + velocityX: number; + velocityY: number; + x0: number; + y0: number; + } + + interface TouchEvent { + pageX: number; + pageY: number; + type: string; + } + + interface InteractStatic { + (element: HTMLElement): Interactable; + (element: SVGElement): Interactable; + (element: string): Interactable; + // returns boolean or {[key: string]: any} + autoScroll(): any; + autoScroll(options: boolean): InteractStatic; + autoScroll(options: {[key: string]: any}): InteractStatic; + currentAction(): string + debug(): Debug; + deltaSource(): string; + // "page" and "client" are the valid parameters + deltaSource(newValue: string): InteractStatic; + dynamicDrop(): boolean; + dynamicDrop(newValue: boolean): InteractStatic; + enableDragging(): boolean; + enableDragging(newValue: boolean): InteractStatic; + enableGesturing(): boolean; + enableGesturing(newValue: boolean): InteractStatic; + enableResizing(): boolean; + enableResizing(newValue: boolean): InteractStatic; + // returns boolean or {[key: string]: any} + inertia(): any; + inertia(options: boolean): InteractStatic; + inertia(options: {[key: string]: any}): InteractStatic; + isSet(element: Element): boolean; + margin(): number; + margin(newvalue: number): InteractStatic; + off(type: string, listener: Function, useCapture?: boolean): InteractStatic; + on(type: string, listener: Function, useCapture?: boolean): InteractStatic; + restrict(): Restrict; + restrict(newValue: Restrict): InteractStatic; + simulate(action: string, element: Element, pointerEvent?: any): InteractStatic; + // returns boolean or {[key: string]: any} + snap(): any; + snap(options: boolean): InteractStatic; + snap(options: {[key: string]: any}): InteractStatic; + stop(event: Event): InteractStatic; + styleCursor(): boolean; + styleCursor(newValue: boolean): InteractStatic; + supportsTouch(): boolean + } } -interface Coordinates { - clientX: number; - clientY: number; - pageX: number; - pageY: number; - timeStamp: number; -} - -interface Debug { - target: any; - dragging: any; - resizing: any; - gesturing: any; - prepared: any; - - prevCoords: Coordinates; - downCoords: Coordinates; - - pointerIds: any[]; - pointerMoves: any[]; - addPointer: any; - removePointer: any; - recordPointers: any; - - inertia: InertiaStatus; - - downTime: any; - downEvent: any; - prevEvent: any; - - Interactable: any; - IOptions: any; - interactables: any; - dropzones: any; - pointerIsDown: any; - defaultOptions: any; - defaultActionChecker: any; - - actions: any; - dragMove: any; - resizeMove: any; - gestureMove: any; - pointerUp: any; - pointerDown: any; - pointerMove: any; - pointerHover: any; - - events: any; - globalEvents: any; - delegatedEvents: any; -} - -interface InertiaStatus { - active: boolean; - target: any; - targetElement: any; - - startEvent: any; - pointerUp: any - - xe: number; - ye: number; - duration: number; - - t0: number; - vx0: number; - vys: number; - - lambda_v0: number; - one_ve_v0: number; - i: any; -} - -interface Point { - x: number; - y: number; -} - -// value types are either ClientRect or Element -interface Restrict { - drag?: any; - gesture?: any; - resize?: any; - elementRect?: {[direction: string]: number}; -} - -interface InteractEvent { - altKey: boolean; - axes: string; - button: number - clientX0: number; - clientX: number - clientY0: number; - clientY: number - ctrlKey: boolean - dt: number; - duration: number; - dx: number; - dy: number; - metaKey: boolean; - pageX: number; - pageY: number; - shiftKey: boolean; - speed: number; - t0: number; - target: any; - timeStamp: number; - type: string; - velocityX: number; - velocityY: number; - x0: number; - y0: number; -} - -interface TouchEvent { - changedTouches: any[]; - pageX: number; - pageY: number; - touches: any[]; - type: string; -} - -interface InteractStatic { - (element: HTMLElement): Interactable; - (element: SVGElement): Interactable; - (element: string): Interactable; - // returns boolean or {[key: string]: any} - autoScroll(): any; - autoScroll(options: boolean): InteractStatic; - autoScroll(options: {[key: string]: any}): InteractStatic; - currentAction(): string - debug(): Debug; - deltaSource(): string; - // "page" and "client" are the valid parameters - deltaSource(newValue: string): InteractStatic; - dynamicDrop(): boolean; - dynamicDrop(newValue: boolean): InteractStatic; - enableDragging(): boolean; - enableDragging(newValue: boolean): InteractStatic; - enableGesturing(): boolean; - enableGesturing(newValue: boolean): InteractStatic; - enableResizing(): boolean; - enableResizing(newValue: boolean): InteractStatic; - // returns boolean or {[key: string]: any} - inertia(): any; - inertia(options: boolean): InteractStatic; - inertia(options: {[key: string]: any}): InteractStatic; - isSet(element: Element): boolean; - margin(): number; - margin(newvalue: number): InteractStatic; - off(type: string, listener: Function, useCapture?: boolean): InteractStatic; - on(type: string, listener: Function, useCapture?: boolean): InteractStatic; - restrict(): Restrict; - restrict(newValue: Restrict): InteractStatic; - simulate(action: string, element: Element, pointerEvent?: any): InteractStatic; - // returns boolean or {[key: string]: any} - snap(): any; - snap(options: boolean): InteractStatic; - snap(options: {[key: string]: any}): InteractStatic; - stop(event: Event): InteractStatic; - styleCursor(): boolean; - styleCursor(newValue: boolean): InteractStatic; - supportsTouch(): boolean -} - -declare var interact: InteractStatic; +declare var interact: Interact.InteractStatic; declare module "interact" { export = interact; From 92c408d7d8f7bf7d91f6e494a589362cc3a2316c Mon Sep 17 00:00:00 2001 From: Daniel Beckwith Date: Fri, 22 May 2015 16:55:48 -0400 Subject: [PATCH 044/137] Added bootstrap-slider --- bootstrap-slider/bootstrap-slider-tests.ts | 120 +++++++++++++ bootstrap-slider/bootstrap-slider.d.ts | 200 +++++++++++++++++++++ 2 files changed, 320 insertions(+) create mode 100644 bootstrap-slider/bootstrap-slider-tests.ts create mode 100644 bootstrap-slider/bootstrap-slider.d.ts diff --git a/bootstrap-slider/bootstrap-slider-tests.ts b/bootstrap-slider/bootstrap-slider-tests.ts new file mode 100644 index 000000000..0524323e0 --- /dev/null +++ b/bootstrap-slider/bootstrap-slider-tests.ts @@ -0,0 +1,120 @@ +/// +/// + +$(function() { + // examples from http://seiyria.github.io/bootstrap-slider/ + + $('#ex1').slider({ + formatter: function(value) { + return 'Current value: ' + value; + } + }); + + + + $("#ex2").slider({}); + + var RGBChange = function() { + $('#RGB').css('background', 'rgb('+r.getValue()+','+g.getValue()+','+b.getValue()+')') + }; + + var r = $('#R').slider() + .on('slide', RGBChange) + .data('slider'); + var g = $('#G').slider() + .on('slide', RGBChange) + .data('slider'); + var b = $('#B').slider() + .on('slide', RGBChange) + .data('slider'); + + + + $("#ex4").slider({ + reversed : true + }); + + + + $("#ex5").slider(); + + $("#destroyEx5Slider").click(function() { + $("#ex5").slider('destroy'); + }); + + + + $("#ex6").slider(); + $("#ex6").on("slide", function(slideEvt) { + $("#ex6SliderVal").text(slideEvt.value); + }); + + + + $("#ex7").slider(); + + $("#ex7-enabled").click(function() { + if(this.checked) { + // With JQuery + $("#ex7").slider("enable"); + } + else { + // With JQuery + $("#ex7").slider("disable"); + } + }); + + + + $("#ex8").slider({ + tooltip: 'always' + }); + + + + $("#ex9").slider({ + precision: 2, + value: 8.115 // Slider will instantiate showing 8.12 due to specified precision + }); + + + + $("#ex11").slider({step: 20000, min: 0, max: 200000}); + + + + $("#ex12a").slider({ id: "slider12a", min: 0, max: 10, value: 5 }); + $("#ex12b").slider({ id: "slider12b", min: 0, max: 10, range: true, value: [3, 7] }); + $("#ex12c").slider({ id: "slider12c", min: 0, max: 10, range: true, value: [3, 7] }); + + + + $("#ex13").slider({ + ticks: [0, 100, 200, 300, 400], + ticks_labels: ['$0', '$100', '$200', '$300', '$400'], + ticks_snap_bounds: 30 + }); + + + + $("#ex14").slider({ + ticks: [0, 100, 200, 300, 400], + ticks_positions: [0, 30, 60, 70, 90, 100], + ticks_labels: ['$0', '$100', '$200', '$300', '$400'], + ticks_snap_bounds: 30 + }); + + + + $("#ex15").slider({ + min: 1000, + max: 10000000, + scale: 'logarithmic', + step: 10 + }); + + + + $("#ex16a").slider({ min: 0, max: 10, value: 0, focus: true }); + $("#ex16b").slider({ min: 0, max: 10, value: [0, 10], focus: true }); +}); diff --git a/bootstrap-slider/bootstrap-slider.d.ts b/bootstrap-slider/bootstrap-slider.d.ts new file mode 100644 index 000000000..e92e2fae2 --- /dev/null +++ b/bootstrap-slider/bootstrap-slider.d.ts @@ -0,0 +1,200 @@ +// Type definitions for bootstrap-slider.js 4.8.3 +// Project: https://github.com/seiyria/bootstrap-slider +// Definitions by: Daniel Beckwith +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface SliderOptions { + /** + * Default: '' + * set the id of the slider element when it's created + */ + id?: string; + /** + * Default: 0 + * minimum possible value + */ + min?: number; + /** + * Default: 10 + * maximum possible value + */ + max?: number; + /** + * Default: 1 + * increment step + */ + step?: number; + /** + * Default: number of digits after the decimal of step value + * The number of digits shown after the decimal. Defaults to the number of digits after the decimal of step value. + */ + precision?: number; + /** + * Default: 'horizontal' + * set the orientation. Accepts 'vertical' or 'horizontal' + */ + orientation?: number; + /** + * Default: 5 + * initial value. Use array to have a range slider. + */ + value?: number|number[]; + /** + * Default: false + * make range slider. Optional if initial value is an array. If initial value is scalar, max will be used for second value. + */ + range?: boolean; + /** + * Default: 'before' + * selection placement. Accepts: 'before', 'after' or 'none'. In case of a range slider, the selection will be placed between the handles + */ + selection?: string; + /** + * Default: 'show' + * whether to show the tooltip on drag, hide the tooltip, or always show the tooltip. Accepts: 'show', 'hide', or 'always' + */ + tooltip?: string; + /** + * Default: false + * if false show one tootip if true show two tooltips one for each handler + */ + tooltip_split?: boolean; + /** + * Default: 'round' + * handle shape. Accepts: 'round', 'square', 'triangle' or 'custom' + */ + handle?: string; + /** + * Default: false + * whether or not the slider should be reversed + */ + reversed?: boolean; + /** + * Default: true + * whether or not the slider is initially enabled + */ + enabled?: boolean; + /** + * Default: returns the plain value + * formatter callback. Return the value wanted to be displayed in the tooltip + * @param number the current value to display + */ + formatter?(number): string; + /** + * Default: false + * The natural order is used for the arrow keys. Arrow up select the upper slider value for vertical sliders, arrow right the righter slider value for a horizontal slider - no matter if the slider was reversed or not. By default the arrow keys are oriented by arrow up/right to the higher slider value, arrow down/left to the lower slider value. + */ + natural_arrow_keys?: boolean; + /** + * Default: [ ] + * Used to define the values of ticks. Tick marks are indicators to denote special values in the range. This option overwrites min and max options. + */ + ticks?: number[]; + /** + * Default: [ ] + * Defines the positions of the tick values in percentages. The first value should alwasy be 0, the last value should always be 100 percent. + */ + ticks_positions?: number[]; + /** + * Default: [ ] + * Defines the labels below the tick marks. Accepts HTML input. + */ + ticks_labels?: number[]; + /** + * Default: 0 + * Used to define the snap bounds of a tick. Snaps to the tick if value is within these bounds. + */ + ticks_snap_bounds?: number; + /** + * Default: 'linear' + * Set to 'logarithmic' to use a logarithmic scale. + */ + scale?: string; + /** + * Default: false + * Focus the appropriate slider handle after a value change. + */ + focus?: boolean; +} + +interface JQuery { + /** + * Creates a slider from the current element. + * @param options + */ + slider(options?:SliderOptions): JQuery; + slider(methodName:string, ...args:any[]): JQuery; +} + +interface ChangeValue { + oldValue: number; + newValue: number; +} + +interface JQueryEventObject { + value: number|ChangeValue; +} + +/** + * This class is actually not used when using the jQuery version of bootstrap-slider + * The method documentation is still here thouh. + * When using jQuery, slider methods like setValue(3, true) have to be called like $slider.slider('setValue', 3, true) + */ +interface Slider extends JQuery { + /** + * Get the current value from the slider + */ + getValue(): number; + /** + * Set a new value for the slider. If optional triggerSlideEvent parameter is true, 'slide' events will be triggered. If optional triggerChangeEvent parameter is true, 'change' events will be triggered. + * @param newValue + * @param triggerSlideEvent + * @param triggerChangeEvent + */ + setValue(newValue:number, triggerSlideEvent?:boolean, triggerChangeEvent?:boolean): void; + /** + * Properly clean up and remove the slider instance + */ + destroy(): void; + /** + * Disables the slider and prevents the user from changing the value + */ + disable(): void; + /** + * Enables the slider + */ + enable(): void; + /** + * Returns true if enabled, false if disabled + */ + isEnabled(): boolean; + /** + * Updates the slider's attributes + * @param attribute + * @param value + */ + setAttribute(attribute:string, value:any): void; + /** + * Get the slider's attributes + * @param attribute + */ + getAttribute(attribute:string): any; + /** + * Refreshes the current slider + */ + refresh(): void; + /** + * Renders the tooltip again, after initialization. Useful in situations when the slider and tooltip are initially hidden. + */ + relayout(): void; + on: { + (eventType:string, callback:(eventObject:JQueryEventObject, ...args:any[]) => any): Slider; + (eventType:string, data:any, callback:(eventObject:JQueryEventObject, ...args:any[]) => any): Slider; + (eventType:string, selector:string, callback:(eventObject:JQueryEventObject, ...eventData:any[]) => any): Slider; + (eventType:string, selector:string, data:any, callback:(eventObject:JQueryEventObject, ...eventData:any[]) => any): Slider; + (eventType:{ [key: string]: any; }, selector?:string, data?:any): Slider; + (eventType:{ [key: string]: any; }, data?:any): Slider; + } +} From 7e901c0f96d50cc6ae1de5391f60cad03385565c Mon Sep 17 00:00:00 2001 From: Daniel Beckwith Date: Fri, 22 May 2015 17:05:12 -0400 Subject: [PATCH 045/137] Fixed build errors. --- bootstrap-slider/bootstrap-slider-tests.ts | 2 +- bootstrap-slider/bootstrap-slider.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-slider/bootstrap-slider-tests.ts b/bootstrap-slider/bootstrap-slider-tests.ts index 0524323e0..548d909a6 100644 --- a/bootstrap-slider/bootstrap-slider-tests.ts +++ b/bootstrap-slider/bootstrap-slider-tests.ts @@ -46,7 +46,7 @@ $(function() { $("#ex6").slider(); $("#ex6").on("slide", function(slideEvt) { - $("#ex6SliderVal").text(slideEvt.value); + $("#ex6SliderVal").text(slideEvt.value); }); diff --git a/bootstrap-slider/bootstrap-slider.d.ts b/bootstrap-slider/bootstrap-slider.d.ts index e92e2fae2..78aeb645c 100644 --- a/bootstrap-slider/bootstrap-slider.d.ts +++ b/bootstrap-slider/bootstrap-slider.d.ts @@ -79,9 +79,9 @@ interface SliderOptions { /** * Default: returns the plain value * formatter callback. Return the value wanted to be displayed in the tooltip - * @param number the current value to display + * @param val the current value to display */ - formatter?(number): string; + formatter?(val:number): string; /** * Default: false * The natural order is used for the arrow keys. Arrow up select the upper slider value for vertical sliders, arrow right the righter slider value for a horizontal slider - no matter if the slider was reversed or not. By default the arrow keys are oriented by arrow up/right to the higher slider value, arrow down/left to the lower slider value. @@ -101,7 +101,7 @@ interface SliderOptions { * Default: [ ] * Defines the labels below the tick marks. Accepts HTML input. */ - ticks_labels?: number[]; + ticks_labels?: string[]; /** * Default: 0 * Used to define the snap bounds of a tick. Snaps to the tick if value is within these bounds. From d930a8fc40d653b1c48a89538f45d9c645d87f28 Mon Sep 17 00:00:00 2001 From: cherrydev Date: Fri, 22 May 2015 17:26:33 -0700 Subject: [PATCH 046/137] Add strictDi() to angular.mocks.inject --- angularjs/angular-mocks.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index db551ee3d..1e412cb8c 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -39,8 +39,11 @@ declare module angular { dump(obj: any): string; // see http://docs.angularjs.org/api/angular.mock.inject - inject(...fns: Function[]): any; - inject(...inlineAnnotatedConstructor: any[]): any; // this overload is undocumented, but works + inject: { + (...fns: Function[]): any; + (...inlineAnnotatedConstructor: any[]): any; // this overload is undocumented, but works + strictDi(val: boolean): void; + } // see http://docs.angularjs.org/api/angular.mock.module module(...modules: any[]): any; From e3e6c4d8fee264dbdfb6d28a75dc2a1b1083fad7 Mon Sep 17 00:00:00 2001 From: Haskell Camargo Date: Sat, 23 May 2015 00:57:06 -0300 Subject: [PATCH 047/137] Added Zynga Scroller library --- zynga-scroller/zynga-scroller-tests.ts | 36 +++++++++++++++++++ zynga-scroller/zynga-scroller.ts | 49 ++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 zynga-scroller/zynga-scroller-tests.ts create mode 100644 zynga-scroller/zynga-scroller.ts diff --git a/zynga-scroller/zynga-scroller-tests.ts b/zynga-scroller/zynga-scroller-tests.ts new file mode 100644 index 000000000..575c8f3fc --- /dev/null +++ b/zynga-scroller/zynga-scroller-tests.ts @@ -0,0 +1,36 @@ +/// + +var scroller: Scroller = new Scroller((left, top, zoom) => { }); +scroller = new Scroller((left, top, zoom) => { }, { + scrollingX: true, + scrollingY: true, + animating: true, + animationDuration: 400, + bouncing: false, + locking: false, + paging: false, + snapping: true, + zooming: 10, + minZoom: 1, + maxZoom: 2, +}); + +scroller.setDimensions(10, 10, 10, 10); +scroller.setPosition(200, 300); +scroller.setSnapSize(300, 300); +scroller.activatePullToRefresh(200, () => { }, () => { }, () => { }); +scroller.finishPullToRefresh(); +var data: { + left: number, + top: number, + zoom: number +} = scroller.getValues(); +scroller.zoomTo(10); +scroller.zoomBy(10); +scroller.doMouseZoom(10, 10, 10, 10); +scroller.doTouchStart({ + pageX: 10, + pageY: 20 +}, 200); +scroller.doTouchMove([10], 200); +scroller.doTouchEnd(300); \ No newline at end of file diff --git a/zynga-scroller/zynga-scroller.ts b/zynga-scroller/zynga-scroller.ts new file mode 100644 index 000000000..9e1e4bb92 --- /dev/null +++ b/zynga-scroller/zynga-scroller.ts @@ -0,0 +1,49 @@ +// Type definitions for Zynga Scroller +// Definitions by: Marcelo Haskell Camargo +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare class Scroller { + constructor(a: (left: number, top: number, zoom: number) => void, b?: { + scrollingX?: boolean, + scrollingY?: boolean, + animating?: boolean, + animationDuration?: number, + bouncing?: boolean, + locking?: boolean, + paging?: boolean, + snapping?: boolean, + zooming?: number, + minZoom?: number, + maxZoom?: number + }); + setDimensions(clientWidth: number, clientHeight: number, contentWidth: number, + contentHeight: number): void; + setPosition(clientLeft: number, clientTop: number): void; + setSnapSize(width: number, height: number); + activatePullToRefresh(height: number, activate: () => void, + deactivate: () => void, start: () => void); + finishPullToRefresh(): void; + getValues(): { + left: number, + top: number, + zoom: number + }; + zoomTo(level: number, animate?: boolean, originLeft?: number, + originTop?: number): void; + zoomBy(factor: number, animate?: boolean, originLeft?:number, + originTop?: number): void; + scrollTo(left: number, top: number, animate?: boolean): void; + scrollBy(leftOffset: number, topOffset: number, animate?: boolean): void; + doMouseZoom(wheelData: number, timeStamp: number, pageX: number, + pageY: number): void; + doTouchStart(touches: { + pageX: number, + pageY: number, + }, timeStamp: number): void; + doTouchMove(touches: { + pageX: number, + pageY: number, + }, timeStamp: number, scale?: number): void; + doTouchMove(touches: [any], timeStamp: number); + doTouchEnd(timeStamp: number): void; +} \ No newline at end of file From 4e88cdc797a21e9fb260a949a779e78e773306c3 Mon Sep 17 00:00:00 2001 From: Haskell Camargo Date: Sat, 23 May 2015 01:10:36 -0300 Subject: [PATCH 048/137] Fixed issue in filename to pass on Travis --- zynga-scroller/zynga-scroller.d.ts | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 zynga-scroller/zynga-scroller.d.ts diff --git a/zynga-scroller/zynga-scroller.d.ts b/zynga-scroller/zynga-scroller.d.ts new file mode 100644 index 000000000..9e1e4bb92 --- /dev/null +++ b/zynga-scroller/zynga-scroller.d.ts @@ -0,0 +1,49 @@ +// Type definitions for Zynga Scroller +// Definitions by: Marcelo Haskell Camargo +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare class Scroller { + constructor(a: (left: number, top: number, zoom: number) => void, b?: { + scrollingX?: boolean, + scrollingY?: boolean, + animating?: boolean, + animationDuration?: number, + bouncing?: boolean, + locking?: boolean, + paging?: boolean, + snapping?: boolean, + zooming?: number, + minZoom?: number, + maxZoom?: number + }); + setDimensions(clientWidth: number, clientHeight: number, contentWidth: number, + contentHeight: number): void; + setPosition(clientLeft: number, clientTop: number): void; + setSnapSize(width: number, height: number); + activatePullToRefresh(height: number, activate: () => void, + deactivate: () => void, start: () => void); + finishPullToRefresh(): void; + getValues(): { + left: number, + top: number, + zoom: number + }; + zoomTo(level: number, animate?: boolean, originLeft?: number, + originTop?: number): void; + zoomBy(factor: number, animate?: boolean, originLeft?:number, + originTop?: number): void; + scrollTo(left: number, top: number, animate?: boolean): void; + scrollBy(leftOffset: number, topOffset: number, animate?: boolean): void; + doMouseZoom(wheelData: number, timeStamp: number, pageX: number, + pageY: number): void; + doTouchStart(touches: { + pageX: number, + pageY: number, + }, timeStamp: number): void; + doTouchMove(touches: { + pageX: number, + pageY: number, + }, timeStamp: number, scale?: number): void; + doTouchMove(touches: [any], timeStamp: number); + doTouchEnd(timeStamp: number): void; +} \ No newline at end of file From 6f02b8773fc194bcfdc0b583b76330e0f566cb10 Mon Sep 17 00:00:00 2001 From: Haskell Camargo Date: Sat, 23 May 2015 01:16:51 -0300 Subject: [PATCH 049/137] Fixed issue with semicolons --- zynga-scroller/zynga-scroller.ts | 49 -------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 zynga-scroller/zynga-scroller.ts diff --git a/zynga-scroller/zynga-scroller.ts b/zynga-scroller/zynga-scroller.ts deleted file mode 100644 index 9e1e4bb92..000000000 --- a/zynga-scroller/zynga-scroller.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Type definitions for Zynga Scroller -// Definitions by: Marcelo Haskell Camargo -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare class Scroller { - constructor(a: (left: number, top: number, zoom: number) => void, b?: { - scrollingX?: boolean, - scrollingY?: boolean, - animating?: boolean, - animationDuration?: number, - bouncing?: boolean, - locking?: boolean, - paging?: boolean, - snapping?: boolean, - zooming?: number, - minZoom?: number, - maxZoom?: number - }); - setDimensions(clientWidth: number, clientHeight: number, contentWidth: number, - contentHeight: number): void; - setPosition(clientLeft: number, clientTop: number): void; - setSnapSize(width: number, height: number); - activatePullToRefresh(height: number, activate: () => void, - deactivate: () => void, start: () => void); - finishPullToRefresh(): void; - getValues(): { - left: number, - top: number, - zoom: number - }; - zoomTo(level: number, animate?: boolean, originLeft?: number, - originTop?: number): void; - zoomBy(factor: number, animate?: boolean, originLeft?:number, - originTop?: number): void; - scrollTo(left: number, top: number, animate?: boolean): void; - scrollBy(leftOffset: number, topOffset: number, animate?: boolean): void; - doMouseZoom(wheelData: number, timeStamp: number, pageX: number, - pageY: number): void; - doTouchStart(touches: { - pageX: number, - pageY: number, - }, timeStamp: number): void; - doTouchMove(touches: { - pageX: number, - pageY: number, - }, timeStamp: number, scale?: number): void; - doTouchMove(touches: [any], timeStamp: number); - doTouchEnd(timeStamp: number): void; -} \ No newline at end of file From d83732dc9e6e3ea81b68f019e3621e761f4a6019 Mon Sep 17 00:00:00 2001 From: Haskell Camargo Date: Sat, 23 May 2015 01:17:23 -0300 Subject: [PATCH 050/137] Fixed issue with semicolons --- zynga-scroller/zynga-scroller.d.ts | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/zynga-scroller/zynga-scroller.d.ts b/zynga-scroller/zynga-scroller.d.ts index 9e1e4bb92..7d1f6dfa1 100644 --- a/zynga-scroller/zynga-scroller.d.ts +++ b/zynga-scroller/zynga-scroller.d.ts @@ -4,45 +4,45 @@ declare class Scroller { constructor(a: (left: number, top: number, zoom: number) => void, b?: { - scrollingX?: boolean, - scrollingY?: boolean, - animating?: boolean, - animationDuration?: number, - bouncing?: boolean, - locking?: boolean, - paging?: boolean, - snapping?: boolean, - zooming?: number, - minZoom?: number, + scrollingX?: boolean; + scrollingY?: boolean; + animating?: boolean; + animationDuration?: number; + bouncing?: boolean; + locking?: boolean; + paging?: boolean; + snapping?: boolean; + zooming?: number; + minZoom?: number; maxZoom?: number }); setDimensions(clientWidth: number, clientHeight: number, contentWidth: number, - contentHeight: number): void; + contentHeight: number): void; setPosition(clientLeft: number, clientTop: number): void; setSnapSize(width: number, height: number); activatePullToRefresh(height: number, activate: () => void, - deactivate: () => void, start: () => void); + deactivate: () => void, start: () => void); finishPullToRefresh(): void; getValues(): { - left: number, - top: number, + left: number; + top: number; zoom: number }; zoomTo(level: number, animate?: boolean, originLeft?: number, originTop?: number): void; - zoomBy(factor: number, animate?: boolean, originLeft?:number, + zoomBy(factor: number, animate?: boolean, originLeft?: number, originTop?: number): void; scrollTo(left: number, top: number, animate?: boolean): void; scrollBy(leftOffset: number, topOffset: number, animate?: boolean): void; doMouseZoom(wheelData: number, timeStamp: number, pageX: number, pageY: number): void; doTouchStart(touches: { - pageX: number, - pageY: number, + pageX: number; + pageY: number }, timeStamp: number): void; doTouchMove(touches: { - pageX: number, - pageY: number, + pageX: number; + pageY: number }, timeStamp: number, scale?: number): void; doTouchMove(touches: [any], timeStamp: number); doTouchEnd(timeStamp: number): void; From 0983e639167136453c52d573117290946d090886 Mon Sep 17 00:00:00 2001 From: Haskell Camargo Date: Sat, 23 May 2015 01:18:17 -0300 Subject: [PATCH 051/137] Fixed issue with semicolons in tests --- zynga-scroller/zynga-scroller-tests.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/zynga-scroller/zynga-scroller-tests.ts b/zynga-scroller/zynga-scroller-tests.ts index 575c8f3fc..f888bf64c 100644 --- a/zynga-scroller/zynga-scroller-tests.ts +++ b/zynga-scroller/zynga-scroller-tests.ts @@ -2,17 +2,17 @@ var scroller: Scroller = new Scroller((left, top, zoom) => { }); scroller = new Scroller((left, top, zoom) => { }, { - scrollingX: true, - scrollingY: true, - animating: true, - animationDuration: 400, - bouncing: false, - locking: false, - paging: false, - snapping: true, - zooming: 10, - minZoom: 1, - maxZoom: 2, + scrollingX: true; + scrollingY: true; + animating: true; + animationDuration: 400; + bouncing: false; + locking: false; + paging: false; + snapping: true; + zooming: 10; + minZoom: 1; + maxZoom: 2 }); scroller.setDimensions(10, 10, 10, 10); @@ -21,8 +21,8 @@ scroller.setSnapSize(300, 300); scroller.activatePullToRefresh(200, () => { }, () => { }, () => { }); scroller.finishPullToRefresh(); var data: { - left: number, - top: number, + left: number; + top: number; zoom: number } = scroller.getValues(); scroller.zoomTo(10); From cf984a7d53f1618be1439599d6e7e6ddd1003a06 Mon Sep 17 00:00:00 2001 From: Haskell Camargo Date: Sat, 23 May 2015 01:22:22 -0300 Subject: [PATCH 052/137] Added project annotation and explicit return --- zynga-scroller/zynga-scroller-tests.ts | 20 ++++++++++---------- zynga-scroller/zynga-scroller.d.ts | 7 ++++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/zynga-scroller/zynga-scroller-tests.ts b/zynga-scroller/zynga-scroller-tests.ts index f888bf64c..412765671 100644 --- a/zynga-scroller/zynga-scroller-tests.ts +++ b/zynga-scroller/zynga-scroller-tests.ts @@ -2,16 +2,16 @@ var scroller: Scroller = new Scroller((left, top, zoom) => { }); scroller = new Scroller((left, top, zoom) => { }, { - scrollingX: true; - scrollingY: true; - animating: true; - animationDuration: 400; - bouncing: false; - locking: false; - paging: false; - snapping: true; - zooming: 10; - minZoom: 1; + scrollingX: true, + scrollingY: true, + animating: true, + animationDuration: 400, + bouncing: false, + locking: false, + paging: false, + snapping: true, + zooming: 10, + minZoom: 1, maxZoom: 2 }); diff --git a/zynga-scroller/zynga-scroller.d.ts b/zynga-scroller/zynga-scroller.d.ts index 7d1f6dfa1..f4b9501ed 100644 --- a/zynga-scroller/zynga-scroller.d.ts +++ b/zynga-scroller/zynga-scroller.d.ts @@ -1,4 +1,5 @@ // Type definitions for Zynga Scroller +// Project: Zynga Scroller // Definitions by: Marcelo Haskell Camargo // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -19,9 +20,9 @@ declare class Scroller { setDimensions(clientWidth: number, clientHeight: number, contentWidth: number, contentHeight: number): void; setPosition(clientLeft: number, clientTop: number): void; - setSnapSize(width: number, height: number); + setSnapSize(width: number, height: number): void; activatePullToRefresh(height: number, activate: () => void, - deactivate: () => void, start: () => void); + deactivate: () => void, start: () => void): void; finishPullToRefresh(): void; getValues(): { left: number; @@ -44,6 +45,6 @@ declare class Scroller { pageX: number; pageY: number }, timeStamp: number, scale?: number): void; - doTouchMove(touches: [any], timeStamp: number); + doTouchMove(touches: [any], timeStamp: number): void; doTouchEnd(timeStamp: number): void; } \ No newline at end of file From 9796c3973d9fbbd214142ec3da32f952ab9dfd74 Mon Sep 17 00:00:00 2001 From: Haskell Camargo Date: Sat, 23 May 2015 01:24:25 -0300 Subject: [PATCH 053/137] Added URL to project label --- zynga-scroller/zynga-scroller.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zynga-scroller/zynga-scroller.d.ts b/zynga-scroller/zynga-scroller.d.ts index f4b9501ed..04b82b577 100644 --- a/zynga-scroller/zynga-scroller.d.ts +++ b/zynga-scroller/zynga-scroller.d.ts @@ -1,5 +1,5 @@ // Type definitions for Zynga Scroller -// Project: Zynga Scroller +// Project: http://zynga.github.com/scroller/ // Definitions by: Marcelo Haskell Camargo // Definitions: https://github.com/borisyankov/DefinitelyTyped From 978b3e6c748257e4d25c7fa8b9aab2531eb3852f Mon Sep 17 00:00:00 2001 From: Markus Peloso Date: Sat, 23 May 2015 11:41:46 +0200 Subject: [PATCH 054/137] Update type definitons to SweetAlert 1.0.1 --- sweetalert/sweetalert-tests.ts | 8 ++++++-- sweetalert/sweetalert.d.ts | 10 ++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sweetalert/sweetalert-tests.ts b/sweetalert/sweetalert-tests.ts index 9523bc010..ca0faacbf 100644 --- a/sweetalert/sweetalert-tests.ts +++ b/sweetalert/sweetalert-tests.ts @@ -63,7 +63,10 @@ swal({ text: "I will close in 2 seconds.", timer: 2000, showConfirmButton: false -}); +}, + function () { + swal("Time Out!", "The time is out of joint.", "success"); + }); // A replacement for the "prompt" function swal({ @@ -73,7 +76,8 @@ swal({ showCancelButton: true, closeOnConfirm: false, animation: "slide-from-top", - inputPlaceholder: "Write something" + inputPlaceholder: "Write something plx", + inputValue: "Write something" }, function (inputValue) { if (inputValue === false) return false; diff --git a/sweetalert/sweetalert.d.ts b/sweetalert/sweetalert.d.ts index 108e2b906..61b643c32 100644 --- a/sweetalert/sweetalert.d.ts +++ b/sweetalert/sweetalert.d.ts @@ -1,4 +1,4 @@ -// Type definitions for SweetAlert 1.0.0-beta +// Type definitions for SweetAlert 1.0.1 // Project: https://github.com/t4t5/sweetalert/ // Definitions by: Markus Peloso // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -97,7 +97,7 @@ declare module SweetAlert { imageSize?: string; /** - * Auto close timer of the modal.Set in ms (milliseconds). + * Auto close timer of the modal. Set in ms (milliseconds). * Default: null */ timer?: number; @@ -125,6 +125,12 @@ declare module SweetAlert { * Default: null */ inputPlaceholder?: string; + + /** + * Specify a default text value that you want your input to show when using type: "input" + * Default: null + */ + inputValue?: string; } interface Settings extends SettingsBase { From 8caaea8d482f2da0834fd5d249fddcd728c9ce63 Mon Sep 17 00:00:00 2001 From: Michael Zabka Date: Sat, 23 May 2015 14:12:24 +0200 Subject: [PATCH 055/137] Fix numeric properties of node-each object --- each/each-tests.ts | 6 +++--- each/each.d.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/each/each-tests.ts b/each/each-tests.ts index 370e6ac39..4b07c694d 100644 --- a/each/each-tests.ts +++ b/each/each-tests.ts @@ -6,9 +6,9 @@ function testEach() { return { paused: true, readable: false, - started: true, - done: true, - total: true, + started: 11, + done: 12, + total: 22, on: function (eventName: string, cb: (a: any, b?: () => void) => void) { return EachStaticClass([]); }, diff --git a/each/each.d.ts b/each/each.d.ts index 65d0a3f9d..0e9b900dc 100644 --- a/each/each.d.ts +++ b/each/each.d.ts @@ -6,9 +6,9 @@ interface Each { paused: boolean; readable: boolean; - started: boolean; - done: boolean; - total: boolean; + started: number; + done: number; + total: number; on(eventName: string, onCallback: Function): Each; on(eventName: "item", onItem: (item: any, next: (error?: Error) => void) => void): Each; on(eventName: "error", onError: (error: Error[]) => void): Each; @@ -36,4 +36,4 @@ declare var each: EachStatic; declare module "each" { export = each; -} \ No newline at end of file +} From 7d5e63e281dfdf0405bacd8efcdc251feae8baca Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 22 May 2015 03:54:12 -0400 Subject: [PATCH 056/137] Add typings for raygun4js --- raygun4js/raygun4js-tests.ts | 48 ++++++++++++++++++ raygun4js/raygun4js.d.ts | 97 ++++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 raygun4js/raygun4js-tests.ts create mode 100644 raygun4js/raygun4js.d.ts diff --git a/raygun4js/raygun4js-tests.ts b/raygun4js/raygun4js-tests.ts new file mode 100644 index 000000000..56577765c --- /dev/null +++ b/raygun4js/raygun4js-tests.ts @@ -0,0 +1,48 @@ +/// + +var client: raygun.RaygunStatic = Raygun.noConflict(); + +var newClient: raygun.RaygunStatic = client.constructNewRaygun(); + +client.init('api-key'); +client.init('api-key', { allowInsecureSubmissions: true }); +client.init('api-key', { allowInsecureSubmissions: true }, { some: 'data' }); + +client.withCustomData({ some: 'data' }); + +client.withTags(['tag1', 'tag2']); + +client.attach().detach(); + +client.send(new Error('a error')); +client.send(new Error('a error'), ['tag1', 'tag2']); + +try { + throw new Error('oops'); +} +catch (e) { + client.send(e); +} + +client.setUser('username'); +client.setUser('username', true); +client.setUser('username', false, 'user@email.com', 'Robbie Robot'); +client.setUser('username', false, 'user@email.com', 'Robbie Robot', 'Robbie'); +client.setUser('username', false, 'user@email.com', 'Robbie Robot', 'Robbie', '8ae89fc9-1144-42d6-9629-bf085dab18d2'); + +client.resetAnonymousUser(); + +client.setVersion('1.2.3.4'); + +client.saveIfOffline(true); + +client.filterSensitiveData(['field1', 'field2']); + +client.setFilterScope('all'); + +client.whitelistCrossOriginDomains(['domain1', 'domain2']); + +client.onBeforeSend(payload=> { + payload.OccurredOn = new Date(); + return payload; +}); \ No newline at end of file diff --git a/raygun4js/raygun4js.d.ts b/raygun4js/raygun4js.d.ts new file mode 100644 index 000000000..a3c2feeb4 --- /dev/null +++ b/raygun4js/raygun4js.d.ts @@ -0,0 +1,97 @@ +// Type definitions for raygun4js 1.18.3 +// Project: https://github.com/MindscapeHQ/raygun4js +// Definitions by: Brian Surowiec +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module raygun { + + // https://github.com/MindscapeHQ/raygun4js/blob/c7d8880045214ab6d403d5cc613c207f696a3cdd/src/raygun.js#L533-539 + interface IStackTrace { + LineNumber: number; + ColumnNumber: number; + ClassName: string; + FileName: string; + MethodName: string; + } + + // https://github.com/MindscapeHQ/raygun4js/blob/c7d8880045214ab6d403d5cc613c207f696a3cdd/src/raygun.js#L598-637 + interface IPayload { + OccurredOn: Date; + Details: { + Error: { + ClassName: string; + Message: string; + StackTrace: IStackTrace[]; + }; + Environment: { + UtcOffset: number; + 'User-Language': string; + 'Document-Mode': number; + 'Browser-Width': number; + 'Browser-Height': number; + 'Screen-Width': number; + 'Screen-Height': number; + 'Color-Depth': number; + Browser: string; + 'Browser-Name': string; + 'Browser-Version': string; + Platform: string; + }; + Client: { + Name: string; + Version: string; + }; + UserCustomData: any; + Tags: string[]; + Request: { + Url: string; + QueryString: string; + Headers: { + 'User-Agent': string; + Referer: string; + Host: string; + }; + }; + Version: string; + }; + } + + // https://github.com/MindscapeHQ/raygun4js/blob/c7d8880045214ab6d403d5cc613c207f696a3cdd/src/raygun.js#L61-82 + interface IRaygunOptions { + allowInsecureSubmissions?: boolean; + ignoreAjaxAbort?: boolean; + ignoreAjaxError?: boolean; + disableAnonymousUserTracking?: boolean; + excludedHostnames?: boolean; + excludedUserAgents?: boolean; + wrapAsynchronousCallbacks?: boolean; + debugMode?: boolean; + ignore3rdPartyErrors?: boolean; + } + + interface RaygunStatic { + noConflict(): RaygunStatic; + constructNewRaygun(): RaygunStatic; + init(apiKey: string, options?: IRaygunOptions, customdata?: any): RaygunStatic; + withCustomData(customdata: any): RaygunStatic; + withTags(tags: string[]): RaygunStatic; + attach(): RaygunStatic; + detach(): RaygunStatic; + send(e: Error, customData?: any, tags?: string[]): RaygunStatic; + setUser(user: string, isAnonymous?: boolean, email?: string, fullName?: string, firstName?: string, uuid?: string): RaygunStatic; + resetAnonymousUser(): void; + setVersion(version: string): RaygunStatic; + saveIfOffline(enableOffline: boolean): RaygunStatic; + filterSensitiveData(filteredKeys: string[]): RaygunStatic; + setFilterScope(scope: string): RaygunStatic; + whitelistCrossOriginDomains(whitelist: string[]): RaygunStatic; + onBeforeSend(callback: (payload: IPayload) => IPayload): RaygunStatic; + } + +} + +declare var Raygun: raygun.RaygunStatic; + +declare module 'Raygun' { + export = Raygun; +} \ No newline at end of file From e4ff3c73efd626d2b8887c195451ab61d2d5907f Mon Sep 17 00:00:00 2001 From: Tom Hasner Date: Sun, 24 May 2015 13:18:15 -0400 Subject: [PATCH 057/137] fixing interact tests --- interactjs/interact-tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interactjs/interact-tests.ts b/interactjs/interact-tests.ts index b57a02c97..90f43a966 100644 --- a/interactjs/interact-tests.ts +++ b/interactjs/interact-tests.ts @@ -16,9 +16,9 @@ var interactable = interact(button); interactable.draggable(); interactable.draggable(true); interactable.draggable({ - onstart: (event: InteractEvent) => {}, - onmove : (event: InteractEvent) => {}, - onend : (event: InteractEvent) => {} + onstart: (event: Interact.InteractEvent) => {}, + onmove : (event: Interact.InteractEvent) => {}, + onend : (event: Interact.InteractEvent) => {} }); interactable.dropzone(); interactable.dropzone(true); @@ -45,7 +45,7 @@ interactable.inertia({ }); interactable.inertia(true); interactable.actionChecker(); -interactable.actionChecker((event: MouseEvent, defaultAction: string, interactable2: Interactable) => defaultAction); +interactable.actionChecker((event: MouseEvent, defaultAction: string, interactable2: Interact.Interactable) => defaultAction); var rect: ClientRect = interactable.getRect(); interactable.rectChecker(); interactable.styleCursor(); From da4009486dc74e251946c524d86d87b84c767076 Mon Sep 17 00:00:00 2001 From: cherrydev Date: Sun, 24 May 2015 10:21:22 -0700 Subject: [PATCH 058/137] Update angular-mocks.d.ts --- angularjs/angular-mocks.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index 1e412cb8c..1c1966c1b 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -42,7 +42,7 @@ declare module angular { inject: { (...fns: Function[]): any; (...inlineAnnotatedConstructor: any[]): any; // this overload is undocumented, but works - strictDi(val: boolean): void; + strictDi(val?: boolean): void; } // see http://docs.angularjs.org/api/angular.mock.module From cb587e2dff0c587cc8c72f9358b30a876cf59f62 Mon Sep 17 00:00:00 2001 From: Mathias Rodriguez Date: Fri, 22 May 2015 01:34:39 -0300 Subject: [PATCH 059/137] Add definitions for markerclustererplus. --- .../markerclustererplus-tests.ts | 2217 +++++++++++++++++ markerclustererplus/markerclustererplus.d.ts | 834 +++++++ 2 files changed, 3051 insertions(+) create mode 100644 markerclustererplus/markerclustererplus-tests.ts create mode 100644 markerclustererplus/markerclustererplus.d.ts diff --git a/markerclustererplus/markerclustererplus-tests.ts b/markerclustererplus/markerclustererplus-tests.ts new file mode 100644 index 000000000..c710727aa --- /dev/null +++ b/markerclustererplus/markerclustererplus-tests.ts @@ -0,0 +1,2217 @@ +/// +/// + +module MarkerClusterApp { + export function simple_test() { + var center = new google.maps.LatLng(37.4419, -122.1419); + var map = new google.maps.Map(document.getElementById('map'), { + zoom: 3, + center: center, + mapTypeId: google.maps.MapTypeId.ROADMAP + }); + + var markers: google.maps.Marker[] = []; + for (var i = 0; i < 100; i++) { + var dataPhoto = data.photos[i]; + var latLng = new google.maps.LatLng(dataPhoto.latitude, dataPhoto.longitude); + var marker = new google.maps.Marker({ position: latLng }); + markers.push(marker); + } + var markerCluster = new MarkerClusterer(map, markers); + } + + export function init() { + google.maps.event.addDomListener(window, 'load', simple_test); + } + + // Dummy data from http://cdn.rawgit.com/mahnunchik/markerclustererplus/master/src/data.json + var data = { + "count": 10785236, + "photos": [{"photo_id": 27932, "photo_title": "Atardecer en Embalse", "photo_url": "http://www.panoramio.com/photo/27932", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/27932.jpg", "longitude": -64.404945, "latitude": -32.202924, "width": 500, "height": 375, "upload_date": "25 June 2006", "owner_id": 4483, "owner_name": "Miguel Coranti", "owner_url": "http://www.panoramio.com/user/4483"} + , + {"photo_id": 522084, "photo_title": "In Memoriam Antoine de Saint Exupéry", "photo_url": "http://www.panoramio.com/photo/522084", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/522084.jpg", "longitude": 17.470493, "latitude": 47.867077, "width": 500, "height": 350, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1578881, "photo_title": "Rosina Lamberti,Sunset,Templestowe , Victoria, Australia", "photo_url": "http://www.panoramio.com/photo/1578881", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1578881.jpg", "longitude": 145.141754, "latitude": -37.766372, "width": 500, "height": 474, "upload_date": "01 April 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 97671, "photo_title": "kin-dza-dza", "photo_url": "http://www.panoramio.com/photo/97671", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/97671.jpg", "longitude": 30.785408, "latitude": 46.639301, "width": 500, "height": 375, "upload_date": "09 December 2006", "owner_id": 13058, "owner_name": "Kyryl", "owner_url": "http://www.panoramio.com/user/13058"} + , + {"photo_id": 25514, "photo_title": "Arenal", "photo_url": "http://www.panoramio.com/photo/25514", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/25514.jpg", "longitude": -84.693432, "latitude": 10.479372, "width": 500, "height": 375, "upload_date": "17 June 2006", "owner_id": 4112, "owner_name": "Roberto Garcia", "owner_url": "http://www.panoramio.com/user/4112"} + , + {"photo_id": 57823, "photo_title": "Maria Alm", "photo_url": "http://www.panoramio.com/photo/57823", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57823.jpg", "longitude": 12.900009, "latitude": 47.409968, "width": 500, "height": 333, "upload_date": "05 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 532693, "photo_title": "Wheatfield in afternoon light", "photo_url": "http://www.panoramio.com/photo/532693", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/532693.jpg", "longitude": 11.272659, "latitude": 59.637472, "width": 500, "height": 333, "upload_date": "22 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 57819, "photo_title": "Burg Hohenwerfen", "photo_url": "http://www.panoramio.com/photo/57819", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57819.jpg", "longitude": 13.189259, "latitude": 47.483221, "width": 500, "height": 333, "upload_date": "05 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 1282387, "photo_title": "Thunderstorm in Martinique", "photo_url": "http://www.panoramio.com/photo/1282387", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1282387.jpg", "longitude": -61.013432, "latitude": 14.493688, "width": 500, "height": 400, "upload_date": "12 March 2007", "owner_id": 49870, "owner_name": "Jean-Michel Raggioli", "owner_url": "http://www.panoramio.com/user/49870"} + , + {"photo_id": 945976, "photo_title": "Al tard", "photo_url": "http://www.panoramio.com/photo/945976", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/945976.jpg", "longitude": 0.490866, "latitude": 40.903783, "width": 335, "height": 500, "upload_date": "21 February 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 73514, "photo_title": "Hintersee bei Ramsau", "photo_url": "http://www.panoramio.com/photo/73514", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/73514.jpg", "longitude": 12.852459, "latitude": 47.609519, "width": 500, "height": 333, "upload_date": "30 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 298967, "photo_title": "Antelope Canyon, Ray of Light", "photo_url": "http://www.panoramio.com/photo/298967", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/298967.jpg", "longitude": -111.407890, "latitude": 36.894037, "width": 500, "height": 375, "upload_date": "04 January 2007", "owner_id": 64388, "owner_name": "Artusi", "owner_url": "http://www.panoramio.com/user/64388"} + , + {"photo_id": 88151, "photo_title": "Val Verzasca - Switzerland", "photo_url": "http://www.panoramio.com/photo/88151", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/88151.jpg", "longitude": 8.838158, "latitude": 46.257746, "width": 500, "height": 375, "upload_date": "28 November 2006", "owner_id": 11098, "owner_name": "Michele Masnata", "owner_url": "http://www.panoramio.com/user/11098"} + , + {"photo_id": 6463, "photo_title": "Guggenheim and spider", "photo_url": "http://www.panoramio.com/photo/6463", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6463.jpg", "longitude": -2.933736, "latitude": 43.269159, "width": 500, "height": 375, "upload_date": "09 January 2006", "owner_id": 414, "owner_name": "Sonia Villegas", "owner_url": "http://www.panoramio.com/user/414"} + , + {"photo_id": 107980, "photo_title": "Mostar", "photo_url": "http://www.panoramio.com/photo/107980", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/107980.jpg", "longitude": 17.815200, "latitude": 43.337255, "width": 369, "height": 500, "upload_date": "10 December 2006", "owner_id": 12954, "owner_name": "Ziębol", "owner_url": "http://www.panoramio.com/user/12954"} + , + {"photo_id": 9439, "photo_title": "Bora Bora", "photo_url": "http://www.panoramio.com/photo/9439", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9439.jpg", "longitude": -151.750000, "latitude": -16.500000, "width": 500, "height": 375, "upload_date": "02 February 2006", "owner_id": 1600, "owner_name": "heavenearth", "owner_url": "http://www.panoramio.com/user/1600"} + , + {"photo_id": 673131, "photo_title": "Nivane in Ørsta", "photo_url": "http://www.panoramio.com/photo/673131", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/673131.jpg", "longitude": 6.108742, "latitude": 62.226676, "width": 500, "height": 334, "upload_date": "03 February 2007", "owner_id": 56091, "owner_name": "Kjetil Vaage Øie", "owner_url": "http://www.panoramio.com/user/56091"} + , + {"photo_id": 346269, "photo_title": "italy-toscany", "photo_url": "http://www.panoramio.com/photo/346269", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/346269.jpg", "longitude": 11.616282, "latitude": 43.064389, "width": 500, "height": 334, "upload_date": "08 January 2007", "owner_id": 69671, "owner_name": "illusandpics.com", "owner_url": "http://www.panoramio.com/user/69671"} + , + {"photo_id": 290039, "photo_title": "Gentoo Penguins at Sunrise", "photo_url": "http://www.panoramio.com/photo/290039", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/290039.jpg", "longitude": -59.070311, "latitude": -52.430295, "width": 500, "height": 284, "upload_date": "03 January 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 1870141, "photo_title": "Les Mines", "photo_url": "http://www.panoramio.com/photo/1870141", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1870141.jpg", "longitude": 1.314712, "latitude": 45.922199, "width": 500, "height": 379, "upload_date": "21 April 2007", "owner_id": 372189, "owner_name": "Phil©", "owner_url": "http://www.panoramio.com/user/372189"} + , + {"photo_id": 516809, "photo_title": "Az őrszem", "photo_url": "http://www.panoramio.com/photo/516809", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/516809.jpg", "longitude": 18.239279, "latitude": 47.535341, "width": 500, "height": 286, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 67347, "photo_title": "Amanecer en el Salar de Uyuni", "photo_url": "http://www.panoramio.com/photo/67347", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/67347.jpg", "longitude": -67.549438, "latitude": -20.552438, "width": 500, "height": 375, "upload_date": "20 October 2006", "owner_id": 9080, "owner_name": "Marco Teodonio", "owner_url": "http://www.panoramio.com/user/9080"} + , + {"photo_id": 405822, "photo_title": "tulip", "photo_url": "http://www.panoramio.com/photo/405822", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405822.jpg", "longitude": 139.011619, "latitude": 37.871500, "width": 500, "height": 386, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 233619, "photo_title": "Warsaw Bridge 01 [www.wierzchon.com]", "photo_url": "http://www.panoramio.com/photo/233619", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/233619.jpg", "longitude": 21.035728, "latitude": 52.242353, "width": 500, "height": 500, "upload_date": "25 December 2006", "owner_id": 47836, "owner_name": "Andrzej Wierzchon", "owner_url": "http://www.panoramio.com/user/47836"} + , + {"photo_id": 1516726, "photo_title": "Облако над вулканом Камень. www.photo-sturm.ru", "photo_url": "http://www.panoramio.com/photo/1516726", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1516726.jpg", "longitude": 160.587502, "latitude": 56.081999, "width": 414, "height": 500, "upload_date": "27 March 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 70975, "photo_title": "Hospiz", "photo_url": "http://www.panoramio.com/photo/70975", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/70975.jpg", "longitude": 8.024461, "latitude": 46.245801, "width": 500, "height": 500, "upload_date": "26 October 2006", "owner_id": 9379, "owner_name": "Davide Bernacchi", "owner_url": "http://www.panoramio.com/user/9379"} + , + {"photo_id": 882660, "photo_title": "icy_chains_1_hdr_web", "photo_url": "http://www.panoramio.com/photo/882660", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/882660.jpg", "longitude": -79.798197, "latitude": 43.321353, "width": 500, "height": 333, "upload_date": "18 February 2007", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 9363990, "photo_title": "Marble Cave", "photo_url": "http://www.panoramio.com/photo/9363990", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9363990.jpg", "longitude": -72.607527, "latitude": -46.647138, "width": 500, "height": 375, "upload_date": "14 April 2008", "owner_id": 947917, "owner_name": "Dejah", "owner_url": "http://www.panoramio.com/user/947917"} + , + {"photo_id": 1884507, "photo_title": "fukushimagata", "photo_url": "http://www.panoramio.com/photo/1884507", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1884507.jpg", "longitude": 139.243813, "latitude": 37.909669, "width": 500, "height": 384, "upload_date": "22 April 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1343502, "photo_title": "вулкан Карымский", "photo_url": "http://www.panoramio.com/photo/1343502", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1343502.jpg", "longitude": 159.480114, "latitude": 54.025419, "width": 500, "height": 334, "upload_date": "16 March 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 97723, "photo_title": "Torrent de pareis", "photo_url": "http://www.panoramio.com/photo/97723", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/97723.jpg", "longitude": 2.805762, "latitude": 39.852352, "width": 401, "height": 500, "upload_date": "09 December 2006", "owner_id": 13121, "owner_name": "Andreas G.M.", "owner_url": "http://www.panoramio.com/user/13121"} + , + {"photo_id": 537672, "photo_title": "Sr. da Pedra", "photo_url": "http://www.panoramio.com/photo/537672", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/537672.jpg", "longitude": -8.659008, "latitude": 41.068821, "width": 500, "height": 366, "upload_date": "23 January 2007", "owner_id": 115618, "owner_name": "Paulo J Moreira", "owner_url": "http://www.panoramio.com/user/115618"} + , + {"photo_id": 204924, "photo_title": "zaldiak", "photo_url": "http://www.panoramio.com/photo/204924", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/204924.jpg", "longitude": -1.806951, "latitude": 43.245140, "width": 500, "height": 346, "upload_date": "21 December 2006", "owner_id": 2575, "owner_name": "mikel ortega", "owner_url": "http://www.panoramio.com/user/2575"} + , + {"photo_id": 114795, "photo_title": "TIBAUM-BIZZAR", "photo_url": "http://www.panoramio.com/photo/114795", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/114795.jpg", "longitude": 7.706180, "latitude": 51.665741, "width": 334, "height": 500, "upload_date": "11 December 2006", "owner_id": 13121, "owner_name": "Andreas G.M.", "owner_url": "http://www.panoramio.com/user/13121"} + , + {"photo_id": 1287881, "photo_title": "Aurora borealis", "photo_url": "http://www.panoramio.com/photo/1287881", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1287881.jpg", "longitude": 44.215508, "latitude": 65.829148, "width": 500, "height": 205, "upload_date": "12 March 2007", "owner_id": 75359, "owner_name": "Andrey Larin", "owner_url": "http://www.panoramio.com/user/75359"} + , + {"photo_id": 1781717, "photo_title": "Water Cuts Rock", "photo_url": "http://www.panoramio.com/photo/1781717", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1781717.jpg", "longitude": -113.047771, "latitude": 37.312154, "width": 333, "height": 500, "upload_date": "15 April 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 196103, "photo_title": "albufera", "photo_url": "http://www.panoramio.com/photo/196103", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/196103.jpg", "longitude": -0.323882, "latitude": 39.349166, "width": 332, "height": 500, "upload_date": "20 December 2006", "owner_id": 38804, "owner_name": "www.oscarsanchez.net", "owner_url": "http://www.panoramio.com/user/38804"} + , + {"photo_id": 266224, "photo_title": "Boulzojavri", "photo_url": "http://www.panoramio.com/photo/266224", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/266224.jpg", "longitude": 24.373169, "latitude": 68.908534, "width": 500, "height": 334, "upload_date": "30 December 2006", "owner_id": 56091, "owner_name": "Kjetil Vaage Øie", "owner_url": "http://www.panoramio.com/user/56091"} + , + {"photo_id": 6126294, "photo_title": "Richmond Deer", "photo_url": "http://www.panoramio.com/photo/6126294", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6126294.jpg", "longitude": -0.275195, "latitude": 51.445890, "width": 489, "height": 500, "upload_date": "25 November 2007", "owner_id": 1130880, "owner_name": "marksimms", "owner_url": "http://www.panoramio.com/user/1130880"} + , + {"photo_id": 168032, "photo_title": "Buci Seine - Looking Up", "photo_url": "http://www.panoramio.com/photo/168032", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/168032.jpg", "longitude": 2.336990, "latitude": 48.853891, "width": 500, "height": 357, "upload_date": "16 December 2006", "owner_id": 5684, "owner_name": "Brent Townshend", "owner_url": "http://www.panoramio.com/user/5684"} + , + {"photo_id": 1370932, "photo_title": "Mercury Bay Sunrise", "photo_url": "http://www.panoramio.com/photo/1370932", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1370932.jpg", "longitude": 175.699196, "latitude": -36.817685, "width": 500, "height": 470, "upload_date": "17 March 2007", "owner_id": 286729, "owner_name": "jimwitkowski", "owner_url": "http://www.panoramio.com/user/286729"} + , + {"photo_id": 120844, "photo_title": "Adelie-Prat- Kratzmaier", "photo_url": "http://www.panoramio.com/photo/120844", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/120844.jpg", "longitude": -59.683228, "latitude": -62.485684, "width": 500, "height": 351, "upload_date": "12 December 2006", "owner_id": 19856, "owner_name": "Juan Kratzmaier", "owner_url": "http://www.panoramio.com/user/19856"} + , + {"photo_id": 940294, "photo_title": "Infrared Mediterranean Heat", "photo_url": "http://www.panoramio.com/photo/940294", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/940294.jpg", "longitude": 25.376015, "latitude": 36.461537, "width": 500, "height": 332, "upload_date": "21 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 4446084, "photo_title": "Vizivarázs", "photo_url": "http://www.panoramio.com/photo/4446084", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4446084.jpg", "longitude": 17.504482, "latitude": 47.842773, "width": 367, "height": 500, "upload_date": "06 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 498352, "photo_title": "Wave", "photo_url": "http://www.panoramio.com/photo/498352", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/498352.jpg", "longitude": -112.005315, "latitude": 36.995972, "width": 500, "height": 333, "upload_date": "20 January 2007", "owner_id": 40260, "owner_name": "Don Albonico", "owner_url": "http://www.panoramio.com/user/40260"} + , + {"photo_id": 775893, "photo_title": "Leoparden", "photo_url": "http://www.panoramio.com/photo/775893", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/775893.jpg", "longitude": 36.046829, "latitude": -3.818353, "width": 500, "height": 336, "upload_date": "11 February 2007", "owner_id": 164434, "owner_name": "Achim Mittler", "owner_url": "http://www.panoramio.com/user/164434"} + , + {"photo_id": 665502, "photo_title": "Sunset Beach Walker", "photo_url": "http://www.panoramio.com/photo/665502", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/665502.jpg", "longitude": -124.077530, "latitude": 44.519888, "width": 500, "height": 340, "upload_date": "03 February 2007", "owner_id": 107359, "owner_name": "Ron Cooper", "owner_url": "http://www.panoramio.com/user/107359"} + , + {"photo_id": 9021415, "photo_title": "Wat Suwan Kuha or Wat Tham, Phang Nga, Winner Unusual Location April 2008", "photo_url": "http://www.panoramio.com/photo/9021415", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9021415.jpg", "longitude": 98.471628, "latitude": 8.428840, "width": 500, "height": 334, "upload_date": "31 March 2008", "owner_id": 1077251, "owner_name": "picsonthemove", "owner_url": "http://www.panoramio.com/user/1077251"} + , + {"photo_id": 287244, "photo_title": "Landwasser-Viadukt - This is an unofficial photo point. Just follow the footpath up from the official one, until the clearing.", "photo_url": "http://www.panoramio.com/photo/287244", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/287244.jpg", "longitude": 9.675007, "latitude": 46.681229, "width": 337, "height": 500, "upload_date": "03 January 2007", "owner_id": 57869, "owner_name": "NAGY Albert", "owner_url": "http://www.panoramio.com/user/57869"} + , + {"photo_id": 677366, "photo_title": "Oak tree in winter", "photo_url": "http://www.panoramio.com/photo/677366", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/677366.jpg", "longitude": 10.771065, "latitude": 59.663926, "width": 358, "height": 500, "upload_date": "03 February 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 196086, "photo_title": "albufera", "photo_url": "http://www.panoramio.com/photo/196086", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/196086.jpg", "longitude": -0.323882, "latitude": 39.349166, "width": 500, "height": 332, "upload_date": "20 December 2006", "owner_id": 38804, "owner_name": "www.oscarsanchez.net", "owner_url": "http://www.panoramio.com/user/38804"} + , + {"photo_id": 4340931, "photo_title": "Cold morning", "photo_url": "http://www.panoramio.com/photo/4340931", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4340931.jpg", "longitude": 12.113349, "latitude": 49.342559, "width": 500, "height": 333, "upload_date": "31 August 2007", "owner_id": 696605, "owner_name": "© alfredschaffer", "owner_url": "http://www.panoramio.com/user/696605"} + , + {"photo_id": 488, "photo_title": "Lagos de Montebello, México", "photo_url": "http://www.panoramio.com/photo/488", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/488.jpg", "longitude": -91.677904, "latitude": 16.111297, "width": 500, "height": 345, "upload_date": "31 August 2005", "owner_id": 7, "owner_name": "Eduardo Manchón", "owner_url": "http://www.panoramio.com/user/7"} + , + {"photo_id": 723666, "photo_title": "Majestically Still", "photo_url": "http://www.panoramio.com/photo/723666", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723666.jpg", "longitude": -116.175613, "latitude": 51.327608, "width": 500, "height": 332, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1081710, "photo_title": "Gjevilvatnet lake in Oppdal", "photo_url": "http://www.panoramio.com/photo/1081710", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1081710.jpg", "longitude": 9.412537, "latitude": 62.686749, "width": 500, "height": 333, "upload_date": "28 February 2007", "owner_id": 223406, "owner_name": "Sigmund Rise", "owner_url": "http://www.panoramio.com/user/223406"} + , + {"photo_id": 22575, "photo_title": "Lijiang River, near Yangshuo, China", "photo_url": "http://www.panoramio.com/photo/22575", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/22575.jpg", "longitude": 110.454826, "latitude": 24.962716, "width": 500, "height": 333, "upload_date": "05 June 2006", "owner_id": 3557, "owner_name": "Placebo", "owner_url": "http://www.panoramio.com/user/3557"} + , + {"photo_id": 2735754, "photo_title": "Después de la lluvia", "photo_url": "http://www.panoramio.com/photo/2735754", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2735754.jpg", "longitude": -73.241998, "latitude": -39.809583, "width": 360, "height": 500, "upload_date": "13 June 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 73515, "photo_title": "Kloster Höglwörth", "photo_url": "http://www.panoramio.com/photo/73515", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/73515.jpg", "longitude": 12.850227, "latitude": 47.815575, "width": 500, "height": 333, "upload_date": "30 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 723015, "photo_title": "Cape Flattery (infrared)", "photo_url": "http://www.panoramio.com/photo/723015", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723015.jpg", "longitude": -124.726700, "latitude": 48.385898, "width": 500, "height": 332, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1288595, "photo_title": "O'Keeffe ?", "photo_url": "http://www.panoramio.com/photo/1288595", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1288595.jpg", "longitude": 72.920637, "latitude": 4.038162, "width": 332, "height": 500, "upload_date": "12 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 1008304, "photo_title": "nyhavn", "photo_url": "http://www.panoramio.com/photo/1008304", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1008304.jpg", "longitude": 12.591190, "latitude": 55.679762, "width": 500, "height": 333, "upload_date": "24 February 2007", "owner_id": 2659, "owner_name": "ozalph", "owner_url": "http://www.panoramio.com/user/2659"} + , + {"photo_id": 19547, "photo_title": "Embarcador 1", "photo_url": "http://www.panoramio.com/photo/19547", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/19547.jpg", "longitude": 0.493140, "latitude": 40.904172, "width": 500, "height": 335, "upload_date": "07 May 2006", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 98115, "photo_title": "FREE-SPIRIT", "photo_url": "http://www.panoramio.com/photo/98115", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/98115.jpg", "longitude": 9.908917, "latitude": 50.487112, "width": 500, "height": 304, "upload_date": "10 December 2006", "owner_id": 13121, "owner_name": "Andreas G.M.", "owner_url": "http://www.panoramio.com/user/13121"} + , + {"photo_id": 9822056, "photo_title": "Reflection under the Bridge", "photo_url": "http://www.panoramio.com/photo/9822056", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9822056.jpg", "longitude": 103.853851, "latitude": 1.286973, "width": 333, "height": 500, "upload_date": "01 May 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 9117094, "photo_title": "Baron's Haugh, Scotland", "photo_url": "http://www.panoramio.com/photo/9117094", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9117094.jpg", "longitude": -3.986835, "latitude": 55.773532, "width": 500, "height": 337, "upload_date": "05 April 2008", "owner_id": 165346, "owner_name": "Alan Knox", "owner_url": "http://www.panoramio.com/user/165346"} + , + {"photo_id": 5342534, "photo_title": "Őszi pompa", "photo_url": "http://www.panoramio.com/photo/5342534", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5342534.jpg", "longitude": 15.964594, "latitude": 47.875426, "width": 500, "height": 334, "upload_date": "16 October 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 2346129, "photo_title": "Pipacsálom", "photo_url": "http://www.panoramio.com/photo/2346129", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2346129.jpg", "longitude": 17.521820, "latitude": 47.748558, "width": 500, "height": 378, "upload_date": "22 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3749005, "photo_title": "Once in a Blue Moon....", "photo_url": "http://www.panoramio.com/photo/3749005", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3749005.jpg", "longitude": -105.654080, "latitude": 40.294560, "width": 374, "height": 500, "upload_date": "05 August 2007", "owner_id": 87752, "owner_name": "Richard Ryer", "owner_url": "http://www.panoramio.com/user/87752"} + , + {"photo_id": 1360629, "photo_title": "Frente a la Cascada de Gujuli -103 m.-", "photo_url": "http://www.panoramio.com/photo/1360629", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1360629.jpg", "longitude": -2.909800, "latitude": 42.976199, "width": 333, "height": 500, "upload_date": "17 March 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 6129915, "photo_title": "A vadon szava", "photo_url": "http://www.panoramio.com/photo/6129915", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6129915.jpg", "longitude": 17.521133, "latitude": 47.854408, "width": 500, "height": 325, "upload_date": "25 November 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 67183, "photo_title": "Laguna verde e Vulcano Licancabur", "photo_url": "http://www.panoramio.com/photo/67183", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/67183.jpg", "longitude": -67.819161, "latitude": -22.787696, "width": 500, "height": 370, "upload_date": "20 October 2006", "owner_id": 9080, "owner_name": "Marco Teodonio", "owner_url": "http://www.panoramio.com/user/9080"} + , + {"photo_id": 507571, "photo_title": "Mikor a harangszó is szebben hallik", "photo_url": "http://www.panoramio.com/photo/507571", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507571.jpg", "longitude": 17.684383, "latitude": 47.587873, "width": 396, "height": 500, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 6685422, "photo_title": "Dawn at Bagan, Myanmar (Burma)", "photo_url": "http://www.panoramio.com/photo/6685422", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6685422.jpg", "longitude": 94.860935, "latitude": 21.169045, "width": 500, "height": 333, "upload_date": "25 December 2007", "owner_id": 1221287, "owner_name": "TS Jeung", "owner_url": "http://www.panoramio.com/user/1221287"} + , + {"photo_id": 3513121, "photo_title": "Báláim", "photo_url": "http://www.panoramio.com/photo/3513121", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3513121.jpg", "longitude": 17.481651, "latitude": 47.457576, "width": 419, "height": 500, "upload_date": "24 July 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 10574161, "photo_title": "Silhouette", "photo_url": "http://www.panoramio.com/photo/10574161", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10574161.jpg", "longitude": 148.662905, "latitude": -35.304724, "width": 500, "height": 346, "upload_date": "25 May 2008", "owner_id": 766550, "owner_name": "VFedele", "owner_url": "http://www.panoramio.com/user/766550"} + , + {"photo_id": 89190, "photo_title": "Mount Ararat, Yerevan, Armenia", "photo_url": "http://www.panoramio.com/photo/89190", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/89190.jpg", "longitude": 44.483900, "latitude": 40.195299, "width": 500, "height": 375, "upload_date": "30 November 2006", "owner_id": 11226, "owner_name": "Ardani", "owner_url": "http://www.panoramio.com/user/11226"} + , + {"photo_id": 1182305, "photo_title": "Dobel, Albrecht-Hütte", "photo_url": "http://www.panoramio.com/photo/1182305", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1182305.jpg", "longitude": 8.500500, "latitude": 48.793465, "width": 500, "height": 375, "upload_date": "05 March 2007", "owner_id": 66229, "owner_name": "Mast", "owner_url": "http://www.panoramio.com/user/66229"} + , + {"photo_id": 4258015, "photo_title": "Fényözön", "photo_url": "http://www.panoramio.com/photo/4258015", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4258015.jpg", "longitude": 16.391602, "latitude": 46.851269, "width": 333, "height": 500, "upload_date": "28 August 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1413, "photo_title": "Champlain Lookout", "photo_url": "http://www.panoramio.com/photo/1413", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1413.jpg", "longitude": -75.912872, "latitude": 45.507640, "width": 500, "height": 375, "upload_date": "06 October 2005", "owner_id": 273, "owner_name": "JC", "owner_url": "http://www.panoramio.com/user/273"} + , + {"photo_id": 1526763, "photo_title": "Gizeh Pyramids, Cairo", "photo_url": "http://www.panoramio.com/photo/1526763", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1526763.jpg", "longitude": 31.133537, "latitude": 29.966721, "width": 500, "height": 333, "upload_date": "27 March 2007", "owner_id": 59919, "owner_name": "xflo:w (http://www.xflo.net)", "owner_url": "http://www.panoramio.com/user/59919"} + , + {"photo_id": 8802900, "photo_title": "Martigues, miroir aux oiseaux", "photo_url": "http://www.panoramio.com/photo/8802900", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8802900.jpg", "longitude": 5.054559, "latitude": 43.405079, "width": 387, "height": 500, "upload_date": "24 March 2008", "owner_id": 629243, "owner_name": "Olivier Faugeras", "owner_url": "http://www.panoramio.com/user/629243"} + , + {"photo_id": 459515, "photo_title": "fire works", "photo_url": "http://www.panoramio.com/photo/459515", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459515.jpg", "longitude": 138.423271, "latitude": 38.069312, "width": 500, "height": 385, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 749464, "photo_title": "Gondola", "photo_url": "http://www.panoramio.com/photo/749464", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/749464.jpg", "longitude": 12.336917, "latitude": 45.434053, "width": 500, "height": 332, "upload_date": "09 February 2007", "owner_id": 159455, "owner_name": "©Franco Truscello", "owner_url": "http://www.panoramio.com/user/159455"} + , + {"photo_id": 422608, "photo_title": "tanada", "photo_url": "http://www.panoramio.com/photo/422608", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/422608.jpg", "longitude": 139.047089, "latitude": 37.449787, "width": 383, "height": 500, "upload_date": "14 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 85617, "photo_title": "Parque Natural de Calblanque", "photo_url": "http://www.panoramio.com/photo/85617", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/85617.jpg", "longitude": -0.739861, "latitude": 37.594104, "width": 332, "height": 500, "upload_date": "24 November 2006", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 1089235, "photo_title": "Nyáridéző", "photo_url": "http://www.panoramio.com/photo/1089235", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1089235.jpg", "longitude": 18.207092, "latitude": 47.318578, "width": 500, "height": 282, "upload_date": "28 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 505229, "photo_title": "Etangs près de Dijon", "photo_url": "http://www.panoramio.com/photo/505229", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/505229.jpg", "longitude": 5.168552, "latitude": 47.312642, "width": 350, "height": 500, "upload_date": "20 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 679343, "photo_title": "melbourne sunset over the yarra river", "photo_url": "http://www.panoramio.com/photo/679343", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/679343.jpg", "longitude": 144.968119, "latitude": -37.819616, "width": 500, "height": 500, "upload_date": "04 February 2007", "owner_id": 146092, "owner_name": "sid1662", "owner_url": "http://www.panoramio.com/user/146092"} + , + {"photo_id": 436336, "photo_title": "myoujyousan", "photo_url": "http://www.panoramio.com/photo/436336", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/436336.jpg", "longitude": 137.831554, "latitude": 36.911608, "width": 500, "height": 362, "upload_date": "15 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 9733680, "photo_title": "Sydney", "photo_url": "http://www.panoramio.com/photo/9733680", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9733680.jpg", "longitude": 151.209834, "latitude": -33.848588, "width": 333, "height": 500, "upload_date": "28 April 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 7415625, "photo_title": "Në fushë të Pallaticesë", "photo_url": "http://www.panoramio.com/photo/7415625", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7415625.jpg", "longitude": 21.077271, "latitude": 42.011550, "width": 437, "height": 500, "upload_date": "28 January 2008", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 5358174, "photo_title": "Morning Glory", "photo_url": "http://www.panoramio.com/photo/5358174", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5358174.jpg", "longitude": -110.843537, "latitude": 44.475020, "width": 500, "height": 348, "upload_date": "16 October 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 316199, "photo_title": "A lake on Gasherbrum glacier", "photo_url": "http://www.panoramio.com/photo/316199", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/316199.jpg", "longitude": 76.732550, "latitude": 35.877298, "width": 500, "height": 375, "upload_date": "06 January 2007", "owner_id": 65672, "owner_name": "www.turclubmai.ru", "owner_url": "http://www.panoramio.com/user/65672"} + , + {"photo_id": 400536, "photo_title": "Half Dome Mtn, Yosemite Nat Park, CA", "photo_url": "http://www.panoramio.com/photo/400536", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/400536.jpg", "longitude": -119.495888, "latitude": 37.811411, "width": 500, "height": 333, "upload_date": "12 January 2007", "owner_id": 85489, "owner_name": "Bruce MacIver", "owner_url": "http://www.panoramio.com/user/85489"} + , + {"photo_id": 2942693, "photo_title": "Tulips and Windmills", "photo_url": "http://www.panoramio.com/photo/2942693", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2942693.jpg", "longitude": 4.864798, "latitude": 52.594393, "width": 500, "height": 500, "upload_date": "25 June 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 9733633, "photo_title": "Oper-Sydney", "photo_url": "http://www.panoramio.com/photo/9733633", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9733633.jpg", "longitude": 151.216968, "latitude": -33.851702, "width": 500, "height": 333, "upload_date": "28 April 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 1800454, "photo_title": "Bombay Beach, Salton Sea, CA", "photo_url": "http://www.panoramio.com/photo/1800454", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1800454.jpg", "longitude": -115.729235, "latitude": 33.347316, "width": 500, "height": 407, "upload_date": "16 April 2007", "owner_id": 107613, "owner_name": "Tom Grubbe", "owner_url": "http://www.panoramio.com/user/107613"} + , + {"photo_id": 2558057, "photo_title": "Kin-dza-dza 2", "photo_url": "http://www.panoramio.com/photo/2558057", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2558057.jpg", "longitude": 30.785751, "latitude": 46.639301, "width": 500, "height": 375, "upload_date": "03 June 2007", "owner_id": 13058, "owner_name": "Kyryl", "owner_url": "http://www.panoramio.com/user/13058"} + , + {"photo_id": 7768089, "photo_title": "Isteni színjáték", "photo_url": "http://www.panoramio.com/photo/7768089", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7768089.jpg", "longitude": 17.507057, "latitude": 47.776425, "width": 500, "height": 334, "upload_date": "12 February 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1213006, "photo_title": "Twilight Drive", "photo_url": "http://www.panoramio.com/photo/1213006", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1213006.jpg", "longitude": -114.481916, "latitude": 51.095841, "width": 500, "height": 335, "upload_date": "07 March 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 395800, "photo_title": "Pic de Bure depuis le Pic de Gleize", "photo_url": "http://www.panoramio.com/photo/395800", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/395800.jpg", "longitude": 6.055870, "latitude": 44.610146, "width": 500, "height": 350, "upload_date": "12 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 11073609, "photo_title": "Sunrise in Koroni, by Kostas Andreopoulos", "photo_url": "http://www.panoramio.com/photo/11073609", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11073609.jpg", "longitude": 21.952747, "latitude": 36.797775, "width": 500, "height": 375, "upload_date": "09 June 2008", "owner_id": 1690483, "owner_name": "k.andre", "owner_url": "http://www.panoramio.com/user/1690483"} + , + {"photo_id": 6564418, "photo_title": "Baron's Haugh, Scotland", "photo_url": "http://www.panoramio.com/photo/6564418", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6564418.jpg", "longitude": -3.989239, "latitude": 55.772808, "width": 500, "height": 337, "upload_date": "19 December 2007", "owner_id": 165346, "owner_name": "Alan Knox", "owner_url": "http://www.panoramio.com/user/165346"} + , + {"photo_id": 10158925, "photo_title": "Lluvia púrpura ( Purple rain )", "photo_url": "http://www.panoramio.com/photo/10158925", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10158925.jpg", "longitude": -0.476360, "latitude": 39.612565, "width": 500, "height": 333, "upload_date": "12 May 2008", "owner_id": 787217, "owner_name": "♣ Víctor S de Lara ♣", "owner_url": "http://www.panoramio.com/user/787217"} + , + {"photo_id": 121574, "photo_title": "Moscú/Moscow - Catedral de San Basilio", "photo_url": "http://www.panoramio.com/photo/121574", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/121574.jpg", "longitude": 37.621951, "latitude": 55.753033, "width": 500, "height": 375, "upload_date": "12 December 2006", "owner_id": 17212, "owner_name": "javier herranz", "owner_url": "http://www.panoramio.com/user/17212"} + , + {"photo_id": 6012915, "photo_title": "Erleuchtung in Venedig", "photo_url": "http://www.panoramio.com/photo/6012915", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6012915.jpg", "longitude": 12.340747, "latitude": 45.433364, "width": 500, "height": 333, "upload_date": "19 November 2007", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 346687, "photo_title": "namibia desert", "photo_url": "http://www.panoramio.com/photo/346687", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/346687.jpg", "longitude": 15.408325, "latitude": -24.729370, "width": 500, "height": 334, "upload_date": "08 January 2007", "owner_id": 69671, "owner_name": "illusandpics.com", "owner_url": "http://www.panoramio.com/user/69671"} + , + {"photo_id": 1913758, "photo_title": "Cortona - Via Gino Severini", "photo_url": "http://www.panoramio.com/photo/1913758", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1913758.jpg", "longitude": 11.988916, "latitude": 43.273659, "width": 500, "height": 498, "upload_date": "24 April 2007", "owner_id": 193913, "owner_name": "Klesitz Piroska", "owner_url": "http://www.panoramio.com/user/193913"} + , + {"photo_id": 405843, "photo_title": "siroiwa", "photo_url": "http://www.panoramio.com/photo/405843", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405843.jpg", "longitude": 138.789682, "latitude": 37.726398, "width": 500, "height": 338, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 91375, "photo_title": "Burj Al Arab At Night", "photo_url": "http://www.panoramio.com/photo/91375", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/91375.jpg", "longitude": 55.187416, "latitude": 25.140312, "width": 255, "height": 500, "upload_date": "03 December 2006", "owner_id": 1295, "owner_name": "Matthew Walters", "owner_url": "http://www.panoramio.com/user/1295"} + , + {"photo_id": 940792, "photo_title": "Moraine Branch", "photo_url": "http://www.panoramio.com/photo/940792", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/940792.jpg", "longitude": -116.177502, "latitude": 51.325946, "width": 500, "height": 332, "upload_date": "21 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 58287, "photo_title": "Schloß Anif", "photo_url": "http://www.panoramio.com/photo/58287", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58287.jpg", "longitude": 13.068817, "latitude": 47.744540, "width": 500, "height": 333, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 194118, "photo_title": "Mount Fuji: Fuji-San", "photo_url": "http://www.panoramio.com/photo/194118", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/194118.jpg", "longitude": 138.727455, "latitude": 35.377294, "width": 500, "height": 332, "upload_date": "20 December 2006", "owner_id": 27882, "owner_name": "taoy", "owner_url": "http://www.panoramio.com/user/27882"} + , + {"photo_id": 5158892, "photo_title": "prati di Tires Alto Adige Südtirol south tyrol", "photo_url": "http://www.panoramio.com/photo/5158892", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5158892.jpg", "longitude": 11.557188, "latitude": 46.471044, "width": 500, "height": 429, "upload_date": "08 October 2007", "owner_id": 578163, "owner_name": "Margherita-Italy", "owner_url": "http://www.panoramio.com/user/578163"} + , + {"photo_id": 280123, "photo_title": "kaouki05", "photo_url": "http://www.panoramio.com/photo/280123", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/280123.jpg", "longitude": -9.799418, "latitude": 31.355662, "width": 328, "height": 500, "upload_date": "01 January 2007", "owner_id": 58867, "owner_name": "Lachaud Franck", "owner_url": "http://www.panoramio.com/user/58867"} + , + {"photo_id": 6789223, "photo_title": "Exploding sky", "photo_url": "http://www.panoramio.com/photo/6789223", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6789223.jpg", "longitude": -69.930505, "latitude": 12.522579, "width": 500, "height": 333, "upload_date": "30 December 2007", "owner_id": 89499, "owner_name": "Michael Braxenthaler", "owner_url": "http://www.panoramio.com/user/89499"} + , + {"photo_id": 3722547, "photo_title": "Morning fog in the Alps", "photo_url": "http://www.panoramio.com/photo/3722547", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3722547.jpg", "longitude": 10.591164, "latitude": 47.521142, "width": 500, "height": 333, "upload_date": "04 August 2007", "owner_id": 89499, "owner_name": "Michael Braxenthaler", "owner_url": "http://www.panoramio.com/user/89499"} + , + {"photo_id": 9530458, "photo_title": "Castillian cereal fields from Atienza walls", "photo_url": "http://www.panoramio.com/photo/9530458", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9530458.jpg", "longitude": -2.874470, "latitude": 41.198451, "width": 500, "height": 470, "upload_date": "20 April 2008", "owner_id": 134279, "owner_name": "4ullas", "owner_url": "http://www.panoramio.com/user/134279"} + , + {"photo_id": 2935974, "photo_title": "Atardecer tras el Anboto desde el Aitzgorri", "photo_url": "http://www.panoramio.com/photo/2935974", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2935974.jpg", "longitude": -2.324982, "latitude": 42.951240, "width": 500, "height": 331, "upload_date": "25 June 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 38587, "photo_title": "Blitz", "photo_url": "http://www.panoramio.com/photo/38587", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/38587.jpg", "longitude": 7.949853, "latitude": 48.489947, "width": 500, "height": 375, "upload_date": "13 August 2006", "owner_id": 6002, "owner_name": "Paul Feiler", "owner_url": "http://www.panoramio.com/user/6002"} + , + {"photo_id": 9312247, "photo_title": "Idrija - High water after rain", "photo_url": "http://www.panoramio.com/photo/9312247", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9312247.jpg", "longitude": 13.965683, "latitude": 45.955625, "width": 500, "height": 375, "upload_date": "12 April 2008", "owner_id": 763995, "owner_name": "Samo T.", "owner_url": "http://www.panoramio.com/user/763995"} + , + {"photo_id": 110409, "photo_title": "Laguna de Yanganuco", "photo_url": "http://www.panoramio.com/photo/110409", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/110409.jpg", "longitude": -77.640553, "latitude": -9.071585, "width": 330, "height": 500, "upload_date": "11 December 2006", "owner_id": 16323, "owner_name": "Luis Torres", "owner_url": "http://www.panoramio.com/user/16323"} + , + {"photo_id": 7609439, "photo_title": "Fényfürdő", "photo_url": "http://www.panoramio.com/photo/7609439", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7609439.jpg", "longitude": 15.965366, "latitude": 47.877556, "width": 500, "height": 312, "upload_date": "05 February 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 8599453, "photo_title": "Realidad comprimida", "photo_url": "http://www.panoramio.com/photo/8599453", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8599453.jpg", "longitude": -2.780957, "latitude": 43.033953, "width": 500, "height": 387, "upload_date": "17 March 2008", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 233921, "photo_title": "Mount Titlis, Engelberg, Switzerland www.titlis.ch / www.engelberg.ch/ www.berghuette.ch /www.brunnihuette.ch", "photo_url": "http://www.panoramio.com/photo/233921", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/233921.jpg", "longitude": 8.410742, "latitude": 46.841583, "width": 500, "height": 375, "upload_date": "25 December 2006", "owner_id": 47930, "owner_name": "werni", "owner_url": "http://www.panoramio.com/user/47930"} + , + {"photo_id": 561386, "photo_title": "the country", "photo_url": "http://www.panoramio.com/photo/561386", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/561386.jpg", "longitude": 138.871393, "latitude": 37.602196, "width": 500, "height": 383, "upload_date": "24 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1195112, "photo_title": "Tolar Grande", "photo_url": "http://www.panoramio.com/photo/1195112", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1195112.jpg", "longitude": -67.361984, "latitude": -24.545249, "width": 500, "height": 342, "upload_date": "06 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 5466129, "photo_title": "\"Lasciate ogne speranza, voi ch’intrate\". (\"Abandon all hope, ye who enter here\" ; \"Toi qui entre ici, abandonne toute espérance\".) Dante e il primo girone dell'Inferno (o Virgilio nella selva oscura, accanto all'ingresso dell'Inferno) (ou encore, plus prosaïquement, pêche dans le Jaunay en Vendée, le 21 octobre 2007 à l'aube d'un très froid matin d'automne). #129", "photo_url": "http://www.panoramio.com/photo/5466129", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5466129.jpg", "longitude": -1.901300, "latitude": 46.663398, "width": 500, "height": 281, "upload_date": "22 October 2007", "owner_id": 666755, "owner_name": "Armagnac", "owner_url": "http://www.panoramio.com/user/666755"} + , + {"photo_id": 57820, "photo_title": "Hallstatt 2", "photo_url": "http://www.panoramio.com/photo/57820", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57820.jpg", "longitude": 13.649054, "latitude": 47.555040, "width": 500, "height": 333, "upload_date": "05 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 798312, "photo_title": "Riflettendo...", "photo_url": "http://www.panoramio.com/photo/798312", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/798312.jpg", "longitude": 7.677534, "latitude": 45.069925, "width": 500, "height": 332, "upload_date": "12 February 2007", "owner_id": 159455, "owner_name": "©Franco Truscello", "owner_url": "http://www.panoramio.com/user/159455"} + , + {"photo_id": 7401432, "photo_title": "07-12-18_\"Arterias del Bosque\" PIXELECTA", "photo_url": "http://www.panoramio.com/photo/7401432", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7401432.jpg", "longitude": -2.775679, "latitude": 43.005338, "width": 500, "height": 333, "upload_date": "27 January 2008", "owner_id": 163655, "owner_name": "[[[ PIXELECTA ]]]", "owner_url": "http://www.panoramio.com/user/163655"} + , + {"photo_id": 2584132, "photo_title": "Farm Tomita", "photo_url": "http://www.panoramio.com/photo/2584132", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2584132.jpg", "longitude": 142.426586, "latitude": 43.418889, "width": 500, "height": 375, "upload_date": "05 June 2007", "owner_id": 532882, "owner_name": "wisdomcomplex", "owner_url": "http://www.panoramio.com/user/532882"} + , + {"photo_id": 4670499, "photo_title": "El despertar de la naturaleza", "photo_url": "http://www.panoramio.com/photo/4670499", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4670499.jpg", "longitude": -73.227739, "latitude": -39.821285, "width": 500, "height": 371, "upload_date": "15 September 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 5133875, "photo_title": "Lumi Vardar", "photo_url": "http://www.panoramio.com/photo/5133875", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5133875.jpg", "longitude": 21.075597, "latitude": 42.006671, "width": 500, "height": 375, "upload_date": "06 October 2007", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 8309167, "photo_title": "Cueva de los Verdes", "photo_url": "http://www.panoramio.com/photo/8309167", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8309167.jpg", "longitude": -13.439734, "latitude": 29.161137, "width": 333, "height": 500, "upload_date": "05 March 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 1756166, "photo_title": "The Pantheon, Rome, Italy", "photo_url": "http://www.panoramio.com/photo/1756166", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1756166.jpg", "longitude": 12.476842, "latitude": 41.898540, "width": 376, "height": 500, "upload_date": "13 April 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 1831309, "photo_title": "Oak in blue - last one", "photo_url": "http://www.panoramio.com/photo/1831309", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1831309.jpg", "longitude": 10.771322, "latitude": 59.664143, "width": 326, "height": 500, "upload_date": "18 April 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 626487, "photo_title": "A harag napja", "photo_url": "http://www.panoramio.com/photo/626487", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/626487.jpg", "longitude": 15.919275, "latitude": 43.589468, "width": 500, "height": 333, "upload_date": "30 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 202162, "photo_title": "Monument Valley", "photo_url": "http://www.panoramio.com/photo/202162", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/202162.jpg", "longitude": -110.094552, "latitude": 36.976810, "width": 500, "height": 333, "upload_date": "21 December 2006", "owner_id": 40260, "owner_name": "Don Albonico", "owner_url": "http://www.panoramio.com/user/40260"} + , + {"photo_id": 791016, "photo_title": "Sossusvlei", "photo_url": "http://www.panoramio.com/photo/791016", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/791016.jpg", "longitude": 15.289364, "latitude": -24.730656, "width": 500, "height": 333, "upload_date": "12 February 2007", "owner_id": 12736, "owner_name": "www.sliwi.de", "owner_url": "http://www.panoramio.com/user/12736"} + , + {"photo_id": 9760518, "photo_title": "Eglise Notre-Dame de la Couture", "photo_url": "http://www.panoramio.com/photo/9760518", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9760518.jpg", "longitude": 0.596437, "latitude": 49.082510, "width": 375, "height": 500, "upload_date": "29 April 2008", "owner_id": 1275480, "owner_name": "Nicolas Aubé", "owner_url": "http://www.panoramio.com/user/1275480"} + , + {"photo_id": 2097684, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/2097684", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2097684.jpg", "longitude": -79.793916, "latitude": 43.299447, "width": 500, "height": 333, "upload_date": "06 May 2007", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 6851021, "photo_title": "Lumi Vardar-Sunset", "photo_url": "http://www.panoramio.com/photo/6851021", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6851021.jpg", "longitude": 21.077871, "latitude": 42.007532, "width": 458, "height": 500, "upload_date": "02 January 2008", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 8137868, "photo_title": "Sunset Trace at Kotchi, Korea", "photo_url": "http://www.panoramio.com/photo/8137868", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8137868.jpg", "longitude": 126.333847, "latitude": 36.498597, "width": 500, "height": 500, "upload_date": "27 February 2008", "owner_id": 1221287, "owner_name": "TS Jeung", "owner_url": "http://www.panoramio.com/user/1221287"} + , + {"photo_id": 382104, "photo_title": "Meteora", "photo_url": "http://www.panoramio.com/photo/382104", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/382104.jpg", "longitude": 21.616974, "latitude": 39.743626, "width": 500, "height": 500, "upload_date": "11 January 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 3399014, "photo_title": "Vue du Schneibstein vers l'Est", "photo_url": "http://www.panoramio.com/photo/3399014", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3399014.jpg", "longitude": 13.055191, "latitude": 47.562396, "width": 500, "height": 328, "upload_date": "19 July 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 29596, "photo_title": "Ciudad de Los Cielos", "photo_url": "http://www.panoramio.com/photo/29596", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/29596.jpg", "longitude": -72.545900, "latitude": -13.165304, "width": 500, "height": 375, "upload_date": "01 July 2006", "owner_id": 4483, "owner_name": "Miguel Coranti", "owner_url": "http://www.panoramio.com/user/4483"} + , + {"photo_id": 1269713, "photo_title": "Rainbow over Olskårdvatnet near Kiberg, Finnmark, Norway", "photo_url": "http://www.panoramio.com/photo/1269713", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1269713.jpg", "longitude": 30.906601, "latitude": 70.295137, "width": 361, "height": 500, "upload_date": "11 March 2007", "owner_id": 66734, "owner_name": "Svein Solhaug", "owner_url": "http://www.panoramio.com/user/66734"} + , + {"photo_id": 507631, "photo_title": "Egy ábrándos reggelen", "photo_url": "http://www.panoramio.com/photo/507631", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507631.jpg", "longitude": 17.466667, "latitude": 47.866667, "width": 500, "height": 334, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 722974, "photo_title": "Airdrie Vortex", "photo_url": "http://www.panoramio.com/photo/722974", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/722974.jpg", "longitude": -114.087481, "latitude": 51.048544, "width": 500, "height": 323, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1118007, "photo_title": "Moraine Lake, Banff NP (Canada)", "photo_url": "http://www.panoramio.com/photo/1118007", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1118007.jpg", "longitude": -116.177673, "latitude": 51.328091, "width": 500, "height": 326, "upload_date": "02 March 2007", "owner_id": 229005, "owner_name": "mypictures4u.com", "owner_url": "http://www.panoramio.com/user/229005"} + , + {"photo_id": 1343943, "photo_title": "Andes Mountains.Patagonia.Argentina", "photo_url": "http://www.panoramio.com/photo/1343943", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1343943.jpg", "longitude": -72.422905, "latitude": -49.381814, "width": 500, "height": 375, "upload_date": "16 March 2007", "owner_id": 281428, "owner_name": "avni_", "owner_url": "http://www.panoramio.com/user/281428"} + , + {"photo_id": 5637365, "photo_title": "Northen lights", "photo_url": "http://www.panoramio.com/photo/5637365", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5637365.jpg", "longitude": 28.599129, "latitude": 66.247365, "width": 500, "height": 333, "upload_date": "30 October 2007", "owner_id": 897591, "owner_name": "markku pirttimaa www.karhukuusamo.com", "owner_url": "http://www.panoramio.com/user/897591"} + , + {"photo_id": 241562, "photo_title": "Süd-Ostisland", "photo_url": "http://www.panoramio.com/photo/241562", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/241562.jpg", "longitude": -17.512207, "latitude": 63.954261, "width": 500, "height": 326, "upload_date": "26 December 2006", "owner_id": 14774, "owner_name": "Frank Block", "owner_url": "http://www.panoramio.com/user/14774"} + , + {"photo_id": 48899, "photo_title": "Bellagio Fountain", "photo_url": "http://www.panoramio.com/photo/48899", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/48899.jpg", "longitude": -115.174227, "latitude": 36.112778, "width": 500, "height": 375, "upload_date": "16 September 2006", "owner_id": 7190, "owner_name": "Perry Tang", "owner_url": "http://www.panoramio.com/user/7190"} + , + {"photo_id": 49822, "photo_title": "Baños termales en Alhama de Granada", "photo_url": "http://www.panoramio.com/photo/49822", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/49822.jpg", "longitude": -3.983274, "latitude": 37.018248, "width": 374, "height": 500, "upload_date": "19 September 2006", "owner_id": 5477, "owner_name": "errece", "owner_url": "http://www.panoramio.com/user/5477"} + , + {"photo_id": 8248490, "photo_title": "Emmerald river", "photo_url": "http://www.panoramio.com/photo/8248490", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8248490.jpg", "longitude": 13.650362, "latitude": 46.340336, "width": 375, "height": 500, "upload_date": "02 March 2008", "owner_id": 763995, "owner_name": "Samo T.", "owner_url": "http://www.panoramio.com/user/763995"} + , + {"photo_id": 459528, "photo_title": "gassan", "photo_url": "http://www.panoramio.com/photo/459528", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459528.jpg", "longitude": 139.895782, "latitude": 38.282391, "width": 500, "height": 379, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 50203, "photo_title": "Die Hütte in Nyidalur an einem Septembermorgen ....", "photo_url": "http://www.panoramio.com/photo/50203", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/50203.jpg", "longitude": -18.132935, "latitude": 64.762124, "width": 500, "height": 299, "upload_date": "20 September 2006", "owner_id": 7434, "owner_name": "baldinger reisen ag, waedenswil/switzerland", "owner_url": "http://www.panoramio.com/user/7434"} + , + {"photo_id": 51502, "photo_title": "eclipse", "photo_url": "http://www.panoramio.com/photo/51502", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/51502.jpg", "longitude": -0.121665, "latitude": 51.500969, "width": 500, "height": 375, "upload_date": "24 September 2006", "owner_id": 6645, "owner_name": "JesusVillalba", "owner_url": "http://www.panoramio.com/user/6645"} + , + {"photo_id": 3671663, "photo_title": "Urbia traspuesta de sol, desde Aizkorri", "photo_url": "http://www.panoramio.com/photo/3671663", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3671663.jpg", "longitude": -2.324831, "latitude": 42.951271, "width": 500, "height": 298, "upload_date": "02 August 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 1928780, "photo_title": "God is looking", "photo_url": "http://www.panoramio.com/photo/1928780", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1928780.jpg", "longitude": 19.952137, "latitude": 50.106075, "width": 500, "height": 379, "upload_date": "25 April 2007", "owner_id": 12954, "owner_name": "Ziębol", "owner_url": "http://www.panoramio.com/user/12954"} + , + {"photo_id": 10068109, "photo_title": "#2 Steinerne Brücke über Lendkanal, Stone Bridge over Lendkanal, Klagenfurt, Austria", "photo_url": "http://www.panoramio.com/photo/10068109", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10068109.jpg", "longitude": 14.284313, "latitude": 46.620436, "width": 376, "height": 500, "upload_date": "09 May 2008", "owner_id": 1077251, "owner_name": "picsonthemove", "owner_url": "http://www.panoramio.com/user/1077251"} + , + {"photo_id": 8730264, "photo_title": "Large wave hits the North Pier, Tynemouth - Easter 2008", "photo_url": "http://www.panoramio.com/photo/8730264", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8730264.jpg", "longitude": -1.420702, "latitude": 55.020727, "width": 434, "height": 500, "upload_date": "22 March 2008", "owner_id": 1107262, "owner_name": "bobpercy", "owner_url": "http://www.panoramio.com/user/1107262"} + , + {"photo_id": 330436, "photo_title": "bolivia salar-de-uyuni", "photo_url": "http://www.panoramio.com/photo/330436", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/330436.jpg", "longitude": -67.876625, "latitude": -20.180046, "width": 500, "height": 334, "upload_date": "07 January 2007", "owner_id": 69671, "owner_name": "illusandpics.com", "owner_url": "http://www.panoramio.com/user/69671"} + , + {"photo_id": 10287647, "photo_title": "A moment of silence * Honorable mention may contest*", "photo_url": "http://www.panoramio.com/photo/10287647", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10287647.jpg", "longitude": 6.177192, "latitude": 52.218099, "width": 500, "height": 413, "upload_date": "16 May 2008", "owner_id": 523564, "owner_name": "Luud Riphagen", "owner_url": "http://www.panoramio.com/user/523564"} + , + {"photo_id": 436323, "photo_title": "zeikan", "photo_url": "http://www.panoramio.com/photo/436323", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/436323.jpg", "longitude": 139.057925, "latitude": 37.930016, "width": 500, "height": 381, "upload_date": "15 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 298350, "photo_title": "What are you looking at ?", "photo_url": "http://www.panoramio.com/photo/298350", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/298350.jpg", "longitude": -109.276510, "latitude": -27.125567, "width": 500, "height": 332, "upload_date": "04 January 2007", "owner_id": 57893, "owner_name": "ThoiryK", "owner_url": "http://www.panoramio.com/user/57893"} + , + {"photo_id": 85618, "photo_title": "Minas de Mazarrón", "photo_url": "http://www.panoramio.com/photo/85618", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/85618.jpg", "longitude": -1.331406, "latitude": 37.599544, "width": 500, "height": 334, "upload_date": "24 November 2006", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 3804107, "photo_title": "_Feloeka on the Nile_ (Aswan - Egypt)", "photo_url": "http://www.panoramio.com/photo/3804107", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3804107.jpg", "longitude": 32.887723, "latitude": 24.095443, "width": 500, "height": 350, "upload_date": "08 August 2007", "owner_id": 366746, "owner_name": "T NL", "owner_url": "http://www.panoramio.com/user/366746"} + , + {"photo_id": 369885, "photo_title": "Monarque on the beach", "photo_url": "http://www.panoramio.com/photo/369885", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/369885.jpg", "longitude": -70.563126, "latitude": 43.308816, "width": 500, "height": 371, "upload_date": "10 January 2007", "owner_id": 78738, "owner_name": "Nicola Vachon", "owner_url": "http://www.panoramio.com/user/78738"} + , + {"photo_id": 4819425, "photo_title": "Zeeland Magic, 1", "photo_url": "http://www.panoramio.com/photo/4819425", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4819425.jpg", "longitude": 3.479254, "latitude": 51.501169, "width": 492, "height": 500, "upload_date": "22 September 2007", "owner_id": 213866, "owner_name": "Nicolas Mertens", "owner_url": "http://www.panoramio.com/user/213866"} + , + {"photo_id": 88122, "photo_title": "Arpy Lake - Aosta Valley - Italy", "photo_url": "http://www.panoramio.com/photo/88122", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/88122.jpg", "longitude": 6.999636, "latitude": 45.723008, "width": 375, "height": 500, "upload_date": "28 November 2006", "owner_id": 11098, "owner_name": "Michele Masnata", "owner_url": "http://www.panoramio.com/user/11098"} + , + {"photo_id": 10219582, "photo_title": "MITTENS ALONG THE ROAD", "photo_url": "http://www.panoramio.com/photo/10219582", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10219582.jpg", "longitude": -110.091248, "latitude": 36.970810, "width": 500, "height": 462, "upload_date": "14 May 2008", "owner_id": 864987, "owner_name": "antorenz", "owner_url": "http://www.panoramio.com/user/864987"} + , + {"photo_id": 558167, "photo_title": "Táltostánc", "photo_url": "http://www.panoramio.com/photo/558167", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/558167.jpg", "longitude": 18.001614, "latitude": 47.409038, "width": 417, "height": 500, "upload_date": "24 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 7113068, "photo_title": "Bálavár", "photo_url": "http://www.panoramio.com/photo/7113068", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7113068.jpg", "longitude": 17.522507, "latitude": 47.775560, "width": 500, "height": 336, "upload_date": "14 January 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 2920885, "photo_title": "Rainbow", "photo_url": "http://www.panoramio.com/photo/2920885", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2920885.jpg", "longitude": 10.620818, "latitude": 47.770960, "width": 375, "height": 500, "upload_date": "24 June 2007", "owner_id": 123698, "owner_name": "© Kojak", "owner_url": "http://www.panoramio.com/user/123698"} + , + {"photo_id": 2499825, "photo_title": "Rosina lamberti,sunset, templestowe", "photo_url": "http://www.panoramio.com/photo/2499825", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2499825.jpg", "longitude": 145.143299, "latitude": -37.770104, "width": 500, "height": 359, "upload_date": "01 June 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 4536639, "photo_title": "Lago di Carezza", "photo_url": "http://www.panoramio.com/photo/4536639", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4536639.jpg", "longitude": 11.575298, "latitude": 46.410227, "width": 500, "height": 393, "upload_date": "09 September 2007", "owner_id": 578163, "owner_name": "Margherita-Italy", "owner_url": "http://www.panoramio.com/user/578163"} + , + {"photo_id": 314957, "photo_title": "\"He it is, who coming after me...\" - St. John Baptist on the Charles Bridge ", "photo_url": "http://www.panoramio.com/photo/314957", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/314957.jpg", "longitude": 14.410307, "latitude": 50.086597, "width": 335, "height": 500, "upload_date": "06 January 2007", "owner_id": 57869, "owner_name": "NAGY Albert", "owner_url": "http://www.panoramio.com/user/57869"} + , + {"photo_id": 507214, "photo_title": "A változás ideje", "photo_url": "http://www.panoramio.com/photo/507214", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507214.jpg", "longitude": 17.980499, "latitude": 47.390912, "width": 500, "height": 335, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 5551561, "photo_title": "New light old trees26-10-2007", "photo_url": "http://www.panoramio.com/photo/5551561", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5551561.jpg", "longitude": -5.663366, "latitude": 55.390130, "width": 338, "height": 500, "upload_date": "26 October 2007", "owner_id": 599676, "owner_name": "mossip", "owner_url": "http://www.panoramio.com/user/599676"} + , + {"photo_id": 67338, "photo_title": "Salar de Uyuni", "photo_url": "http://www.panoramio.com/photo/67338", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/67338.jpg", "longitude": -67.539825, "latitude": -20.439882, "width": 375, "height": 500, "upload_date": "20 October 2006", "owner_id": 9080, "owner_name": "Marco Teodonio", "owner_url": "http://www.panoramio.com/user/9080"} + , + {"photo_id": 436354, "photo_title": "oonogame", "photo_url": "http://www.panoramio.com/photo/436354", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/436354.jpg", "longitude": 138.461380, "latitude": 38.311760, "width": 387, "height": 500, "upload_date": "15 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 10068358, "photo_title": "#08 Reflections in Lendkanal, Klagenfurt, Scenery June 2008", "photo_url": "http://www.panoramio.com/photo/10068358", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10068358.jpg", "longitude": 14.294415, "latitude": 46.622326, "width": 375, "height": 500, "upload_date": "09 May 2008", "owner_id": 1077251, "owner_name": "picsonthemove", "owner_url": "http://www.panoramio.com/user/1077251"} + , + {"photo_id": 1440137, "photo_title": "Horseshoe Bend", "photo_url": "http://www.panoramio.com/photo/1440137", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1440137.jpg", "longitude": -111.510887, "latitude": 36.882641, "width": 500, "height": 391, "upload_date": "22 March 2007", "owner_id": 286729, "owner_name": "jimwitkowski", "owner_url": "http://www.panoramio.com/user/286729"} + , + {"photo_id": 4809439, "photo_title": "Going Nowhere Fast", "photo_url": "http://www.panoramio.com/photo/4809439", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4809439.jpg", "longitude": -119.013970, "latitude": 38.211420, "width": 375, "height": 500, "upload_date": "21 September 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 7806281, "photo_title": "Moon&Mosque", "photo_url": "http://www.panoramio.com/photo/7806281", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7806281.jpg", "longitude": 21.138296, "latitude": 41.960958, "width": 500, "height": 344, "upload_date": "13 February 2008", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 821388, "photo_title": "Aurora Borealis with frosty fog from the sea in front", "photo_url": "http://www.panoramio.com/photo/821388", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/821388.jpg", "longitude": 23.229733, "latitude": 69.962616, "width": 500, "height": 256, "upload_date": "14 February 2007", "owner_id": 56091, "owner_name": "Kjetil Vaage Øie", "owner_url": "http://www.panoramio.com/user/56091"} + , + {"photo_id": 946841, "photo_title": "Maroon Bells", "photo_url": "http://www.panoramio.com/photo/946841", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/946841.jpg", "longitude": -106.948385, "latitude": 39.095030, "width": 500, "height": 375, "upload_date": "21 February 2007", "owner_id": 163881, "owner_name": "faisasy", "owner_url": "http://www.panoramio.com/user/163881"} + , + {"photo_id": 3719882, "photo_title": "Puesta de Sol(Oest.Portugal)", "photo_url": "http://www.panoramio.com/photo/3719882", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3719882.jpg", "longitude": -9.286709, "latitude": 39.392428, "width": 375, "height": 500, "upload_date": "04 August 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 3418114, "photo_title": "Fény-Kép", "photo_url": "http://www.panoramio.com/photo/3418114", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3418114.jpg", "longitude": 17.511692, "latitude": 47.837127, "width": 500, "height": 333, "upload_date": "20 July 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 255257, "photo_title": "Croatia, Brela - Sunset on the Beach - near \"Kamen Brela\" rock, symbol of this adriatic town", "photo_url": "http://www.panoramio.com/photo/255257", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/255257.jpg", "longitude": 16.922604, "latitude": 43.372309, "width": 500, "height": 332, "upload_date": "28 December 2006", "owner_id": 52119, "owner_name": "RomanV", "owner_url": "http://www.panoramio.com/user/52119"} + , + {"photo_id": 2346040, "photo_title": "Huncut fények", "photo_url": "http://www.panoramio.com/photo/2346040", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2346040.jpg", "longitude": 15.539217, "latitude": 47.670589, "width": 500, "height": 334, "upload_date": "22 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1235900, "photo_title": "Fog, Hemlocks and Cedars ", "photo_url": "http://www.panoramio.com/photo/1235900", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1235900.jpg", "longitude": -131.682816, "latitude": 52.885706, "width": 500, "height": 352, "upload_date": "09 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 111554, "photo_title": "Lahna", "photo_url": "http://www.panoramio.com/photo/111554", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/111554.jpg", "longitude": 27.557831, "latitude": 42.550551, "width": 500, "height": 357, "upload_date": "11 December 2006", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 280112, "photo_title": "dune02", "photo_url": "http://www.panoramio.com/photo/280112", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/280112.jpg", "longitude": -3.985291, "latitude": 31.156408, "width": 500, "height": 338, "upload_date": "01 January 2007", "owner_id": 58867, "owner_name": "Lachaud Franck", "owner_url": "http://www.panoramio.com/user/58867"} + , + {"photo_id": 5984, "photo_title": "Chott El Jerid", "photo_url": "http://www.panoramio.com/photo/5984", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5984.jpg", "longitude": 8.358536, "latitude": 33.715202, "width": 347, "height": 500, "upload_date": "17 December 2005", "owner_id": 989, "owner_name": "Mrgud", "owner_url": "http://www.panoramio.com/user/989"} + , + {"photo_id": 25513, "photo_title": "Catarata Rio Celeste", "photo_url": "http://www.panoramio.com/photo/25513", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/25513.jpg", "longitude": -85.046539, "latitude": 10.643400, "width": 375, "height": 500, "upload_date": "17 June 2006", "owner_id": 4112, "owner_name": "Roberto Garcia", "owner_url": "http://www.panoramio.com/user/4112"} + , + {"photo_id": 35502, "photo_title": "roques", "photo_url": "http://www.panoramio.com/photo/35502", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/35502.jpg", "longitude": -66.774902, "latitude": 11.802834, "width": 500, "height": 375, "upload_date": "29 July 2006", "owner_id": 3360, "owner_name": "ozzy", "owner_url": "http://www.panoramio.com/user/3360"} + , + {"photo_id": 1656020, "photo_title": "Palmeras", "photo_url": "http://www.panoramio.com/photo/1656020", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1656020.jpg", "longitude": -1.211929, "latitude": 37.935804, "width": 500, "height": 333, "upload_date": "06 April 2007", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 58341, "photo_title": "Lio Piccolo - Palazzetto Boldú", "photo_url": "http://www.panoramio.com/photo/58341", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58341.jpg", "longitude": 12.489095, "latitude": 45.490615, "width": 500, "height": 333, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 416310, "photo_title": "Lake of Glass Falls", "photo_url": "http://www.panoramio.com/photo/416310", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/416310.jpg", "longitude": -105.664272, "latitude": 40.283192, "width": 500, "height": 374, "upload_date": "13 January 2007", "owner_id": 87752, "owner_name": "Richard Ryer", "owner_url": "http://www.panoramio.com/user/87752"} + , + {"photo_id": 8148031, "photo_title": "Der Morgen in der Camargue .....", "photo_url": "http://www.panoramio.com/photo/8148031", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8148031.jpg", "longitude": 4.451180, "latitude": 43.507102, "width": 500, "height": 351, "upload_date": "27 February 2008", "owner_id": 7434, "owner_name": "baldinger reisen ag, waedenswil/switzerland", "owner_url": "http://www.panoramio.com/user/7434"} + , + {"photo_id": 1088575, "photo_title": "Lampion", "photo_url": "http://www.panoramio.com/photo/1088575", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1088575.jpg", "longitude": 17.698631, "latitude": 47.521374, "width": 500, "height": 397, "upload_date": "28 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 771169, "photo_title": "Bloodred evening sky, near Zutphen", "photo_url": "http://www.panoramio.com/photo/771169", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/771169.jpg", "longitude": 6.110770, "latitude": 52.113681, "width": 500, "height": 500, "upload_date": "11 February 2007", "owner_id": 161254, "owner_name": "fotoartistry", "owner_url": "http://www.panoramio.com/user/161254"} + , + {"photo_id": 2334149, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/2334149", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2334149.jpg", "longitude": 0.493269, "latitude": 40.904204, "width": 500, "height": 304, "upload_date": "21 May 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 41688, "photo_title": "Unbelieveable sunrise colors at Lofoten", "photo_url": "http://www.panoramio.com/photo/41688", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/41688.jpg", "longitude": 14.256134, "latitude": 68.239368, "width": 500, "height": 375, "upload_date": "26 August 2006", "owner_id": 3404, "owner_name": "Csongor Böröczky", "owner_url": "http://www.panoramio.com/user/3404"} + , + {"photo_id": 6953, "photo_title": "Last moment of the day", "photo_url": "http://www.panoramio.com/photo/6953", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6953.jpg", "longitude": 2.191944, "latitude": 41.578599, "width": 500, "height": 320, "upload_date": "16 January 2006", "owner_id": 414, "owner_name": "Sonia Villegas", "owner_url": "http://www.panoramio.com/user/414"} + , + {"photo_id": 10895432, "photo_title": "Карагайская сосна", "photo_url": "http://www.panoramio.com/photo/10895432", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10895432.jpg", "longitude": 57.886791, "latitude": 51.644708, "width": 333, "height": 500, "upload_date": "04 June 2008", "owner_id": 904057, "owner_name": "Б.Ярцев", "owner_url": "http://www.panoramio.com/user/904057"} + , + {"photo_id": 1446812, "photo_title": "Elfland", "photo_url": "http://www.panoramio.com/photo/1446812", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1446812.jpg", "longitude": 17.808323, "latitude": 47.349408, "width": 345, "height": 500, "upload_date": "22 March 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4898495, "photo_title": "Elfendel", "photo_url": "http://www.panoramio.com/photo/4898495", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4898495.jpg", "longitude": 17.724380, "latitude": 47.261058, "width": 500, "height": 325, "upload_date": "25 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 911298, "photo_title": "View from Nordenskiöldtoppen, Svalbard", "photo_url": "http://www.panoramio.com/photo/911298", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/911298.jpg", "longitude": 15.314941, "latitude": 78.179588, "width": 500, "height": 287, "upload_date": "20 February 2007", "owner_id": 66734, "owner_name": "Svein Solhaug", "owner_url": "http://www.panoramio.com/user/66734"} + , + {"photo_id": 2169236, "photo_title": "sunset", "photo_url": "http://www.panoramio.com/photo/2169236", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2169236.jpg", "longitude": 145.128708, "latitude": -37.759859, "width": 333, "height": 500, "upload_date": "11 May 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 237466, "photo_title": "wierzchon.com warsaw podzamcze", "photo_url": "http://www.panoramio.com/photo/237466", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/237466.jpg", "longitude": 21.011347, "latitude": 52.253852, "width": 335, "height": 500, "upload_date": "26 December 2006", "owner_id": 47836, "owner_name": "Andrzej Wierzchon", "owner_url": "http://www.panoramio.com/user/47836"} + , + {"photo_id": 355519, "photo_title": "chile laguna miscanti", "photo_url": "http://www.panoramio.com/photo/355519", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/355519.jpg", "longitude": -67.798347, "latitude": -23.758010, "width": 500, "height": 334, "upload_date": "09 January 2007", "owner_id": 69671, "owner_name": "illusandpics.com", "owner_url": "http://www.panoramio.com/user/69671"} + , + {"photo_id": 58360, "photo_title": "Castello di Toblino", "photo_url": "http://www.panoramio.com/photo/58360", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58360.jpg", "longitude": 10.966415, "latitude": 46.054173, "width": 500, "height": 333, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 10511168, "photo_title": "Në Fush të Pallaticës", "photo_url": "http://www.panoramio.com/photo/10511168", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10511168.jpg", "longitude": 21.075296, "latitude": 42.007692, "width": 500, "height": 413, "upload_date": "23 May 2008", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 572526, "photo_title": "Farm by Osafjorden in the first sun of the day", "photo_url": "http://www.panoramio.com/photo/572526", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/572526.jpg", "longitude": 6.998119, "latitude": 60.563101, "width": 500, "height": 353, "upload_date": "25 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 5303687, "photo_title": "Fátyoltánc", "photo_url": "http://www.panoramio.com/photo/5303687", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5303687.jpg", "longitude": 15.934725, "latitude": 47.915997, "width": 500, "height": 334, "upload_date": "14 October 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 370324, "photo_title": "Rainbow_by_bkm", "photo_url": "http://www.panoramio.com/photo/370324", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/370324.jpg", "longitude": 6.453094, "latitude": 62.636926, "width": 500, "height": 344, "upload_date": "10 January 2007", "owner_id": 78923, "owner_name": "bj00rn", "owner_url": "http://www.panoramio.com/user/78923"} + , + {"photo_id": 7996369, "photo_title": "Bled - Church on the island", "photo_url": "http://www.panoramio.com/photo/7996369", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7996369.jpg", "longitude": 14.084473, "latitude": 46.360671, "width": 375, "height": 500, "upload_date": "21 February 2008", "owner_id": 763995, "owner_name": "Samo T.", "owner_url": "http://www.panoramio.com/user/763995"} + , + {"photo_id": 498385, "photo_title": "Rainbow Falls in Sun", "photo_url": "http://www.panoramio.com/photo/498385", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/498385.jpg", "longitude": -119.084823, "latitude": 37.601771, "width": 407, "height": 500, "upload_date": "20 January 2007", "owner_id": 107613, "owner_name": "Tom Grubbe", "owner_url": "http://www.panoramio.com/user/107613"} + , + {"photo_id": 571110, "photo_title": "Nordlys - Aurora Borealis - over Vadsø", "photo_url": "http://www.panoramio.com/photo/571110", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/571110.jpg", "longitude": 29.815350, "latitude": 70.075649, "width": 500, "height": 332, "upload_date": "25 January 2007", "owner_id": 121482, "owner_name": "Jens Gressmyr", "owner_url": "http://www.panoramio.com/user/121482"} + , + {"photo_id": 3904502, "photo_title": "Una notte di fuoco - a night of fire ", "photo_url": "http://www.panoramio.com/photo/3904502", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3904502.jpg", "longitude": 11.337290, "latitude": 46.461257, "width": 500, "height": 360, "upload_date": "13 August 2007", "owner_id": 578163, "owner_name": "Margherita-Italy", "owner_url": "http://www.panoramio.com/user/578163"} + , + {"photo_id": 1835001, "photo_title": "Вулкан Жупановский. Рассвет", "photo_url": "http://www.panoramio.com/photo/1835001", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1835001.jpg", "longitude": 158.595543, "latitude": 53.496828, "width": 500, "height": 341, "upload_date": "19 April 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 91931, "photo_title": "Plitvice (Croacia)", "photo_url": "http://www.panoramio.com/photo/91931", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/91931.jpg", "longitude": 15.599556, "latitude": 44.851975, "width": 500, "height": 375, "upload_date": "04 December 2006", "owner_id": 11403, "owner_name": "Arnáiz", "owner_url": "http://www.panoramio.com/user/11403"} + , + {"photo_id": 515905, "photo_title": "A figyelő", "photo_url": "http://www.panoramio.com/photo/515905", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/515905.jpg", "longitude": 17.625675, "latitude": 47.565060, "width": 500, "height": 345, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 7444056, "photo_title": "Ragyogás II.", "photo_url": "http://www.panoramio.com/photo/7444056", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7444056.jpg", "longitude": 16.385422, "latitude": 46.850095, "width": 333, "height": 500, "upload_date": "29 January 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1674082, "photo_title": "STATUA LIBERTA'", "photo_url": "http://www.panoramio.com/photo/1674082", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1674082.jpg", "longitude": -74.042444, "latitude": 40.689229, "width": 500, "height": 375, "upload_date": "07 April 2007", "owner_id": 135078, "owner_name": "Fabio Belli FABIOSO", "owner_url": "http://www.panoramio.com/user/135078"} + , + {"photo_id": 798846, "photo_title": "Panther Rock, Antelope Canyon, AZ", "photo_url": "http://www.panoramio.com/photo/798846", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/798846.jpg", "longitude": -111.391668, "latitude": 36.878728, "width": 376, "height": 500, "upload_date": "12 February 2007", "owner_id": 52440, "owner_name": "Hank Waxman", "owner_url": "http://www.panoramio.com/user/52440"} + , + {"photo_id": 21458, "photo_title": "The way of dreams (Aletschgletsher)", "photo_url": "http://www.panoramio.com/photo/21458", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/21458.jpg", "longitude": 7.976074, "latitude": 46.544694, "width": 500, "height": 375, "upload_date": "29 May 2006", "owner_id": 3404, "owner_name": "Csongor Böröczky", "owner_url": "http://www.panoramio.com/user/3404"} + , + {"photo_id": 691681, "photo_title": "PANORAMIO - Ilha das Cabras - by Wolfgang Wodeck", "photo_url": "http://www.panoramio.com/photo/691681", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/691681.jpg", "longitude": -48.628750, "latitude": -26.989624, "width": 500, "height": 333, "upload_date": "04 February 2007", "owner_id": 103166, "owner_name": "Wolfgang Wodeck", "owner_url": "http://www.panoramio.com/user/103166"} + , + {"photo_id": 564451, "photo_title": "Gewitter über Schutterwald", "photo_url": "http://www.panoramio.com/photo/564451", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/564451.jpg", "longitude": 7.887470, "latitude": 48.453409, "width": 500, "height": 333, "upload_date": "25 January 2007", "owner_id": 121083, "owner_name": "Alexandra Buss", "owner_url": "http://www.panoramio.com/user/121083"} + , + {"photo_id": 1430151, "photo_title": "Burano", "photo_url": "http://www.panoramio.com/photo/1430151", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1430151.jpg", "longitude": 12.416686, "latitude": 45.485966, "width": 500, "height": 365, "upload_date": "21 March 2007", "owner_id": 193913, "owner_name": "Klesitz Piroska", "owner_url": "http://www.panoramio.com/user/193913"} + , + {"photo_id": 3156915, "photo_title": "Brussels - Grand Place", "photo_url": "http://www.panoramio.com/photo/3156915", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3156915.jpg", "longitude": 4.352152, "latitude": 50.846658, "width": 500, "height": 375, "upload_date": "07 July 2007", "owner_id": 138691, "owner_name": "Josep Maria Alegre", "owner_url": "http://www.panoramio.com/user/138691"} + , + {"photo_id": 6126516, "photo_title": "Richmond Deer", "photo_url": "http://www.panoramio.com/photo/6126516", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6126516.jpg", "longitude": -0.279776, "latitude": 51.448565, "width": 500, "height": 294, "upload_date": "25 November 2007", "owner_id": 1130880, "owner_name": "marksimms", "owner_url": "http://www.panoramio.com/user/1130880"} + , + {"photo_id": 679356, "photo_title": "sulphur crested cockatoos", "photo_url": "http://www.panoramio.com/photo/679356", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/679356.jpg", "longitude": 150.363181, "latitude": -33.718234, "width": 500, "height": 500, "upload_date": "04 February 2007", "owner_id": 146092, "owner_name": "sid1662", "owner_url": "http://www.panoramio.com/user/146092"} + , + {"photo_id": 462324, "photo_title": "Yucca", "photo_url": "http://www.panoramio.com/photo/462324", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/462324.jpg", "longitude": -106.259680, "latitude": 32.797448, "width": 500, "height": 500, "upload_date": "17 January 2007", "owner_id": 93560, "owner_name": "Alex Petrov", "owner_url": "http://www.panoramio.com/user/93560"} + , + {"photo_id": 9528831, "photo_title": "maldives", "photo_url": "http://www.panoramio.com/photo/9528831", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9528831.jpg", "longitude": 73.454686, "latitude": 3.845837, "width": 500, "height": 335, "upload_date": "20 April 2008", "owner_id": 647076, "owner_name": "garethohara", "owner_url": "http://www.panoramio.com/user/647076"} + , + {"photo_id": 11825351, "photo_title": " ARC Buque Escuela Gloria. ARC School Ship Gloria. by (((Jose Daniel))) ", "photo_url": "http://www.panoramio.com/photo/11825351", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11825351.jpg", "longitude": -75.539761, "latitude": 10.410917, "width": 500, "height": 392, "upload_date": "05 July 2008", "owner_id": 1611883, "owner_name": "(((Jose Daniel)))", "owner_url": "http://www.panoramio.com/user/1611883"} + , + {"photo_id": 459614, "photo_title": "seaside line", "photo_url": "http://www.panoramio.com/photo/459614", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459614.jpg", "longitude": 138.801785, "latitude": 37.756669, "width": 500, "height": 383, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 771974, "photo_title": "Retired Boat", "photo_url": "http://www.panoramio.com/photo/771974", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/771974.jpg", "longitude": 25.427610, "latitude": 36.427576, "width": 500, "height": 332, "upload_date": "11 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1781649, "photo_title": "Fall in Yosemite Valley", "photo_url": "http://www.panoramio.com/photo/1781649", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1781649.jpg", "longitude": -119.609270, "latitude": 37.735290, "width": 500, "height": 400, "upload_date": "15 April 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 8491500, "photo_title": "Horsetail Falls at Sunset", "photo_url": "http://www.panoramio.com/photo/8491500", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8491500.jpg", "longitude": -119.623947, "latitude": 37.723512, "width": 333, "height": 500, "upload_date": "12 March 2008", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 9505599, "photo_title": "#9 Penguins at Boulders Beach, Simon’s Town, Scenery May08", "photo_url": "http://www.panoramio.com/photo/9505599", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9505599.jpg", "longitude": 18.450642, "latitude": -34.196443, "width": 500, "height": 489, "upload_date": "19 April 2008", "owner_id": 1077251, "owner_name": "picsonthemove", "owner_url": "http://www.panoramio.com/user/1077251"} + , + {"photo_id": 1320563, "photo_title": "Pirates on anchor", "photo_url": "http://www.panoramio.com/photo/1320563", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1320563.jpg", "longitude": 39.311485, "latitude": -5.724799, "width": 316, "height": 500, "upload_date": "14 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 2381962, "photo_title": "Uluru,Northern Territory,Australia-Rosina lamberti", "photo_url": "http://www.panoramio.com/photo/2381962", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2381962.jpg", "longitude": 131.054878, "latitude": -25.326959, "width": 500, "height": 274, "upload_date": "25 May 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 92102, "photo_title": "Briksdalsbreen (Norway)", "photo_url": "http://www.panoramio.com/photo/92102", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/92102.jpg", "longitude": 6.887054, "latitude": 61.664788, "width": 500, "height": 375, "upload_date": "05 December 2006", "owner_id": 11403, "owner_name": "Arnáiz", "owner_url": "http://www.panoramio.com/user/11403"} + , + {"photo_id": 7012377, "photo_title": "Kanyarfények", "photo_url": "http://www.panoramio.com/photo/7012377", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7012377.jpg", "longitude": 17.517700, "latitude": 47.760445, "width": 500, "height": 334, "upload_date": "09 January 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 422769, "photo_title": "hazaki2", "photo_url": "http://www.panoramio.com/photo/422769", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/422769.jpg", "longitude": 138.862553, "latitude": 37.711410, "width": 500, "height": 333, "upload_date": "14 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 4558763, "photo_title": "Corsica - West Coast", "photo_url": "http://www.panoramio.com/photo/4558763", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4558763.jpg", "longitude": 8.640404, "latitude": 42.255205, "width": 500, "height": 342, "upload_date": "10 September 2007", "owner_id": 49870, "owner_name": "Jean-Michel Raggioli", "owner_url": "http://www.panoramio.com/user/49870"} + , + {"photo_id": 374479, "photo_title": "Corinthos", "photo_url": "http://www.panoramio.com/photo/374479", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/374479.jpg", "longitude": 22.997131, "latitude": 37.925514, "width": 375, "height": 500, "upload_date": "10 January 2007", "owner_id": 74407, "owner_name": "Yeoman", "owner_url": "http://www.panoramio.com/user/74407"} + , + {"photo_id": 2421991, "photo_title": "\"Different\" Arch", "photo_url": "http://www.panoramio.com/photo/2421991", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2421991.jpg", "longitude": -109.499032, "latitude": 38.744118, "width": 500, "height": 333, "upload_date": "27 May 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 945978, "photo_title": "L'Ebre", "photo_url": "http://www.panoramio.com/photo/945978", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/945978.jpg", "longitude": 0.495501, "latitude": 40.905015, "width": 500, "height": 377, "upload_date": "21 February 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 48449, "photo_title": "Montserrat", "photo_url": "http://www.panoramio.com/photo/48449", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/48449.jpg", "longitude": 1.840060, "latitude": 41.593702, "width": 500, "height": 337, "upload_date": "15 September 2006", "owner_id": 5477, "owner_name": "errece", "owner_url": "http://www.panoramio.com/user/5477"} + , + {"photo_id": 572483, "photo_title": "wheatfield in autumn", "photo_url": "http://www.panoramio.com/photo/572483", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/572483.jpg", "longitude": 11.278152, "latitude": 59.644760, "width": 500, "height": 351, "upload_date": "25 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 2060897, "photo_title": "Mid Coolum", "photo_url": "http://www.panoramio.com/photo/2060897", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2060897.jpg", "longitude": 153.097685, "latitude": -26.540052, "width": 500, "height": 336, "upload_date": "04 May 2007", "owner_id": 411736, "owner_name": "Nixpix", "owner_url": "http://www.panoramio.com/user/411736"} + , + {"photo_id": 6327146, "photo_title": "Winterwald beim \"Widi\" - a thin sheet of ice (messi 06)", "photo_url": "http://www.panoramio.com/photo/6327146", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6327146.jpg", "longitude": 7.381070, "latitude": 47.015670, "width": 500, "height": 363, "upload_date": "06 December 2007", "owner_id": 162722, "owner_name": "©polytropos", "owner_url": "http://www.panoramio.com/user/162722"} + , + {"photo_id": 36476, "photo_title": "Bergbach", "photo_url": "http://www.panoramio.com/photo/36476", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36476.jpg", "longitude": 13.911953, "latitude": 47.634164, "width": 375, "height": 500, "upload_date": "02 August 2006", "owner_id": 5703, "owner_name": "dancer", "owner_url": "http://www.panoramio.com/user/5703"} + , + {"photo_id": 436366, "photo_title": "sunset", "photo_url": "http://www.panoramio.com/photo/436366", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/436366.jpg", "longitude": 138.857231, "latitude": 37.828497, "width": 500, "height": 351, "upload_date": "15 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 701842, "photo_title": "Singapore Skyline @ Night", "photo_url": "http://www.panoramio.com/photo/701842", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/701842.jpg", "longitude": 103.855486, "latitude": 1.288897, "width": 500, "height": 324, "upload_date": "05 February 2007", "owner_id": 20398, "owner_name": "boerx", "owner_url": "http://www.panoramio.com/user/20398"} + , + {"photo_id": 6086623, "photo_title": "Lángoló repce", "photo_url": "http://www.panoramio.com/photo/6086623", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6086623.jpg", "longitude": 17.784977, "latitude": 47.660994, "width": 500, "height": 334, "upload_date": "23 November 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1595617, "photo_title": "Rosina lamberti,Templestowe,Victoria,Australia", "photo_url": "http://www.panoramio.com/photo/1595617", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1595617.jpg", "longitude": 145.137978, "latitude": -37.774785, "width": 500, "height": 354, "upload_date": "02 April 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 74727, "photo_title": "ama dablam in background", "photo_url": "http://www.panoramio.com/photo/74727", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/74727.jpg", "longitude": 86.826496, "latitude": 27.904631, "width": 500, "height": 334, "upload_date": "02 November 2006", "owner_id": 9812, "owner_name": "wsm earp", "owner_url": "http://www.panoramio.com/user/9812"} + , + {"photo_id": 36086, "photo_title": "Рим. двор Ватикана", "photo_url": "http://www.panoramio.com/photo/36086", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36086.jpg", "longitude": 12.454505, "latitude": 41.905695, "width": 500, "height": 444, "upload_date": "31 July 2006", "owner_id": 5641, "owner_name": "sergey duhanin", "owner_url": "http://www.panoramio.com/user/5641"} + , + {"photo_id": 2066940, "photo_title": "Unbelievable ice sculptures", "photo_url": "http://www.panoramio.com/photo/2066940", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2066940.jpg", "longitude": -73.264389, "latitude": -50.009063, "width": 500, "height": 333, "upload_date": "04 May 2007", "owner_id": 3316, "owner_name": "kristine hannon (www.traveltheglobe.be)", "owner_url": "http://www.panoramio.com/user/3316"} + , + {"photo_id": 1759754, "photo_title": "On the way for the heat wave", "photo_url": "http://www.panoramio.com/photo/1759754", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1759754.jpg", "longitude": -12.734528, "latitude": 20.208079, "width": 500, "height": 331, "upload_date": "13 April 2007", "owner_id": 121377, "owner_name": "Philippe Buffard", "owner_url": "http://www.panoramio.com/user/121377"} + , + {"photo_id": 5717808, "photo_title": "Moonlight @ Eglisau", "photo_url": "http://www.panoramio.com/photo/5717808", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5717808.jpg", "longitude": 8.521459, "latitude": 47.575035, "width": 500, "height": 331, "upload_date": "05 November 2007", "owner_id": 436351, "owner_name": "Sunpixx", "owner_url": "http://www.panoramio.com/user/436351"} + , + {"photo_id": 44853, "photo_title": "Airfocus20050501DSC_3416l", "photo_url": "http://www.panoramio.com/photo/44853", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/44853.jpg", "longitude": 7.663361, "latitude": 50.287009, "width": 500, "height": 332, "upload_date": "02 September 2006", "owner_id": 6703, "owner_name": "Peter Jansen", "owner_url": "http://www.panoramio.com/user/6703"} + , + {"photo_id": 57403, "photo_title": "Burano 2", "photo_url": "http://www.panoramio.com/photo/57403", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57403.jpg", "longitude": 12.420173, "latitude": 45.485365, "width": 500, "height": 331, "upload_date": "04 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 13130, "photo_title": "Agde - Painted wall", "photo_url": "http://www.panoramio.com/photo/13130", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/13130.jpg", "longitude": 3.471251, "latitude": 43.312314, "width": 500, "height": 375, "upload_date": "25 February 2006", "owner_id": 1981, "owner_name": "Eric Medvet", "owner_url": "http://www.panoramio.com/user/1981"} + , + {"photo_id": 7375236, "photo_title": "le Loir en crue à Briollay, janvier 2008. #276", "photo_url": "http://www.panoramio.com/photo/7375236", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7375236.jpg", "longitude": -0.500618, "latitude": 47.557827, "width": 500, "height": 338, "upload_date": "26 January 2008", "owner_id": 666755, "owner_name": "Armagnac", "owner_url": "http://www.panoramio.com/user/666755"} + , + {"photo_id": 3851701, "photo_title": "Mailbox", "photo_url": "http://www.panoramio.com/photo/3851701", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3851701.jpg", "longitude": -73.475790, "latitude": 44.528271, "width": 500, "height": 333, "upload_date": "10 August 2007", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 1235904, "photo_title": "Ripples", "photo_url": "http://www.panoramio.com/photo/1235904", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1235904.jpg", "longitude": -131.616211, "latitude": 52.834299, "width": 330, "height": 500, "upload_date": "09 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 50646, "photo_title": "Ice Cave", "photo_url": "http://www.panoramio.com/photo/50646", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/50646.jpg", "longitude": -118.052559, "latitude": 52.678620, "width": 500, "height": 375, "upload_date": "21 September 2006", "owner_id": 7190, "owner_name": "Perry Tang", "owner_url": "http://www.panoramio.com/user/7190"} + , + {"photo_id": 617458, "photo_title": "Pescador", "photo_url": "http://www.panoramio.com/photo/617458", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/617458.jpg", "longitude": 0.492368, "latitude": 40.904091, "width": 500, "height": 334, "upload_date": "29 January 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 52724, "photo_title": "Sunrise Gythio", "photo_url": "http://www.panoramio.com/photo/52724", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/52724.jpg", "longitude": 22.574501, "latitude": 36.755665, "width": 500, "height": 333, "upload_date": "26 September 2006", "owner_id": 7464, "owner_name": "Pieter", "owner_url": "http://www.panoramio.com/user/7464"} + , + {"photo_id": 289855, "photo_title": "Coronation Island Colours", "photo_url": "http://www.panoramio.com/photo/289855", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/289855.jpg", "longitude": -45.703125, "latitude": -60.705448, "width": 500, "height": 335, "upload_date": "03 January 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 5649263, "photo_title": "Naab im Herbst", "photo_url": "http://www.panoramio.com/photo/5649263", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5649263.jpg", "longitude": 12.070885, "latitude": 49.298711, "width": 500, "height": 329, "upload_date": "31 October 2007", "owner_id": 696605, "owner_name": "© alfredschaffer", "owner_url": "http://www.panoramio.com/user/696605"} + , + {"photo_id": 110750, "photo_title": "The Peter and Paul Fortress. Panoramic view (180°) from The Palace Quay. — Большая (180°) панорама Петропавловской крепости с Дворцовой набережной.", "photo_url": "http://www.panoramio.com/photo/110750", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/110750.jpg", "longitude": 30.317802, "latitude": 59.946930, "width": 500, "height": 31, "upload_date": "11 December 2006", "owner_id": 12103, "owner_name": "Roman Sobolenko", "owner_url": "http://www.panoramio.com/user/12103"} + , + {"photo_id": 1870028, "photo_title": "Tour Moretti", "photo_url": "http://www.panoramio.com/photo/1870028", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1870028.jpg", "longitude": 2.247775, "latitude": 48.889175, "width": 500, "height": 395, "upload_date": "21 April 2007", "owner_id": 372189, "owner_name": "Phil©", "owner_url": "http://www.panoramio.com/user/372189"} + , + {"photo_id": 52752, "photo_title": "Sun and Clouds in Naphlion", "photo_url": "http://www.panoramio.com/photo/52752", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/52752.jpg", "longitude": 22.792425, "latitude": 37.562405, "width": 333, "height": 500, "upload_date": "26 September 2006", "owner_id": 7464, "owner_name": "Pieter", "owner_url": "http://www.panoramio.com/user/7464"} + , + {"photo_id": 2256672, "photo_title": "En algún punto", "photo_url": "http://www.panoramio.com/photo/2256672", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2256672.jpg", "longitude": -2.579153, "latitude": 42.493436, "width": 500, "height": 331, "upload_date": "17 May 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 519209, "photo_title": "Armageddon", "photo_url": "http://www.panoramio.com/photo/519209", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/519209.jpg", "longitude": 17.627563, "latitude": 47.664809, "width": 500, "height": 334, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 10175554, "photo_title": "Vessel to eternity", "photo_url": "http://www.panoramio.com/photo/10175554", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10175554.jpg", "longitude": 119.670467, "latitude": 11.089976, "width": 500, "height": 363, "upload_date": "13 May 2008", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 11138384, "photo_title": "Lac des Joncs, reflets", "photo_url": "http://www.panoramio.com/photo/11138384", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11138384.jpg", "longitude": 6.946986, "latitude": 46.513176, "width": 500, "height": 375, "upload_date": "12 June 2008", "owner_id": 1430484, "owner_name": "tiopepe8", "owner_url": "http://www.panoramio.com/user/1430484"} + , + {"photo_id": 204255, "photo_title": "Old farm by Osafjorden", "photo_url": "http://www.panoramio.com/photo/204255", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/204255.jpg", "longitude": 6.998978, "latitude": 60.564197, "width": 500, "height": 368, "upload_date": "21 December 2006", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 3871571, "photo_title": "St. Bartholomä am Königssee", "photo_url": "http://www.panoramio.com/photo/3871571", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3871571.jpg", "longitude": 12.973351, "latitude": 47.545220, "width": 500, "height": 375, "upload_date": "11 August 2007", "owner_id": 424589, "owner_name": "PeSchn", "owner_url": "http://www.panoramio.com/user/424589"} + , + {"photo_id": 5358166, "photo_title": "Mooney Falls", "photo_url": "http://www.panoramio.com/photo/5358166", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5358166.jpg", "longitude": -112.709148, "latitude": 36.262849, "width": 500, "height": 335, "upload_date": "16 October 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 600797, "photo_title": "Living (?) in Hong Kong", "photo_url": "http://www.panoramio.com/photo/600797", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/600797.jpg", "longitude": 113.935831, "latitude": 22.279794, "width": 500, "height": 334, "upload_date": "28 January 2007", "owner_id": 20398, "owner_name": "boerx", "owner_url": "http://www.panoramio.com/user/20398"} + , + {"photo_id": 6459385, "photo_title": "Alternativ Future", "photo_url": "http://www.panoramio.com/photo/6459385", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6459385.jpg", "longitude": 17.598467, "latitude": 47.645846, "width": 500, "height": 325, "upload_date": "13 December 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 522010, "photo_title": "Hyperion", "photo_url": "http://www.panoramio.com/photo/522010", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/522010.jpg", "longitude": 17.562933, "latitude": 47.632545, "width": 500, "height": 353, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4942642, "photo_title": "Förgeteg elött", "photo_url": "http://www.panoramio.com/photo/4942642", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4942642.jpg", "longitude": 17.807121, "latitude": 47.646887, "width": 500, "height": 334, "upload_date": "27 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 223798, "photo_title": "Kachemak Bay Moonrise", "photo_url": "http://www.panoramio.com/photo/223798", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/223798.jpg", "longitude": -151.426835, "latitude": 59.680146, "width": 500, "height": 333, "upload_date": "24 December 2006", "owner_id": 45308, "owner_name": "Mike Cavaroc", "owner_url": "http://www.panoramio.com/user/45308"} + , + {"photo_id": 1946961, "photo_title": "Három \"Grácia\"", "photo_url": "http://www.panoramio.com/photo/1946961", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1946961.jpg", "longitude": 18.273354, "latitude": 47.577684, "width": 500, "height": 290, "upload_date": "27 April 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 821342, "photo_title": "Northern Lights seen from Alta", "photo_url": "http://www.panoramio.com/photo/821342", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/821342.jpg", "longitude": 23.234882, "latitude": 69.962969, "width": 500, "height": 346, "upload_date": "14 February 2007", "owner_id": 56091, "owner_name": "Kjetil Vaage Øie", "owner_url": "http://www.panoramio.com/user/56091"} + , + {"photo_id": 9831100, "photo_title": "Repcepásztor", "photo_url": "http://www.panoramio.com/photo/9831100", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9831100.jpg", "longitude": 18.213100, "latitude": 47.567956, "width": 500, "height": 334, "upload_date": "01 May 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 8294907, "photo_title": "Winds of Change", "photo_url": "http://www.panoramio.com/photo/8294907", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8294907.jpg", "longitude": -112.007847, "latitude": 36.993299, "width": 333, "height": 500, "upload_date": "04 March 2008", "owner_id": 107292, "owner_name": "Kevin Mikkelsen", "owner_url": "http://www.panoramio.com/user/107292"} + , + {"photo_id": 7388668, "photo_title": "jak dobrze wstać ...", "photo_url": "http://www.panoramio.com/photo/7388668", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7388668.jpg", "longitude": 15.746498, "latitude": 51.848929, "width": 500, "height": 353, "upload_date": "27 January 2008", "owner_id": 889535, "owner_name": "yossarian01", "owner_url": "http://www.panoramio.com/user/889535"} + , + {"photo_id": 617471, "photo_title": "Rio", "photo_url": "http://www.panoramio.com/photo/617471", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/617471.jpg", "longitude": 0.493505, "latitude": 40.904318, "width": 500, "height": 335, "upload_date": "29 January 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 259612, "photo_title": "Miss Liberty, NY/NJ Harbor", "photo_url": "http://www.panoramio.com/photo/259612", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/259612.jpg", "longitude": -74.039698, "latitude": 40.687472, "width": 357, "height": 500, "upload_date": "29 December 2006", "owner_id": 52440, "owner_name": "Hank Waxman", "owner_url": "http://www.panoramio.com/user/52440"} + , + {"photo_id": 2282545, "photo_title": "San Remo Scorcio di San Siro", "photo_url": "http://www.panoramio.com/photo/2282545", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2282545.jpg", "longitude": 7.773911, "latitude": 43.818234, "width": 500, "height": 459, "upload_date": "18 May 2007", "owner_id": 60898, "owner_name": "esseil", "owner_url": "http://www.panoramio.com/user/60898"} + , + {"photo_id": 84795, "photo_title": "0032", "photo_url": "http://www.panoramio.com/photo/84795", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/84795.jpg", "longitude": 25.830574, "latitude": -20.889688, "width": 500, "height": 334, "upload_date": "22 November 2006", "owner_id": 10637, "owner_name": "Carles Campsolinas Dresaire", "owner_url": "http://www.panoramio.com/user/10637"} + , + {"photo_id": 6205, "photo_title": "Valencia III", "photo_url": "http://www.panoramio.com/photo/6205", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6205.jpg", "longitude": -0.352764, "latitude": 39.456143, "width": 500, "height": 375, "upload_date": "28 December 2005", "owner_id": 414, "owner_name": "Sonia Villegas", "owner_url": "http://www.panoramio.com/user/414"} + , + {"photo_id": 5255997, "photo_title": "Az alkonyvigyázó", "photo_url": "http://www.panoramio.com/photo/5255997", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5255997.jpg", "longitude": 17.417107, "latitude": 46.942762, "width": 500, "height": 334, "upload_date": "12 October 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4214336, "photo_title": "船家 ship On Li river", "photo_url": "http://www.panoramio.com/photo/4214336", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4214336.jpg", "longitude": 110.342388, "latitude": 25.215347, "width": 500, "height": 313, "upload_date": "26 August 2007", "owner_id": 161470, "owner_name": "John Su", "owner_url": "http://www.panoramio.com/user/161470"} + , + {"photo_id": 611660, "photo_title": "Tikehau Ile aux oiseaux JC", "photo_url": "http://www.panoramio.com/photo/611660", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/611660.jpg", "longitude": -148.098224, "latitude": -14.974528, "width": 375, "height": 500, "upload_date": "29 January 2007", "owner_id": 131113, "owner_name": "Lair Jean Claude", "owner_url": "http://www.panoramio.com/user/131113"} + , + {"photo_id": 9822041, "photo_title": "Singapore", "photo_url": "http://www.panoramio.com/photo/9822041", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9822041.jpg", "longitude": 103.855219, "latitude": 1.288907, "width": 500, "height": 333, "upload_date": "01 May 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 126820, "photo_title": "Taj Mahal - colores", "photo_url": "http://www.panoramio.com/photo/126820", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/126820.jpg", "longitude": 78.042165, "latitude": 27.172871, "width": 500, "height": 385, "upload_date": "12 December 2006", "owner_id": 10456, "owner_name": "eulogio", "owner_url": "http://www.panoramio.com/user/10456"} + , + {"photo_id": 112504, "photo_title": "V-01009", "photo_url": "http://www.panoramio.com/photo/112504", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/112504.jpg", "longitude": 12.335946, "latitude": 45.438213, "width": 500, "height": 500, "upload_date": "11 December 2006", "owner_id": 17599, "owner_name": "Dmitry Andreev", "owner_url": "http://www.panoramio.com/user/17599"} + , + {"photo_id": 1898139, "photo_title": "Ein sehr menschenähnlicher Baum (http://www.redbubble.com/products/configure/1935618)", "photo_url": "http://www.panoramio.com/photo/1898139", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1898139.jpg", "longitude": 13.158177, "latitude": 52.456836, "width": 375, "height": 500, "upload_date": "23 April 2007", "owner_id": 311327, "owner_name": "www.einkauf.tk", "owner_url": "http://www.panoramio.com/user/311327"} + , + {"photo_id": 57813, "photo_title": "Hallstatt 1", "photo_url": "http://www.panoramio.com/photo/57813", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57813.jpg", "longitude": 13.652229, "latitude": 47.551274, "width": 500, "height": 333, "upload_date": "05 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 533476, "photo_title": "Comet McNaught 220107 02", "photo_url": "http://www.panoramio.com/photo/533476", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/533476.jpg", "longitude": 18.371286, "latitude": -33.964363, "width": 328, "height": 500, "upload_date": "22 January 2007", "owner_id": 2748, "owner_name": "WirelessMonkey", "owner_url": "http://www.panoramio.com/user/2748"} + , + {"photo_id": 507370, "photo_title": "The Silence", "photo_url": "http://www.panoramio.com/photo/507370", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507370.jpg", "longitude": 17.497959, "latitude": 47.781328, "width": 465, "height": 500, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 2422269, "photo_title": "Grand Trees", "photo_url": "http://www.panoramio.com/photo/2422269", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2422269.jpg", "longitude": -112.124019, "latitude": 36.062942, "width": 500, "height": 333, "upload_date": "27 May 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 2808348, "photo_title": "Blind River reflection", "photo_url": "http://www.panoramio.com/photo/2808348", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2808348.jpg", "longitude": -82.973557, "latitude": 46.193141, "width": 500, "height": 305, "upload_date": "18 June 2007", "owner_id": 555551, "owner_name": "Marilyn Whiteley", "owner_url": "http://www.panoramio.com/user/555551"} + , + {"photo_id": 2534183, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/2534183", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2534183.jpg", "longitude": -69.934587, "latitude": -37.382844, "width": 500, "height": 335, "upload_date": "02 June 2007", "owner_id": 527160, "owner_name": "legui83", "owner_url": "http://www.panoramio.com/user/527160"} + , + {"photo_id": 1008446, "photo_title": "budamist", "photo_url": "http://www.panoramio.com/photo/1008446", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1008446.jpg", "longitude": 19.078649, "latitude": 47.516737, "width": 500, "height": 341, "upload_date": "24 February 2007", "owner_id": 2659, "owner_name": "ozalph", "owner_url": "http://www.panoramio.com/user/2659"} + , + {"photo_id": 2935385, "photo_title": "temporale sul mare di riccione", "photo_url": "http://www.panoramio.com/photo/2935385", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2935385.jpg", "longitude": 12.644491, "latitude": 43.964836, "width": 333, "height": 500, "upload_date": "25 June 2007", "owner_id": 267377, "owner_name": "Valter Galvani", "owner_url": "http://www.panoramio.com/user/267377"} + , + {"photo_id": 7586398, "photo_title": "Al vuelo", "photo_url": "http://www.panoramio.com/photo/7586398", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7586398.jpg", "longitude": -73.152337, "latitude": -37.114747, "width": 375, "height": 500, "upload_date": "04 February 2008", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 7624042, "photo_title": "Fairyland 11", "photo_url": "http://www.panoramio.com/photo/7624042", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7624042.jpg", "longitude": 6.067650, "latitude": 52.224684, "width": 352, "height": 500, "upload_date": "06 February 2008", "owner_id": 523564, "owner_name": "Luud Riphagen", "owner_url": "http://www.panoramio.com/user/523564"} + , + {"photo_id": 1186930, "photo_title": "Вид с горы Демерджи - Demergi mountain view", "photo_url": "http://www.panoramio.com/photo/1186930", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1186930.jpg", "longitude": 34.413729, "latitude": 44.749903, "width": 500, "height": 338, "upload_date": "05 March 2007", "owner_id": 244932, "owner_name": "Andrey Jitkov", "owner_url": "http://www.panoramio.com/user/244932"} + , + {"photo_id": 565512, "photo_title": "The staircase star", "photo_url": "http://www.panoramio.com/photo/565512", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/565512.jpg", "longitude": 5.646222, "latitude": 46.261262, "width": 500, "height": 331, "upload_date": "25 January 2007", "owner_id": 121377, "owner_name": "Philippe Buffard", "owner_url": "http://www.panoramio.com/user/121377"} + , + {"photo_id": 3566705, "photo_title": "Pattaya - Big Buddha and seven headed Naga", "photo_url": "http://www.panoramio.com/photo/3566705", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3566705.jpg", "longitude": 100.868155, "latitude": 12.915027, "width": 500, "height": 375, "upload_date": "28 July 2007", "owner_id": 716245, "owner_name": "—Dragon-64— ✈", "owner_url": "http://www.panoramio.com/user/716245"} + , + {"photo_id": 50113, "photo_title": "New York Skyline Panorama", "photo_url": "http://www.panoramio.com/photo/50113", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/50113.jpg", "longitude": -73.997775, "latitude": 40.696581, "width": 500, "height": 55, "upload_date": "20 September 2006", "owner_id": 4957, "owner_name": "Ken Gibson", "owner_url": "http://www.panoramio.com/user/4957"} + , + {"photo_id": 74726, "photo_title": "nuptse 1 sunset", "photo_url": "http://www.panoramio.com/photo/74726", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/74726.jpg", "longitude": 86.865978, "latitude": 27.979243, "width": 500, "height": 334, "upload_date": "02 November 2006", "owner_id": 9812, "owner_name": "wsm earp", "owner_url": "http://www.panoramio.com/user/9812"} + , + {"photo_id": 10552400, "photo_title": "Second Prize \"Travel\" May Contest, HDR, May 2008", "photo_url": "http://www.panoramio.com/photo/10552400", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10552400.jpg", "longitude": -3.705075, "latitude": 47.787960, "width": 500, "height": 333, "upload_date": "24 May 2008", "owner_id": 979901, "owner_name": "DiggaTwigga", "owner_url": "http://www.panoramio.com/user/979901"} + , + {"photo_id": 1605229, "photo_title": "Holdfényáhítat", "photo_url": "http://www.panoramio.com/photo/1605229", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1605229.jpg", "longitude": 17.748413, "latitude": 47.555214, "width": 400, "height": 500, "upload_date": "02 April 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 34669, "photo_title": "Paisaje otoñal - La Rioja - España", "photo_url": "http://www.panoramio.com/photo/34669", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/34669.jpg", "longitude": -2.864685, "latitude": 42.328664, "width": 500, "height": 326, "upload_date": "26 July 2006", "owner_id": 5487, "owner_name": "Joaquín Ramirez", "owner_url": "http://www.panoramio.com/user/5487"} + , + {"photo_id": 4596134, "photo_title": "Le vieux Nice, mars 2007", "photo_url": "http://www.panoramio.com/photo/4596134", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4596134.jpg", "longitude": 7.277198, "latitude": 43.696704, "width": 368, "height": 500, "upload_date": "12 September 2007", "owner_id": 629243, "owner_name": "Olivier Faugeras", "owner_url": "http://www.panoramio.com/user/629243"} + , + {"photo_id": 10576294, "photo_title": "Plaza de Bolívar, Bogotá. 1st. prize Panoramio Contest, May 08.(((Jose Daniel)))", "photo_url": "http://www.panoramio.com/photo/10576294", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10576294.jpg", "longitude": -74.075629, "latitude": 4.597867, "width": 500, "height": 338, "upload_date": "25 May 2008", "owner_id": 1611883, "owner_name": "(((Jose Daniel)))", "owner_url": "http://www.panoramio.com/user/1611883"} + , + {"photo_id": 522151, "photo_title": "Jó volt ott", "photo_url": "http://www.panoramio.com/photo/522151", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/522151.jpg", "longitude": 17.611084, "latitude": 47.602401, "width": 500, "height": 354, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4247476, "photo_title": "Blick vom Zuckerhut", "photo_url": "http://www.panoramio.com/photo/4247476", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4247476.jpg", "longitude": -43.156872, "latitude": -22.948909, "width": 500, "height": 375, "upload_date": "28 August 2007", "owner_id": 496676, "owner_name": "Quasebart", "owner_url": "http://www.panoramio.com/user/496676"} + , + {"photo_id": 5472461, "photo_title": "Lapland", "photo_url": "http://www.panoramio.com/photo/5472461", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5472461.jpg", "longitude": 29.187653, "latitude": 66.189241, "width": 500, "height": 327, "upload_date": "22 October 2007", "owner_id": 912031, "owner_name": "Kimmo Lyytikäinen", "owner_url": "http://www.panoramio.com/user/912031"} + , + {"photo_id": 472802, "photo_title": "Golden Gate Bridge", "photo_url": "http://www.panoramio.com/photo/472802", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/472802.jpg", "longitude": -122.481366, "latitude": 37.827644, "width": 500, "height": 305, "upload_date": "18 January 2007", "owner_id": 100907, "owner_name": "Julia Wahl", "owner_url": "http://www.panoramio.com/user/100907"} + , + {"photo_id": 506118, "photo_title": "Overcast Pier, Hearst State Beach", "photo_url": "http://www.panoramio.com/photo/506118", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/506118.jpg", "longitude": -121.187868, "latitude": 35.643016, "width": 500, "height": 343, "upload_date": "20 January 2007", "owner_id": 107613, "owner_name": "Tom Grubbe", "owner_url": "http://www.panoramio.com/user/107613"} + , + {"photo_id": 1420841, "photo_title": "Poland ", "photo_url": "http://www.panoramio.com/photo/1420841", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1420841.jpg", "longitude": 20.630060, "latitude": 52.073123, "width": 500, "height": 377, "upload_date": "20 March 2007", "owner_id": 234038, "owner_name": "Jacek M.", "owner_url": "http://www.panoramio.com/user/234038"} + , + {"photo_id": 4088401, "photo_title": "Bird at Hogsback - 198812", "photo_url": "http://www.panoramio.com/photo/4088401", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4088401.jpg", "longitude": -124.339828, "latitude": 47.440860, "width": 500, "height": 355, "upload_date": "21 August 2007", "owner_id": 765658, "owner_name": "Larry Workman QIN", "owner_url": "http://www.panoramio.com/user/765658"} + , + {"photo_id": 8049018, "photo_title": "Eastern Sierra Sunset", "photo_url": "http://www.panoramio.com/photo/8049018", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8049018.jpg", "longitude": -119.220543, "latitude": 38.031698, "width": 500, "height": 333, "upload_date": "23 February 2008", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 103324, "photo_title": "Lua em São Paulo", "photo_url": "http://www.panoramio.com/photo/103324", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/103324.jpg", "longitude": -46.652606, "latitude": -23.545394, "width": 500, "height": 333, "upload_date": "10 December 2006", "owner_id": 14733, "owner_name": "Luiz Henrique Assunção", "owner_url": "http://www.panoramio.com/user/14733"} + , + {"photo_id": 5694626, "photo_title": "Lake of Varese - Moon and Venus before dawn", "photo_url": "http://www.panoramio.com/photo/5694626", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5694626.jpg", "longitude": 8.717716, "latitude": 45.839025, "width": 339, "height": 500, "upload_date": "02 November 2007", "owner_id": 933456, "owner_name": "© Marco De Candido", "owner_url": "http://www.panoramio.com/user/933456"} + , + {"photo_id": 1235876, "photo_title": "Logs on Lake Moraine", "photo_url": "http://www.panoramio.com/photo/1235876", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1235876.jpg", "longitude": -116.180420, "latitude": 51.326321, "width": 330, "height": 500, "upload_date": "09 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 6999770, "photo_title": "Mountain range of Pindos", "photo_url": "http://www.panoramio.com/photo/6999770", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6999770.jpg", "longitude": 21.553481, "latitude": 39.498345, "width": 500, "height": 333, "upload_date": "09 January 2008", "owner_id": 242446, "owner_name": "Ntinos Lagos", "owner_url": "http://www.panoramio.com/user/242446"} + , + {"photo_id": 405727, "photo_title": "awagatake", "photo_url": "http://www.panoramio.com/photo/405727", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405727.jpg", "longitude": 139.042454, "latitude": 37.563222, "width": 500, "height": 380, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1488363, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/1488363", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1488363.jpg", "longitude": 138.454514, "latitude": 38.308932, "width": 500, "height": 384, "upload_date": "25 March 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 841001, "photo_title": "Central Balkan", "photo_url": "http://www.panoramio.com/photo/841001", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/841001.jpg", "longitude": 24.963917, "latitude": 42.679306, "width": 500, "height": 357, "upload_date": "16 February 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 57406, "photo_title": "Burano 4", "photo_url": "http://www.panoramio.com/photo/57406", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57406.jpg", "longitude": 12.419465, "latitude": 45.484567, "width": 500, "height": 333, "upload_date": "04 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 1900891, "photo_title": "Peggys Cove, Nova Scotia La barca ...", "photo_url": "http://www.panoramio.com/photo/1900891", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1900891.jpg", "longitude": -63.918285, "latitude": 44.490873, "width": 375, "height": 500, "upload_date": "24 April 2007", "owner_id": 401966, "owner_name": "Syl de Canada", "owner_url": "http://www.panoramio.com/user/401966"} + , + {"photo_id": 2135721, "photo_title": " Coteau Landing (près de Valleyfield 3)", "photo_url": "http://www.panoramio.com/photo/2135721", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2135721.jpg", "longitude": -74.211960, "latitude": 45.253622, "width": 500, "height": 375, "upload_date": "08 May 2007", "owner_id": 401966, "owner_name": "Syl de Canada", "owner_url": "http://www.panoramio.com/user/401966"} + , + {"photo_id": 426155, "photo_title": "2007'01'14-Aucanada-0233", "photo_url": "http://www.panoramio.com/photo/426155", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/426155.jpg", "longitude": 3.169695, "latitude": 39.837627, "width": 500, "height": 335, "upload_date": "14 January 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 4868548, "photo_title": "Goodbye my dear", "photo_url": "http://www.panoramio.com/photo/4868548", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4868548.jpg", "longitude": 16.693211, "latitude": 43.183025, "width": 500, "height": 500, "upload_date": "24 September 2007", "owner_id": 989, "owner_name": "Mrgud", "owner_url": "http://www.panoramio.com/user/989"} + , + {"photo_id": 47069, "photo_title": "Laguna del Inca", "photo_url": "http://www.panoramio.com/photo/47069", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/47069.jpg", "longitude": -70.130786, "latitude": -32.834759, "width": 500, "height": 333, "upload_date": "11 September 2006", "owner_id": 6961, "owner_name": "Santiago Rios", "owner_url": "http://www.panoramio.com/user/6961"} + , + {"photo_id": 1781731, "photo_title": "The Subway", "photo_url": "http://www.panoramio.com/photo/1781731", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1781731.jpg", "longitude": -113.052578, "latitude": 37.310448, "width": 500, "height": 333, "upload_date": "15 April 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 2279, "photo_title": "Empire State Building", "photo_url": "http://www.panoramio.com/photo/2279", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2279.jpg", "longitude": -73.987073, "latitude": 40.744924, "width": 378, "height": 500, "upload_date": "08 October 2005", "owner_id": 220, "owner_name": "Jeff T. Alu", "owner_url": "http://www.panoramio.com/user/220"} + , + {"photo_id": 1277992, "photo_title": "Cologne-Köln - Dom im Hintergrund der Hohenzollernbrücke bei Nacht (by night)", "photo_url": "http://www.panoramio.com/photo/1277992", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1277992.jpg", "longitude": 6.967220, "latitude": 50.940826, "width": 500, "height": 375, "upload_date": "11 March 2007", "owner_id": 113678, "owner_name": "Canada-Fan", "owner_url": "http://www.panoramio.com/user/113678"} + , + {"photo_id": 207638, "photo_title": "Sunrise at Mont Saint Michel (1 of 2), august 2001", "photo_url": "http://www.panoramio.com/photo/207638", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/207638.jpg", "longitude": -1.509504, "latitude": 48.633547, "width": 331, "height": 500, "upload_date": "21 December 2006", "owner_id": 18925, "owner_name": "Marco Ferrari", "owner_url": "http://www.panoramio.com/user/18925"} + , + {"photo_id": 1452569, "photo_title": "Desierto de La Tatacoa (zona roja)", "photo_url": "http://www.panoramio.com/photo/1452569", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1452569.jpg", "longitude": -75.166667, "latitude": 3.333333, "width": 500, "height": 333, "upload_date": "22 March 2007", "owner_id": 5487, "owner_name": "Joaquín Ramirez", "owner_url": "http://www.panoramio.com/user/5487"} + , + {"photo_id": 3502890, "photo_title": "Monasteries in Meteora", "photo_url": "http://www.panoramio.com/photo/3502890", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3502890.jpg", "longitude": 21.627445, "latitude": 39.712601, "width": 480, "height": 500, "upload_date": "24 July 2007", "owner_id": 686703, "owner_name": "Thodoris Kliafas", "owner_url": "http://www.panoramio.com/user/686703"} + , + {"photo_id": 595505, "photo_title": "Burlington_Village_Square", "photo_url": "http://www.panoramio.com/photo/595505", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/595505.jpg", "longitude": -79.796180, "latitude": 43.326192, "width": 500, "height": 333, "upload_date": "27 January 2007", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 60984, "photo_title": "Ventisquero P. Moreno", "photo_url": "http://www.panoramio.com/photo/60984", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/60984.jpg", "longitude": -73.051872, "latitude": -50.488641, "width": 500, "height": 328, "upload_date": "13 October 2006", "owner_id": 8409, "owner_name": "Hector Fabian Garrido", "owner_url": "http://www.panoramio.com/user/8409"} + , + {"photo_id": 6654030, "photo_title": "Va por un incomprendido Vincent Willem van Gogh", "photo_url": "http://www.panoramio.com/photo/6654030", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6654030.jpg", "longitude": 4.776306, "latitude": 51.477962, "width": 500, "height": 375, "upload_date": "24 December 2007", "owner_id": 804986, "owner_name": "VERJAGA", "owner_url": "http://www.panoramio.com/user/804986"} + , + {"photo_id": 3018575, "photo_title": "Abrasado", "photo_url": "http://www.panoramio.com/photo/3018575", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3018575.jpg", "longitude": -73.279324, "latitude": -39.838002, "width": 500, "height": 375, "upload_date": "29 June 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 521039, "photo_title": "Fátyolos narancslátomás", "photo_url": "http://www.panoramio.com/photo/521039", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/521039.jpg", "longitude": 17.463455, "latitude": 47.850146, "width": 500, "height": 291, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 208239, "photo_title": "Nuvola danzante, Svizzera 2002", "photo_url": "http://www.panoramio.com/photo/208239", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/208239.jpg", "longitude": 7.321701, "latitude": 46.219515, "width": 334, "height": 500, "upload_date": "22 December 2006", "owner_id": 18925, "owner_name": "Marco Ferrari", "owner_url": "http://www.panoramio.com/user/18925"} + , + {"photo_id": 6443936, "photo_title": "Pajkos vizek", "photo_url": "http://www.panoramio.com/photo/6443936", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6443936.jpg", "longitude": 15.934124, "latitude": 47.915019, "width": 500, "height": 334, "upload_date": "12 December 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 7467941, "photo_title": "A day off for the soul...", "photo_url": "http://www.panoramio.com/photo/7467941", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7467941.jpg", "longitude": -75.126133, "latitude": 40.970106, "width": 500, "height": 375, "upload_date": "30 January 2008", "owner_id": 89499, "owner_name": "Michael Braxenthaler", "owner_url": "http://www.panoramio.com/user/89499"} + , + {"photo_id": 800436, "photo_title": "Eiffel Tower", "photo_url": "http://www.panoramio.com/photo/800436", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/800436.jpg", "longitude": 2.294576, "latitude": 48.858249, "width": 500, "height": 386, "upload_date": "13 February 2007", "owner_id": 165346, "owner_name": "Alan Knox", "owner_url": "http://www.panoramio.com/user/165346"} + , + {"photo_id": 479673, "photo_title": "Summit of Gogsøyra", "photo_url": "http://www.panoramio.com/photo/479673", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/479673.jpg", "longitude": 8.147736, "latitude": 62.642606, "width": 500, "height": 333, "upload_date": "18 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 5378753, "photo_title": "Alps", "photo_url": "http://www.panoramio.com/photo/5378753", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5378753.jpg", "longitude": 6.847916, "latitude": 45.913840, "width": 500, "height": 500, "upload_date": "17 October 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 382413, "photo_title": "kilimanjaro sunset", "photo_url": "http://www.panoramio.com/photo/382413", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/382413.jpg", "longitude": 37.382355, "latitude": -3.046583, "width": 500, "height": 375, "upload_date": "11 January 2007", "owner_id": 6105, "owner_name": "hackltom", "owner_url": "http://www.panoramio.com/user/6105"} + , + {"photo_id": 290784, "photo_title": "Tormenta Bahía de Pollensa", "photo_url": "http://www.panoramio.com/photo/290784", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/290784.jpg", "longitude": 3.116437, "latitude": 39.928440, "width": 500, "height": 285, "upload_date": "03 January 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 519904, "photo_title": "Dombok között felhők alatt", "photo_url": "http://www.panoramio.com/photo/519904", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/519904.jpg", "longitude": 18.680878, "latitude": 47.631851, "width": 500, "height": 314, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 181264, "photo_title": "deer cave", "photo_url": "http://www.panoramio.com/photo/181264", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/181264.jpg", "longitude": 114.824553, "latitude": 4.024121, "width": 428, "height": 500, "upload_date": "18 December 2006", "owner_id": 9198, "owner_name": "Caveranger", "owner_url": "http://www.panoramio.com/user/9198"} + , + {"photo_id": 323533, "photo_title": "Elevador e Mercado Modelo Ssa Ba Br", "photo_url": "http://www.panoramio.com/photo/323533", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/323533.jpg", "longitude": -38.512552, "latitude": -12.974261, "width": 500, "height": 333, "upload_date": "06 January 2007", "owner_id": 63291, "owner_name": "Gastón Dapik", "owner_url": "http://www.panoramio.com/user/63291"} + , + {"photo_id": 512513, "photo_title": "Égi tűz", "photo_url": "http://www.panoramio.com/photo/512513", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/512513.jpg", "longitude": 17.481308, "latitude": 47.796148, "width": 500, "height": 334, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 10237287, "photo_title": "Kentriki's Woods, by Kostas Andreopoulos", "photo_url": "http://www.panoramio.com/photo/10237287", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10237287.jpg", "longitude": 21.916909, "latitude": 38.569223, "width": 500, "height": 375, "upload_date": "14 May 2008", "owner_id": 1690483, "owner_name": "k.andre", "owner_url": "http://www.panoramio.com/user/1690483"} + , + {"photo_id": 52847, "photo_title": "153 The Forth Bridge (Railway) over the Firth of Forth", "photo_url": "http://www.panoramio.com/photo/52847", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/52847.jpg", "longitude": -3.392672, "latitude": 56.007656, "width": 375, "height": 500, "upload_date": "26 September 2006", "owner_id": 7633, "owner_name": "Daniel Meyer", "owner_url": "http://www.panoramio.com/user/7633"} + , + {"photo_id": 11105192, "photo_title": "A bird is free", "photo_url": "http://www.panoramio.com/photo/11105192", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11105192.jpg", "longitude": -6.953058, "latitude": 52.773901, "width": 375, "height": 500, "upload_date": "11 June 2008", "owner_id": 1867220, "owner_name": "Aubrey :)", "owner_url": "http://www.panoramio.com/user/1867220"} + , + {"photo_id": 196039, "photo_title": "espigón", "photo_url": "http://www.panoramio.com/photo/196039", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/196039.jpg", "longitude": -3.801688, "latitude": 43.461606, "width": 332, "height": 500, "upload_date": "20 December 2006", "owner_id": 38804, "owner_name": "www.oscarsanchez.net", "owner_url": "http://www.panoramio.com/user/38804"} + , + {"photo_id": 70865, "photo_title": "Cataratas de Iguazu", "photo_url": "http://www.panoramio.com/photo/70865", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/70865.jpg", "longitude": -54.440818, "latitude": -25.688447, "width": 374, "height": 500, "upload_date": "26 October 2006", "owner_id": 9080, "owner_name": "Marco Teodonio", "owner_url": "http://www.panoramio.com/user/9080"} + , + {"photo_id": 6188760, "photo_title": "Vihar elött", "photo_url": "http://www.panoramio.com/photo/6188760", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6188760.jpg", "longitude": 17.462082, "latitude": 47.843579, "width": 500, "height": 330, "upload_date": "28 November 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 286439, "photo_title": "Rusted Car Along Route 66", "photo_url": "http://www.panoramio.com/photo/286439", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/286439.jpg", "longitude": -109.804788, "latitude": 35.050024, "width": 500, "height": 333, "upload_date": "03 January 2007", "owner_id": 45308, "owner_name": "Mike Cavaroc", "owner_url": "http://www.panoramio.com/user/45308"} + , + {"photo_id": 1283563, "photo_title": "Kalalau beach", "photo_url": "http://www.panoramio.com/photo/1283563", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1283563.jpg", "longitude": -159.667397, "latitude": 22.164196, "width": 330, "height": 500, "upload_date": "12 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 1336919, "photo_title": "Neuschwanstein", "photo_url": "http://www.panoramio.com/photo/1336919", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1336919.jpg", "longitude": 10.750465, "latitude": 47.553128, "width": 500, "height": 371, "upload_date": "15 March 2007", "owner_id": 123698, "owner_name": "© Kojak", "owner_url": "http://www.panoramio.com/user/123698"} + , + {"photo_id": 1343841, "photo_title": "Turning Torsoe in the fog", "photo_url": "http://www.panoramio.com/photo/1343841", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1343841.jpg", "longitude": 12.968073, "latitude": 55.613165, "width": 332, "height": 500, "upload_date": "16 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 4976484, "photo_title": "Le Bout du Monde avant l'orage", "photo_url": "http://www.panoramio.com/photo/4976484", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4976484.jpg", "longitude": 6.867528, "latitude": 46.108618, "width": 500, "height": 375, "upload_date": "29 September 2007", "owner_id": 359127, "owner_name": "wx", "owner_url": "http://www.panoramio.com/user/359127"} + , + {"photo_id": 1195113, "photo_title": "Берег Сетуни 2 - Setun riverbank 2", "photo_url": "http://www.panoramio.com/photo/1195113", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1195113.jpg", "longitude": 37.486424, "latitude": 55.719367, "width": 332, "height": 500, "upload_date": "06 March 2007", "owner_id": 244932, "owner_name": "Andrey Jitkov", "owner_url": "http://www.panoramio.com/user/244932"} + , + {"photo_id": 1549176, "photo_title": "Erdőtűz", "photo_url": "http://www.panoramio.com/photo/1549176", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1549176.jpg", "longitude": 17.767639, "latitude": 47.582084, "width": 500, "height": 268, "upload_date": "29 March 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 2127008, "photo_title": "Thunderstorm over Thunderbolt", "photo_url": "http://www.panoramio.com/photo/2127008", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2127008.jpg", "longitude": -111.586761, "latitude": 41.605303, "width": 500, "height": 329, "upload_date": "08 May 2007", "owner_id": 395804, "owner_name": "Ralph Maughan", "owner_url": "http://www.panoramio.com/user/395804"} + , + {"photo_id": 2421940, "photo_title": "Twisted Ideas", "photo_url": "http://www.panoramio.com/photo/2421940", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2421940.jpg", "longitude": -112.105286, "latitude": 36.059681, "width": 500, "height": 333, "upload_date": "27 May 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 8197305, "photo_title": "Mar Fantasma", "photo_url": "http://www.panoramio.com/photo/8197305", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8197305.jpg", "longitude": -71.699395, "latitude": -33.407478, "width": 500, "height": 346, "upload_date": "29 February 2008", "owner_id": 730217, "owner_name": "C.e.C.v", "owner_url": "http://www.panoramio.com/user/730217"} + , + {"photo_id": 6126299, "photo_title": "Richmond Squirrel", "photo_url": "http://www.panoramio.com/photo/6126299", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6126299.jpg", "longitude": -0.277609, "latitude": 51.448003, "width": 500, "height": 500, "upload_date": "25 November 2007", "owner_id": 1130880, "owner_name": "marksimms", "owner_url": "http://www.panoramio.com/user/1130880"} + , + {"photo_id": 55016, "photo_title": "Jacaré-do-pantanal. Vazante do Capivari (Caiman crocodilus yacare)", "photo_url": "http://www.panoramio.com/photo/55016", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/55016.jpg", "longitude": -56.258326, "latitude": -18.771278, "width": 500, "height": 333, "upload_date": "30 September 2006", "owner_id": 7562, "owner_name": "Marcelo E. Salgado", "owner_url": "http://www.panoramio.com/user/7562"} + , + {"photo_id": 1640188, "photo_title": "Diagonal", "photo_url": "http://www.panoramio.com/photo/1640188", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1640188.jpg", "longitude": 20.428219, "latitude": 48.953621, "width": 408, "height": 500, "upload_date": "05 April 2007", "owner_id": 346103, "owner_name": "lacitot", "owner_url": "http://www.panoramio.com/user/346103"} + , + {"photo_id": 2935837, "photo_title": "Aitzgorri. Atardecer mirando al sureste", "photo_url": "http://www.panoramio.com/photo/2935837", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2935837.jpg", "longitude": -2.324939, "latitude": 42.951271, "width": 500, "height": 323, "upload_date": "25 June 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 355622, "photo_title": "newfoundland iceberg", "photo_url": "http://www.panoramio.com/photo/355622", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/355622.jpg", "longitude": -54.733200, "latitude": 49.710939, "width": 500, "height": 334, "upload_date": "09 January 2007", "owner_id": 69671, "owner_name": "illusandpics.com", "owner_url": "http://www.panoramio.com/user/69671"} + , + {"photo_id": 202578, "photo_title": "Abant Lake (1), Bolu", "photo_url": "http://www.panoramio.com/photo/202578", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/202578.jpg", "longitude": 31.286316, "latitude": 40.612128, "width": 500, "height": 317, "upload_date": "21 December 2006", "owner_id": 2351, "owner_name": "Serdar Bilecen", "owner_url": "http://www.panoramio.com/user/2351"} + , + {"photo_id": 9653590, "photo_title": "Secret Gate, Kentriki - [ PANORAMIO APRIL 08 WINNERS]...by Fotinos", "photo_url": "http://www.panoramio.com/photo/9653590", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9653590.jpg", "longitude": 21.914872, "latitude": 38.571189, "width": 375, "height": 500, "upload_date": "24 April 2008", "owner_id": 1640258, "owner_name": "fotinos andreopoulos", "owner_url": "http://www.panoramio.com/user/1640258"} + , + {"photo_id": 2371950, "photo_title": "Dietro l'Isola dei Conigli", "photo_url": "http://www.panoramio.com/photo/2371950", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2371950.jpg", "longitude": 12.552137, "latitude": 35.514553, "width": 500, "height": 375, "upload_date": "24 May 2007", "owner_id": 476623, "owner_name": "Giulio Botticelli", "owner_url": "http://www.panoramio.com/user/476623"} + , + {"photo_id": 1340803, "photo_title": "Huge oak in monochrome", "photo_url": "http://www.panoramio.com/photo/1340803", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1340803.jpg", "longitude": 11.187515, "latitude": 59.548763, "width": 500, "height": 493, "upload_date": "15 March 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 520878, "photo_title": "Farewell", "photo_url": "http://www.panoramio.com/photo/520878", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/520878.jpg", "longitude": 17.466202, "latitude": 47.870186, "width": 415, "height": 500, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4738479, "photo_title": "\"Sovány szárcsavágta\"", "photo_url": "http://www.panoramio.com/photo/4738479", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4738479.jpg", "longitude": 17.571602, "latitude": 47.633354, "width": 500, "height": 347, "upload_date": "18 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 2395577, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/2395577", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2395577.jpg", "longitude": -79.844792, "latitude": 43.300310, "width": 500, "height": 333, "upload_date": "25 May 2007", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 2470351, "photo_title": "Swans", "photo_url": "http://www.panoramio.com/photo/2470351", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2470351.jpg", "longitude": 23.713217, "latitude": 56.965614, "width": 500, "height": 332, "upload_date": "30 May 2007", "owner_id": 116556, "owner_name": "Pavels Dunaicevs", "owner_url": "http://www.panoramio.com/user/116556"} + , + {"photo_id": 6348257, "photo_title": "Sunset-pallatic", "photo_url": "http://www.panoramio.com/photo/6348257", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6348257.jpg", "longitude": 21.060791, "latitude": 42.004790, "width": 500, "height": 424, "upload_date": "07 December 2007", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 10248178, "photo_title": "LA LUZ DE LA MAÑANA", "photo_url": "http://www.panoramio.com/photo/10248178", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10248178.jpg", "longitude": -2.554321, "latitude": 43.209805, "width": 465, "height": 500, "upload_date": "15 May 2008", "owner_id": 1487989, "owner_name": "mesias", "owner_url": "http://www.panoramio.com/user/1487989"} + , + {"photo_id": 1177785, "photo_title": "Angkor Tom Dawn", "photo_url": "http://www.panoramio.com/photo/1177785", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1177785.jpg", "longitude": 103.858910, "latitude": 13.441383, "width": 401, "height": 500, "upload_date": "05 March 2007", "owner_id": 243825, "owner_name": "DarrinJ", "owner_url": "http://www.panoramio.com/user/243825"} + , + {"photo_id": 4785924, "photo_title": "Antelope Canyon", "photo_url": "http://www.panoramio.com/photo/4785924", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4785924.jpg", "longitude": -111.369422, "latitude": 36.853678, "width": 500, "height": 335, "upload_date": "20 September 2007", "owner_id": 464343, "owner_name": "yves floret", "owner_url": "http://www.panoramio.com/user/464343"} + , + {"photo_id": 459592, "photo_title": "nojiriko", "photo_url": "http://www.panoramio.com/photo/459592", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459592.jpg", "longitude": 138.140202, "latitude": 36.857510, "width": 500, "height": 383, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 377931, "photo_title": "Baobab Avenue after sunset", "photo_url": "http://www.panoramio.com/photo/377931", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/377931.jpg", "longitude": 44.418486, "latitude": -20.250874, "width": 500, "height": 333, "upload_date": "11 January 2007", "owner_id": 70471, "owner_name": "David Thyberg", "owner_url": "http://www.panoramio.com/user/70471"} + , + {"photo_id": 170330, "photo_title": "Petit Palais - Looking Up", "photo_url": "http://www.panoramio.com/photo/170330", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/170330.jpg", "longitude": 2.315115, "latitude": 48.866011, "width": 500, "height": 355, "upload_date": "17 December 2006", "owner_id": 5684, "owner_name": "Brent Townshend", "owner_url": "http://www.panoramio.com/user/5684"} + , + {"photo_id": 5628541, "photo_title": "Pittsburgh", "photo_url": "http://www.panoramio.com/photo/5628541", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5628541.jpg", "longitude": -80.018985, "latitude": 40.438406, "width": 500, "height": 325, "upload_date": "30 October 2007", "owner_id": 31761, "owner_name": "Buck Cash", "owner_url": "http://www.panoramio.com/user/31761"} + , + {"photo_id": 51101, "photo_title": "Morgenstimmung zwischen Bru und Bordeyri ...", "photo_url": "http://www.panoramio.com/photo/51101", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/51101.jpg", "longitude": -21.099930, "latitude": 65.205068, "width": 500, "height": 272, "upload_date": "23 September 2006", "owner_id": 7434, "owner_name": "baldinger reisen ag, waedenswil/switzerland", "owner_url": "http://www.panoramio.com/user/7434"} + , + {"photo_id": 4352968, "photo_title": "Coucher du soleil sur le lac du Môle", "photo_url": "http://www.panoramio.com/photo/4352968", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4352968.jpg", "longitude": 6.426079, "latitude": 46.137084, "width": 500, "height": 374, "upload_date": "03 September 2007", "owner_id": 359127, "owner_name": "wx", "owner_url": "http://www.panoramio.com/user/359127"} + , + {"photo_id": 2345674, "photo_title": "Álomvölgy", "photo_url": "http://www.panoramio.com/photo/2345674", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2345674.jpg", "longitude": 17.791328, "latitude": 47.343243, "width": 500, "height": 334, "upload_date": "22 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3521484, "photo_title": "Ki korán kel...", "photo_url": "http://www.panoramio.com/photo/3521484", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3521484.jpg", "longitude": 17.514782, "latitude": 47.744980, "width": 500, "height": 334, "upload_date": "25 July 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 8868820, "photo_title": "Burime ne malin Shar-Winner March contest -2008 \"Scenery\" Categorie", "photo_url": "http://www.panoramio.com/photo/8868820", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8868820.jpg", "longitude": 20.884666, "latitude": 42.060318, "width": 375, "height": 500, "upload_date": "26 March 2008", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 206560, "photo_title": "Sumela Monastery", "photo_url": "http://www.panoramio.com/photo/206560", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/206560.jpg", "longitude": 39.608116, "latitude": 40.770012, "width": 500, "height": 375, "upload_date": "21 December 2006", "owner_id": 2351, "owner_name": "Serdar Bilecen", "owner_url": "http://www.panoramio.com/user/2351"} + , + {"photo_id": 1488354, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/1488354", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1488354.jpg", "longitude": 138.213072, "latitude": 37.829921, "width": 500, "height": 336, "upload_date": "25 March 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 3334377, "photo_title": "ROSENGARTEN", "photo_url": "http://www.panoramio.com/photo/3334377", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3334377.jpg", "longitude": 11.591349, "latitude": 46.411603, "width": 500, "height": 375, "upload_date": "15 July 2007", "owner_id": 584241, "owner_name": "irene.italy", "owner_url": "http://www.panoramio.com/user/584241"} + , + {"photo_id": 12668091, "photo_title": "lago di Fedaia - 2008 August NPC subject Reflecting on reflection", "photo_url": "http://www.panoramio.com/photo/12668091", "photo_file_url": "http://static4.bareka.com/photos/medium/12668091.jpg", "longitude": 11.864547, "latitude": 46.460164, "width": 385, "height": 500, "upload_date": "31 July 2008", "owner_id": 6033, "owner_name": "► Marco Vanzo", "owner_url": "http://www.panoramio.com/user/6033"} + , + {"photo_id": 11177556, "photo_title": "Early morning ... :)", "photo_url": "http://www.panoramio.com/photo/11177556", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11177556.jpg", "longitude": 168.307543, "latitude": -46.578215, "width": 500, "height": 340, "upload_date": "13 June 2008", "owner_id": 1256771, "owner_name": "Zsuzsanna W", "owner_url": "http://www.panoramio.com/user/1256771"} + , + {"photo_id": 67333, "photo_title": "Laguna Colorada", "photo_url": "http://www.panoramio.com/photo/67333", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/67333.jpg", "longitude": -67.798176, "latitude": -22.217285, "width": 375, "height": 500, "upload_date": "20 October 2006", "owner_id": 9080, "owner_name": "Marco Teodonio", "owner_url": "http://www.panoramio.com/user/9080"} + , + {"photo_id": 2850309, "photo_title": "Single tree...", "photo_url": "http://www.panoramio.com/photo/2850309", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2850309.jpg", "longitude": 33.571987, "latitude": 27.130876, "width": 500, "height": 375, "upload_date": "20 June 2007", "owner_id": 399963, "owner_name": "Victor Galanin", "owner_url": "http://www.panoramio.com/user/399963"} + , + {"photo_id": 1286406, "photo_title": "Creation", "photo_url": "http://www.panoramio.com/photo/1286406", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1286406.jpg", "longitude": 35.109558, "latitude": -1.460337, "width": 500, "height": 456, "upload_date": "12 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 4136208, "photo_title": "Mesél az erdő", "photo_url": "http://www.panoramio.com/photo/4136208", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4136208.jpg", "longitude": 18.062897, "latitude": 47.274105, "width": 500, "height": 334, "upload_date": "23 August 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 8476696, "photo_title": "Coucher de soleil sur Silhouette, Seychelles. Panoramio and ATP first CONTEST, March 2008, category Travel : awarded \"Runner Up\" (second Prize). Many thanks to all voters. #434", "photo_url": "http://www.panoramio.com/photo/8476696", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8476696.jpg", "longitude": 55.493660, "latitude": -4.563249, "width": 500, "height": 339, "upload_date": "12 March 2008", "owner_id": 666755, "owner_name": "Armagnac", "owner_url": "http://www.panoramio.com/user/666755"} + , + {"photo_id": 6189344, "photo_title": "Retenue Courchevel", "photo_url": "http://www.panoramio.com/photo/6189344", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6189344.jpg", "longitude": 6.654494, "latitude": 45.385908, "width": 500, "height": 335, "upload_date": "28 November 2007", "owner_id": 464343, "owner_name": "yves floret", "owner_url": "http://www.panoramio.com/user/464343"} + , + {"photo_id": 6934835, "photo_title": "I feel shivers down my spine... (Coucher de soleil hivernal au cimetière du Père Lachaise)", "photo_url": "http://www.panoramio.com/photo/6934835", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6934835.jpg", "longitude": 2.389634, "latitude": 48.862132, "width": 500, "height": 384, "upload_date": "06 January 2008", "owner_id": 629243, "owner_name": "Olivier Faugeras", "owner_url": "http://www.panoramio.com/user/629243"} + , + {"photo_id": 4214329, "photo_title": "Sunrise of Huangshan", "photo_url": "http://www.panoramio.com/photo/4214329", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4214329.jpg", "longitude": 118.282928, "latitude": 30.139189, "width": 500, "height": 313, "upload_date": "26 August 2007", "owner_id": 161470, "owner_name": "John Su", "owner_url": "http://www.panoramio.com/user/161470"} + , + {"photo_id": 8846650, "photo_title": "Vette Tempestose - Winner of Panoramio Contest of March 2008 - Travel category", "photo_url": "http://www.panoramio.com/photo/8846650", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8846650.jpg", "longitude": 8.456469, "latitude": 45.886752, "width": 500, "height": 215, "upload_date": "25 March 2008", "owner_id": 634000, "owner_name": "© Massimo De Candido", "owner_url": "http://www.panoramio.com/user/634000"} + , + {"photo_id": 945986, "photo_title": "Xerta taronja", "photo_url": "http://www.panoramio.com/photo/945986", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/945986.jpg", "longitude": 0.483055, "latitude": 40.909102, "width": 500, "height": 377, "upload_date": "21 February 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 5108615, "photo_title": "El Vado Lake, 1", "photo_url": "http://www.panoramio.com/photo/5108615", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5108615.jpg", "longitude": -106.755394, "latitude": 36.594858, "width": 500, "height": 490, "upload_date": "05 October 2007", "owner_id": 213866, "owner_name": "Nicolas Mertens", "owner_url": "http://www.panoramio.com/user/213866"} + , + {"photo_id": 6095512, "photo_title": "before the snow came - Thunersee - in bad weather", "photo_url": "http://www.panoramio.com/photo/6095512", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6095512.jpg", "longitude": 7.641592, "latitude": 46.744566, "width": 500, "height": 374, "upload_date": "24 November 2007", "owner_id": 635422, "owner_name": "♫ Swissmay", "owner_url": "http://www.panoramio.com/user/635422"} + , + {"photo_id": 1541286, "photo_title": "Wave3", "photo_url": "http://www.panoramio.com/photo/1541286", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1541286.jpg", "longitude": -112.007471, "latitude": 36.994755, "width": 333, "height": 500, "upload_date": "29 March 2007", "owner_id": 40260, "owner_name": "Don Albonico", "owner_url": "http://www.panoramio.com/user/40260"} + , + {"photo_id": 11309226, "photo_title": "Sunset on Portsea", "photo_url": "http://www.panoramio.com/photo/11309226", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11309226.jpg", "longitude": 144.695692, "latitude": -38.330766, "width": 500, "height": 357, "upload_date": "18 June 2008", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 76734, "photo_title": "Buitre leonado", "photo_url": "http://www.panoramio.com/photo/76734", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/76734.jpg", "longitude": -5.662347, "latitude": 36.522413, "width": 500, "height": 375, "upload_date": "05 November 2006", "owner_id": 473, "owner_name": "Juanlu", "owner_url": "http://www.panoramio.com/user/473"} + , + {"photo_id": 196037, "photo_title": "camello", "photo_url": "http://www.panoramio.com/photo/196037", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/196037.jpg", "longitude": -3.776196, "latitude": 43.470686, "width": 500, "height": 332, "upload_date": "20 December 2006", "owner_id": 38804, "owner_name": "www.oscarsanchez.net", "owner_url": "http://www.panoramio.com/user/38804"} + , + {"photo_id": 1338852, "photo_title": "Stairs down to Praia dé Paraiso", "photo_url": "http://www.panoramio.com/photo/1338852", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1338852.jpg", "longitude": -8.475040, "latitude": 37.096924, "width": 332, "height": 500, "upload_date": "15 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 1269734, "photo_title": "Frosty fishermans boat, Nesseby, Finnmark, Norway", "photo_url": "http://www.panoramio.com/photo/1269734", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1269734.jpg", "longitude": 28.851471, "latitude": 70.144796, "width": 500, "height": 323, "upload_date": "11 March 2007", "owner_id": 66734, "owner_name": "Svein Solhaug", "owner_url": "http://www.panoramio.com/user/66734"} + , + {"photo_id": 1075687, "photo_title": "Lake Como sunset", "photo_url": "http://www.panoramio.com/photo/1075687", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1075687.jpg", "longitude": 9.285164, "latitude": 46.009839, "width": 500, "height": 332, "upload_date": "28 February 2007", "owner_id": 107359, "owner_name": "Ron Cooper", "owner_url": "http://www.panoramio.com/user/107359"} + , + {"photo_id": 58363, "photo_title": "Sonnenuntergang bei Bardolino", "photo_url": "http://www.panoramio.com/photo/58363", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58363.jpg", "longitude": 10.714073, "latitude": 45.556372, "width": 500, "height": 333, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 890788, "photo_title": "Kaplička", "photo_url": "http://www.panoramio.com/photo/890788", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/890788.jpg", "longitude": 18.222713, "latitude": 49.491950, "width": 500, "height": 333, "upload_date": "19 February 2007", "owner_id": 187280, "owner_name": "Radek Čampa", "owner_url": "http://www.panoramio.com/user/187280"} + , + {"photo_id": 8730610, "photo_title": "Antelope Canyon", "photo_url": "http://www.panoramio.com/photo/8730610", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8730610.jpg", "longitude": -111.415787, "latitude": 36.918058, "width": 375, "height": 500, "upload_date": "22 March 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 3008013, "photo_title": "Infrared Mood of Peyto Lake", "photo_url": "http://www.panoramio.com/photo/3008013", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3008013.jpg", "longitude": -116.509409, "latitude": 51.717989, "width": 500, "height": 334, "upload_date": "29 June 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 565018, "photo_title": "Another one sunset in dubulti", "photo_url": "http://www.panoramio.com/photo/565018", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/565018.jpg", "longitude": 23.765488, "latitude": 56.971626, "width": 500, "height": 333, "upload_date": "25 January 2007", "owner_id": 116556, "owner_name": "Pavels Dunaicevs", "owner_url": "http://www.panoramio.com/user/116556"} + , + {"photo_id": 2217257, "photo_title": "Csermely", "photo_url": "http://www.panoramio.com/photo/2217257", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2217257.jpg", "longitude": 17.986851, "latitude": 47.273755, "width": 500, "height": 334, "upload_date": "14 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3008041, "photo_title": "Lake Louise", "photo_url": "http://www.panoramio.com/photo/3008041", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3008041.jpg", "longitude": -116.219387, "latitude": 51.417409, "width": 500, "height": 335, "upload_date": "29 June 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 636724, "photo_title": "Bora Bora JC", "photo_url": "http://www.panoramio.com/photo/636724", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/636724.jpg", "longitude": -151.714239, "latitude": -16.475926, "width": 500, "height": 375, "upload_date": "31 January 2007", "owner_id": 131113, "owner_name": "Lair Jean Claude", "owner_url": "http://www.panoramio.com/user/131113"} + , + {"photo_id": 511806, "photo_title": "Ezüsterdő", "photo_url": "http://www.panoramio.com/photo/511806", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/511806.jpg", "longitude": 17.748070, "latitude": 47.273056, "width": 366, "height": 500, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 727360, "photo_title": "Hot croissant for breakfast - Crescent sunrise", "photo_url": "http://www.panoramio.com/photo/727360", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/727360.jpg", "longitude": 19.053833, "latitude": 47.605512, "width": 500, "height": 311, "upload_date": "07 February 2007", "owner_id": 57869, "owner_name": "NAGY Albert", "owner_url": "http://www.panoramio.com/user/57869"} + , + {"photo_id": 5148235, "photo_title": "shinagawa", "photo_url": "http://www.panoramio.com/photo/5148235", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5148235.jpg", "longitude": 139.741459, "latitude": 35.627460, "width": 500, "height": 500, "upload_date": "07 October 2007", "owner_id": 128403, "owner_name": "mechanics", "owner_url": "http://www.panoramio.com/user/128403"} + , + {"photo_id": 2082127, "photo_title": "Rejtelmes Szigetköz", "photo_url": "http://www.panoramio.com/photo/2082127", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2082127.jpg", "longitude": 17.508516, "latitude": 47.850088, "width": 500, "height": 316, "upload_date": "05 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1589607, "photo_title": "Baalbek - Temple of Bacchus - Giant Columns", "photo_url": "http://www.panoramio.com/photo/1589607", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1589607.jpg", "longitude": 36.204404, "latitude": 34.006228, "width": 500, "height": 283, "upload_date": "01 April 2007", "owner_id": 73104, "owner_name": "zerega", "owner_url": "http://www.panoramio.com/user/73104"} + , + {"photo_id": 410991, "photo_title": "Burj al Arab", "photo_url": "http://www.panoramio.com/photo/410991", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/410991.jpg", "longitude": 55.187352, "latitude": 25.139282, "width": 500, "height": 342, "upload_date": "13 January 2007", "owner_id": 82662, "owner_name": "Sven Goelles", "owner_url": "http://www.panoramio.com/user/82662"} + , + {"photo_id": 6012, "photo_title": "Rastoke", "photo_url": "http://www.panoramio.com/photo/6012", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6012.jpg", "longitude": 15.584493, "latitude": 45.119144, "width": 343, "height": 500, "upload_date": "18 December 2005", "owner_id": 989, "owner_name": "Mrgud", "owner_url": "http://www.panoramio.com/user/989"} + , + {"photo_id": 4989314, "photo_title": "Range of Light", "photo_url": "http://www.panoramio.com/photo/4989314", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4989314.jpg", "longitude": -118.597283, "latitude": 37.234360, "width": 500, "height": 357, "upload_date": "29 September 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 2115987, "photo_title": "La Croix de Brume", "photo_url": "http://www.panoramio.com/photo/2115987", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2115987.jpg", "longitude": 0.341520, "latitude": 44.859519, "width": 409, "height": 500, "upload_date": "07 May 2007", "owner_id": 372189, "owner_name": "Phil©", "owner_url": "http://www.panoramio.com/user/372189"} + , + {"photo_id": 229544, "photo_title": "VRT RTBf Toren", "photo_url": "http://www.panoramio.com/photo/229544", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/229544.jpg", "longitude": 4.401634, "latitude": 50.852972, "width": 333, "height": 500, "upload_date": "24 December 2006", "owner_id": 7464, "owner_name": "Pieter", "owner_url": "http://www.panoramio.com/user/7464"} + , + {"photo_id": 58283, "photo_title": "Weg", "photo_url": "http://www.panoramio.com/photo/58283", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58283.jpg", "longitude": 12.898464, "latitude": 48.059496, "width": 500, "height": 333, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 112110, "photo_title": "Toronto_CN-Tower", "photo_url": "http://www.panoramio.com/photo/112110", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/112110.jpg", "longitude": -79.386907, "latitude": 43.641805, "width": 500, "height": 375, "upload_date": "11 December 2006", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 4446966, "photo_title": "Álmodó folyó", "photo_url": "http://www.panoramio.com/photo/4446966", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4446966.jpg", "longitude": 17.454357, "latitude": 47.881470, "width": 500, "height": 375, "upload_date": "06 September 2007", "owner_id": 182660, "owner_name": "Bálint Tünde", "owner_url": "http://www.panoramio.com/user/182660"} + , + {"photo_id": 91966, "photo_title": "Bled (Slovenia)", "photo_url": "http://www.panoramio.com/photo/91966", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/91966.jpg", "longitude": 14.087219, "latitude": 46.358184, "width": 500, "height": 375, "upload_date": "04 December 2006", "owner_id": 11403, "owner_name": "Arnáiz", "owner_url": "http://www.panoramio.com/user/11403"} + , + {"photo_id": 6013503, "photo_title": "Kapelle bei Böhmenkirch", "photo_url": "http://www.panoramio.com/photo/6013503", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6013503.jpg", "longitude": 9.943142, "latitude": 48.694756, "width": 500, "height": 375, "upload_date": "19 November 2007", "owner_id": 424589, "owner_name": "PeSchn", "owner_url": "http://www.panoramio.com/user/424589"} + , + {"photo_id": 1781593, "photo_title": "Medusa's Sandbox", "photo_url": "http://www.panoramio.com/photo/1781593", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1781593.jpg", "longitude": -112.006624, "latitude": 36.995852, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 704119, "photo_title": "Izzó Adria", "photo_url": "http://www.panoramio.com/photo/704119", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/704119.jpg", "longitude": 17.056789, "latitude": 43.272206, "width": 500, "height": 285, "upload_date": "05 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 85624, "photo_title": "Isla del Fraile Águilas", "photo_url": "http://www.panoramio.com/photo/85624", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/85624.jpg", "longitude": -0.722609, "latitude": 37.924329, "width": 500, "height": 298, "upload_date": "24 November 2006", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 52350, "photo_title": "Cataratas del Iguazú. Brasil", "photo_url": "http://www.panoramio.com/photo/52350", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/52350.jpg", "longitude": -54.439831, "latitude": -25.687422, "width": 500, "height": 333, "upload_date": "25 September 2006", "owner_id": 6961, "owner_name": "Santiago Rios", "owner_url": "http://www.panoramio.com/user/6961"} + , + {"photo_id": 36482, "photo_title": "Rovinj Harbour", "photo_url": "http://www.panoramio.com/photo/36482", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36482.jpg", "longitude": 13.632714, "latitude": 45.083938, "width": 500, "height": 332, "upload_date": "02 August 2006", "owner_id": 5703, "owner_name": "dancer", "owner_url": "http://www.panoramio.com/user/5703"} + , + {"photo_id": 7251846, "photo_title": "Azért a víz az úr", "photo_url": "http://www.panoramio.com/photo/7251846", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7251846.jpg", "longitude": 17.629623, "latitude": 47.687334, "width": 500, "height": 329, "upload_date": "20 January 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1551756, "photo_title": "Templestowe", "photo_url": "http://www.panoramio.com/photo/1551756", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1551756.jpg", "longitude": 145.116667, "latitude": -37.750000, "width": 500, "height": 298, "upload_date": "30 March 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 2397841, "photo_title": "Storm Season II", "photo_url": "http://www.panoramio.com/photo/2397841", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2397841.jpg", "longitude": -122.439870, "latitude": 37.427928, "width": 407, "height": 500, "upload_date": "26 May 2007", "owner_id": 107613, "owner_name": "Tom Grubbe", "owner_url": "http://www.panoramio.com/user/107613"} + , + {"photo_id": 1237915, "photo_title": "Chlum u Trebone", "photo_url": "http://www.panoramio.com/photo/1237915", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1237915.jpg", "longitude": 14.923811, "latitude": 48.960159, "width": 500, "height": 429, "upload_date": "09 March 2007", "owner_id": 235166, "owner_name": "jirivrobel", "owner_url": "http://www.panoramio.com/user/235166"} + , + {"photo_id": 359324, "photo_title": "Abstraktion in der Kirche von Mogno, Tessin .......", "photo_url": "http://www.panoramio.com/photo/359324", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/359324.jpg", "longitude": 8.663492, "latitude": 46.430966, "width": 500, "height": 380, "upload_date": "09 January 2007", "owner_id": 7434, "owner_name": "baldinger reisen ag, waedenswil/switzerland", "owner_url": "http://www.panoramio.com/user/7434"} + , + {"photo_id": 483742, "photo_title": "Venus at Haleakala", "photo_url": "http://www.panoramio.com/photo/483742", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/483742.jpg", "longitude": -156.239491, "latitude": 20.707468, "width": 500, "height": 375, "upload_date": "18 January 2007", "owner_id": 100907, "owner_name": "Julia Wahl", "owner_url": "http://www.panoramio.com/user/100907"} + , + {"photo_id": 1087397, "photo_title": "Fjellbjerk (Betula) Snøhetta mountain in the background", "photo_url": "http://www.panoramio.com/photo/1087397", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1087397.jpg", "longitude": 9.555531, "latitude": 62.240111, "width": 500, "height": 333, "upload_date": "28 February 2007", "owner_id": 223406, "owner_name": "Sigmund Rise", "owner_url": "http://www.panoramio.com/user/223406"} + , + {"photo_id": 2846123, "photo_title": "新潟 小千谷 風船一揆 2003 niigata ojiya balloon riot Fireworks", "photo_url": "http://www.panoramio.com/photo/2846123", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2846123.jpg", "longitude": 138.791313, "latitude": 37.289350, "width": 500, "height": 497, "upload_date": "20 June 2007", "owner_id": 446937, "owner_name": "y_komatsu", "owner_url": "http://www.panoramio.com/user/446937"} + , + {"photo_id": 2533559, "photo_title": "Great Idea ! Don´t do it !!!", "photo_url": "http://www.panoramio.com/photo/2533559", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2533559.jpg", "longitude": -35.036988, "latitude": -6.241628, "width": 500, "height": 308, "upload_date": "02 June 2007", "owner_id": 1908, "owner_name": "Cleber Lima", "owner_url": "http://www.panoramio.com/user/1908"} + , + {"photo_id": 86246, "photo_title": "Salinas de Santa Pola", "photo_url": "http://www.panoramio.com/photo/86246", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/86246.jpg", "longitude": -0.528374, "latitude": 38.230090, "width": 500, "height": 333, "upload_date": "25 November 2006", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 405740, "photo_title": "fudoutaki", "photo_url": "http://www.panoramio.com/photo/405740", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405740.jpg", "longitude": 139.502249, "latitude": 37.580909, "width": 500, "height": 394, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 12848417, "photo_title": "Niedrigwasser an der Elbe-Dresden", "photo_url": "http://www.panoramio.com/photo/12848417", "photo_file_url": "http://static2.bareka.com/photos/medium/12848417.jpg", "longitude": 13.745323, "latitude": 51.055093, "width": 500, "height": 268, "upload_date": "05 August 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 291091, "photo_title": "Imperia Porto Maurizio Puesta del Sol al Prino", "photo_url": "http://www.panoramio.com/photo/291091", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/291091.jpg", "longitude": 8.006684, "latitude": 43.869312, "width": 500, "height": 465, "upload_date": "03 January 2007", "owner_id": 60898, "owner_name": "esseil", "owner_url": "http://www.panoramio.com/user/60898"} + , + {"photo_id": 1183261, "photo_title": "Az óperencián innen", "photo_url": "http://www.panoramio.com/photo/1183261", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1183261.jpg", "longitude": 15.823574, "latitude": 43.708462, "width": 500, "height": 312, "upload_date": "05 March 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1637150, "photo_title": "Vista del Misti por encima de las nubes", "photo_url": "http://www.panoramio.com/photo/1637150", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1637150.jpg", "longitude": -71.414566, "latitude": -16.300040, "width": 500, "height": 333, "upload_date": "05 April 2007", "owner_id": 328178, "owner_name": "Mariví Jiménez", "owner_url": "http://www.panoramio.com/user/328178"} + , + {"photo_id": 507703, "photo_title": "Csendes vizek", "photo_url": "http://www.panoramio.com/photo/507703", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507703.jpg", "longitude": 17.568769, "latitude": 47.633586, "width": 500, "height": 349, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 55100, "photo_title": "Ballesvikskardet", "photo_url": "http://www.panoramio.com/photo/55100", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/55100.jpg", "longitude": 17.122707, "latitude": 69.352910, "width": 500, "height": 375, "upload_date": "30 September 2006", "owner_id": 3574, "owner_name": "blackone", "owner_url": "http://www.panoramio.com/user/3574"} + , + {"photo_id": 291648, "photo_title": "Galway Cathedral", "photo_url": "http://www.panoramio.com/photo/291648", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/291648.jpg", "longitude": -9.057664, "latitude": 53.275627, "width": 500, "height": 336, "upload_date": "03 January 2007", "owner_id": 61285, "owner_name": "kamil krawczak", "owner_url": "http://www.panoramio.com/user/61285"} + , + {"photo_id": 5285701, "photo_title": "Another South Sister reflecting in Sparks Lake", "photo_url": "http://www.panoramio.com/photo/5285701", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5285701.jpg", "longitude": -121.737549, "latitude": 44.014176, "width": 500, "height": 334, "upload_date": "13 October 2007", "owner_id": 128746, "owner_name": "© Michael Hatten", "owner_url": "http://www.panoramio.com/user/128746"} + , + {"photo_id": 761958, "photo_title": "Lake Oulujärvi", "photo_url": "http://www.panoramio.com/photo/761958", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/761958.jpg", "longitude": 27.339649, "latitude": 64.231986, "width": 375, "height": 500, "upload_date": "10 February 2007", "owner_id": 151444, "owner_name": "Timo Rossi", "owner_url": "http://www.panoramio.com/user/151444"} + , + {"photo_id": 3853459, "photo_title": "Its great to be a swan on Hawn Pawn!", "photo_url": "http://www.panoramio.com/photo/3853459", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3853459.jpg", "longitude": -71.154628, "latitude": 42.470625, "width": 389, "height": 500, "upload_date": "10 August 2007", "owner_id": 286174, "owner_name": "kamaly", "owner_url": "http://www.panoramio.com/user/286174"} + , + {"photo_id": 4610197, "photo_title": "Yosemite Valley with Fallen Redwood from V11", "photo_url": "http://www.panoramio.com/photo/4610197", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4610197.jpg", "longitude": -119.661703, "latitude": 37.717214, "width": 500, "height": 281, "upload_date": "12 September 2007", "owner_id": 339677, "owner_name": "Chip Stephan", "owner_url": "http://www.panoramio.com/user/339677"} + , + {"photo_id": 5700759, "photo_title": "Crete senesi", "photo_url": "http://www.panoramio.com/photo/5700759", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5700759.jpg", "longitude": 11.448483, "latitude": 43.280205, "width": 500, "height": 304, "upload_date": "02 November 2007", "owner_id": 158718, "owner_name": "giulio colla", "owner_url": "http://www.panoramio.com/user/158718"} + , + {"photo_id": 1391775, "photo_title": "Arboles al atardecer en Chapala - Trees at sunset in Chapala Lake", "photo_url": "http://www.panoramio.com/photo/1391775", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1391775.jpg", "longitude": -102.775211, "latitude": 20.308730, "width": 500, "height": 341, "upload_date": "19 March 2007", "owner_id": 291650, "owner_name": "J.Ernesto Ortiz Razo", "owner_url": "http://www.panoramio.com/user/291650"} + , + {"photo_id": 57514, "photo_title": "Limone 1", "photo_url": "http://www.panoramio.com/photo/57514", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57514.jpg", "longitude": 10.792179, "latitude": 45.816298, "width": 500, "height": 333, "upload_date": "04 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 2602937, "photo_title": "Alone", "photo_url": "http://www.panoramio.com/photo/2602937", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2602937.jpg", "longitude": -4.001770, "latitude": 31.174035, "width": 500, "height": 320, "upload_date": "06 June 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 117465, "photo_title": "New York in the Afternoon...from Soho.. by Jeremiah Christopher", "photo_url": "http://www.panoramio.com/photo/117465", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/117465.jpg", "longitude": -74.003212, "latitude": 40.724059, "width": 500, "height": 375, "upload_date": "11 December 2006", "owner_id": 16869, "owner_name": "Jeremiah Christopher", "owner_url": "http://www.panoramio.com/user/16869"} + , + {"photo_id": 1331707, "photo_title": "Kastellet (Copenhagen fortress), Aerial", "photo_url": "http://www.panoramio.com/photo/1331707", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1331707.jpg", "longitude": 12.594967, "latitude": 55.691230, "width": 500, "height": 332, "upload_date": "15 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 11853382, "photo_title": "Railroads by Sunset/ Schienen bei Sonnenuntergang", "photo_url": "http://www.panoramio.com/photo/11853382", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11853382.jpg", "longitude": 8.283455, "latitude": 51.692644, "width": 500, "height": 332, "upload_date": "06 July 2008", "owner_id": 564436, "owner_name": "Thomas Splietker", "owner_url": "http://www.panoramio.com/user/564436"} + , + {"photo_id": 1558288, "photo_title": "Notre-Dame et Tour Saint Jacques", "photo_url": "http://www.panoramio.com/photo/1558288", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1558288.jpg", "longitude": 2.354808, "latitude": 48.850399, "width": 500, "height": 333, "upload_date": "30 March 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 7601425, "photo_title": "Venezianische Impressionen", "photo_url": "http://www.panoramio.com/photo/7601425", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7601425.jpg", "longitude": 12.337024, "latitude": 45.432280, "width": 500, "height": 385, "upload_date": "05 February 2008", "owner_id": 696605, "owner_name": "© alfredschaffer", "owner_url": "http://www.panoramio.com/user/696605"} + , + {"photo_id": 36386, "photo_title": "Half Dome Cables", "photo_url": "http://www.panoramio.com/photo/36386", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36386.jpg", "longitude": -119.530735, "latitude": 37.746710, "width": 333, "height": 500, "upload_date": "02 August 2006", "owner_id": 5684, "owner_name": "Brent Townshend", "owner_url": "http://www.panoramio.com/user/5684"} + , + {"photo_id": 1089570, "photo_title": "Titokzatos reggel", "photo_url": "http://www.panoramio.com/photo/1089570", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1089570.jpg", "longitude": 17.467575, "latitude": 47.870532, "width": 500, "height": 331, "upload_date": "28 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 575276, "photo_title": "Sunrise", "photo_url": "http://www.panoramio.com/photo/575276", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/575276.jpg", "longitude": 2.288809, "latitude": 48.861892, "width": 500, "height": 349, "upload_date": "26 January 2007", "owner_id": 123518, "owner_name": "ERic Pouhier ericpouhier.com", "owner_url": "http://www.panoramio.com/user/123518"} + , + {"photo_id": 486480, "photo_title": "Monte Generoso", "photo_url": "http://www.panoramio.com/photo/486480", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/486480.jpg", "longitude": 9.015055, "latitude": 45.924826, "width": 428, "height": 500, "upload_date": "19 January 2007", "owner_id": 24068, "owner_name": "Daniele Nasi", "owner_url": "http://www.panoramio.com/user/24068"} + , + {"photo_id": 1100378, "photo_title": "Rensbekksetra (summer pasture)", "photo_url": "http://www.panoramio.com/photo/1100378", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1100378.jpg", "longitude": 9.293404, "latitude": 62.712731, "width": 500, "height": 255, "upload_date": "01 March 2007", "owner_id": 223406, "owner_name": "Sigmund Rise", "owner_url": "http://www.panoramio.com/user/223406"} + , + {"photo_id": 5844316, "photo_title": "Hikarigaoka IMA", "photo_url": "http://www.panoramio.com/photo/5844316", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5844316.jpg", "longitude": 139.630048, "latitude": 35.758154, "width": 500, "height": 326, "upload_date": "11 November 2007", "owner_id": 558055, "owner_name": "www.tokyoform.com", "owner_url": "http://www.panoramio.com/user/558055"} + , + {"photo_id": 1345372, "photo_title": "Sunset, Foeniculum vulgare (fennel, is one likely candidate)", "photo_url": "http://www.panoramio.com/photo/1345372", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1345372.jpg", "longitude": 10.727119, "latitude": 55.205080, "width": 332, "height": 500, "upload_date": "16 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 1317735, "photo_title": "Motu of Bora Bora", "photo_url": "http://www.panoramio.com/photo/1317735", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1317735.jpg", "longitude": -151.698360, "latitude": -16.495843, "width": 500, "height": 355, "upload_date": "14 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 1012093, "photo_title": "Sunrise from the east side of Longs Peak", "photo_url": "http://www.panoramio.com/photo/1012093", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1012093.jpg", "longitude": -105.542564, "latitude": 40.274549, "width": 374, "height": 500, "upload_date": "25 February 2007", "owner_id": 87752, "owner_name": "Richard Ryer", "owner_url": "http://www.panoramio.com/user/87752"} + , + {"photo_id": 5035419, "photo_title": "Basilica de San Basilio (Moscow)", "photo_url": "http://www.panoramio.com/photo/5035419", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5035419.jpg", "longitude": 37.622852, "latitude": 55.752622, "width": 398, "height": 500, "upload_date": "01 October 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 799910, "photo_title": "A Dramatic Turn of the Yangtze River", "photo_url": "http://www.panoramio.com/photo/799910", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/799910.jpg", "longitude": 99.272633, "latitude": 28.255552, "width": 500, "height": 226, "upload_date": "13 February 2007", "owner_id": 164125, "owner_name": "DannyXu", "owner_url": "http://www.panoramio.com/user/164125"} + , + {"photo_id": 765388, "photo_title": "Leh", "photo_url": "http://www.panoramio.com/photo/765388", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/765388.jpg", "longitude": 77.587509, "latitude": 34.164943, "width": 500, "height": 333, "upload_date": "10 February 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 2875857, "photo_title": "Elgol, Isle of Skye", "photo_url": "http://www.panoramio.com/photo/2875857", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2875857.jpg", "longitude": -6.107025, "latitude": 57.150023, "width": 500, "height": 500, "upload_date": "22 June 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 840915, "photo_title": "Island of The Day Before", "photo_url": "http://www.panoramio.com/photo/840915", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/840915.jpg", "longitude": 27.436638, "latitude": 42.441448, "width": 500, "height": 333, "upload_date": "16 February 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 1459925, "photo_title": "The last ray", "photo_url": "http://www.panoramio.com/photo/1459925", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1459925.jpg", "longitude": -110.134850, "latitude": 36.955379, "width": 500, "height": 290, "upload_date": "23 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 872177, "photo_title": "Sahara Desert sunrise, Chott el Jerid, near Kebili, Tunisia, 1/2007", "photo_url": "http://www.panoramio.com/photo/872177", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/872177.jpg", "longitude": 8.475866, "latitude": 33.930898, "width": 500, "height": 375, "upload_date": "18 February 2007", "owner_id": 183521, "owner_name": "SteveT", "owner_url": "http://www.panoramio.com/user/183521"} + , + {"photo_id": 405753, "photo_title": "sinanogawa", "photo_url": "http://www.panoramio.com/photo/405753", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405753.jpg", "longitude": 138.822384, "latitude": 37.268589, "width": 500, "height": 386, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 548240, "photo_title": "Old Bagan 2002", "photo_url": "http://www.panoramio.com/photo/548240", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/548240.jpg", "longitude": 94.825230, "latitude": 21.137026, "width": 500, "height": 375, "upload_date": "23 January 2007", "owner_id": 64758, "owner_name": "Joly David", "owner_url": "http://www.panoramio.com/user/64758"} + , + {"photo_id": 4868105, "photo_title": "Bled lake", "photo_url": "http://www.panoramio.com/photo/4868105", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4868105.jpg", "longitude": 14.104900, "latitude": 46.369793, "width": 500, "height": 333, "upload_date": "24 September 2007", "owner_id": 989, "owner_name": "Mrgud", "owner_url": "http://www.panoramio.com/user/989"} + , + {"photo_id": 549396, "photo_title": "Råkneset on Storfjellet island, Røst", "photo_url": "http://www.panoramio.com/photo/549396", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/549396.jpg", "longitude": 11.932955, "latitude": 67.457456, "width": 500, "height": 375, "upload_date": "23 January 2007", "owner_id": 95799, "owner_name": "Owen Morgan", "owner_url": "http://www.panoramio.com/user/95799"} + , + {"photo_id": 196121, "photo_title": "canallave", "photo_url": "http://www.panoramio.com/photo/196121", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/196121.jpg", "longitude": -3.960571, "latitude": 43.452358, "width": 500, "height": 332, "upload_date": "20 December 2006", "owner_id": 38804, "owner_name": "www.oscarsanchez.net", "owner_url": "http://www.panoramio.com/user/38804"} + , + {"photo_id": 2422299, "photo_title": "Pacific Weather", "photo_url": "http://www.panoramio.com/photo/2422299", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2422299.jpg", "longitude": -124.097099, "latitude": 44.345704, "width": 500, "height": 333, "upload_date": "27 May 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 821291, "photo_title": "Храм Василия Блаженного (Москва, ноябрь 2006 года)", "photo_url": "http://www.panoramio.com/photo/821291", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/821291.jpg", "longitude": 37.622954, "latitude": 55.752613, "width": 500, "height": 375, "upload_date": "14 February 2007", "owner_id": 55593, "owner_name": "pokatut.photosight.ru", "owner_url": "http://www.panoramio.com/user/55593"} + , + {"photo_id": 3545143, "photo_title": "Rainbow (Regnbue)", "photo_url": "http://www.panoramio.com/photo/3545143", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3545143.jpg", "longitude": 8.598175, "latitude": 62.904445, "width": 500, "height": 223, "upload_date": "26 July 2007", "owner_id": 343934, "owner_name": "Asbjørn999", "owner_url": "http://www.panoramio.com/user/343934"} + , + {"photo_id": 1794618, "photo_title": "Túlélők", "photo_url": "http://www.panoramio.com/photo/1794618", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1794618.jpg", "longitude": 20.803127, "latitude": 48.014157, "width": 399, "height": 500, "upload_date": "15 April 2007", "owner_id": 346103, "owner_name": "lacitot", "owner_url": "http://www.panoramio.com/user/346103"} + , + {"photo_id": 3904091, "photo_title": "Hajnali utakon", "photo_url": "http://www.panoramio.com/photo/3904091", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3904091.jpg", "longitude": 17.512014, "latitude": 47.850319, "width": 500, "height": 334, "upload_date": "13 August 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 5649508, "photo_title": "Quiet morning", "photo_url": "http://www.panoramio.com/photo/5649508", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5649508.jpg", "longitude": 12.190876, "latitude": 49.357446, "width": 500, "height": 333, "upload_date": "31 October 2007", "owner_id": 696605, "owner_name": "© alfredschaffer", "owner_url": "http://www.panoramio.com/user/696605"} + , + {"photo_id": 7938965, "photo_title": "Pattaya - Big Buddha - Big Buddha Hill", "photo_url": "http://www.panoramio.com/photo/7938965", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7938965.jpg", "longitude": 100.868343, "latitude": 12.914107, "width": 500, "height": 375, "upload_date": "19 February 2008", "owner_id": 716245, "owner_name": "—Dragon-64— ✈", "owner_url": "http://www.panoramio.com/user/716245"} + , + {"photo_id": 497056, "photo_title": "Japanese Garden maple", "photo_url": "http://www.panoramio.com/photo/497056", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/497056.jpg", "longitude": -122.707999, "latitude": 45.518810, "width": 500, "height": 300, "upload_date": "20 January 2007", "owner_id": 107359, "owner_name": "Ron Cooper", "owner_url": "http://www.panoramio.com/user/107359"} + , + {"photo_id": 438699, "photo_title": "White Sand Dunes", "photo_url": "http://www.panoramio.com/photo/438699", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/438699.jpg", "longitude": -106.262083, "latitude": 32.799324, "width": 371, "height": 500, "upload_date": "15 January 2007", "owner_id": 93560, "owner_name": "Alex Petrov", "owner_url": "http://www.panoramio.com/user/93560"} + , + {"photo_id": 2082221, "photo_title": "\"Bekötött szemmel\"", "photo_url": "http://www.panoramio.com/photo/2082221", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2082221.jpg", "longitude": 17.660522, "latitude": 47.604543, "width": 500, "height": 334, "upload_date": "05 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 5836484, "photo_title": "An Autumn's golden dawn on the Lake of Varese", "photo_url": "http://www.panoramio.com/photo/5836484", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5836484.jpg", "longitude": 8.718081, "latitude": 45.838966, "width": 500, "height": 312, "upload_date": "11 November 2007", "owner_id": 933456, "owner_name": "© Marco De Candido", "owner_url": "http://www.panoramio.com/user/933456"} + , + {"photo_id": 5204696, "photo_title": "Scotland", "photo_url": "http://www.panoramio.com/photo/5204696", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5204696.jpg", "longitude": -5.078773, "latitude": 56.558726, "width": 500, "height": 254, "upload_date": "09 October 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 1343454, "photo_title": "Вулкан Карымский", "photo_url": "http://www.panoramio.com/photo/1343454", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1343454.jpg", "longitude": 159.480286, "latitude": 54.025470, "width": 364, "height": 500, "upload_date": "16 March 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 507424, "photo_title": "Lankák, ívek, felhőárnyak", "photo_url": "http://www.panoramio.com/photo/507424", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507424.jpg", "longitude": 17.967281, "latitude": 47.318112, "width": 500, "height": 291, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 5893176, "photo_title": "07-06-11_Camino de Santiago, Castrojeriz_PIXELECTA", "photo_url": "http://www.panoramio.com/photo/5893176", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5893176.jpg", "longitude": -4.182916, "latitude": 42.285723, "width": 500, "height": 333, "upload_date": "13 November 2007", "owner_id": 163655, "owner_name": "[[[ PIXELECTA ]]]", "owner_url": "http://www.panoramio.com/user/163655"} + , + {"photo_id": 186685, "photo_title": "People of Petra, the boy and his job", "photo_url": "http://www.panoramio.com/photo/186685", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/186685.jpg", "longitude": 35.437002, "latitude": 30.322285, "width": 500, "height": 375, "upload_date": "19 December 2006", "owner_id": 24068, "owner_name": "Daniele Nasi", "owner_url": "http://www.panoramio.com/user/24068"} + , + {"photo_id": 355648, "photo_title": "puerto-rico el-yunque", "photo_url": "http://www.panoramio.com/photo/355648", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/355648.jpg", "longitude": -65.788536, "latitude": 18.298795, "width": 500, "height": 334, "upload_date": "09 January 2007", "owner_id": 69671, "owner_name": "illusandpics.com", "owner_url": "http://www.panoramio.com/user/69671"} + , + {"photo_id": 46913, "photo_title": "beachy head", "photo_url": "http://www.panoramio.com/photo/46913", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/46913.jpg", "longitude": 0.216272, "latitude": 50.737969, "width": 500, "height": 291, "upload_date": "11 September 2006", "owner_id": 2575, "owner_name": "mikel ortega", "owner_url": "http://www.panoramio.com/user/2575"} + , + {"photo_id": 6012999, "photo_title": "Wetterumschwung in Murano", "photo_url": "http://www.panoramio.com/photo/6012999", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6012999.jpg", "longitude": 12.357838, "latitude": 45.457557, "width": 500, "height": 336, "upload_date": "19 November 2007", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 590422, "photo_title": "Gyilkos-tó (Killer Lake) - Remains of the forest, which grew here until 1837, conserved by the water", "photo_url": "http://www.panoramio.com/photo/590422", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/590422.jpg", "longitude": 25.785170, "latitude": 46.792597, "width": 500, "height": 352, "upload_date": "27 January 2007", "owner_id": 57869, "owner_name": "NAGY Albert", "owner_url": "http://www.panoramio.com/user/57869"} + , + {"photo_id": 5119067, "photo_title": "Fog In The Forest", "photo_url": "http://www.panoramio.com/photo/5119067", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5119067.jpg", "longitude": 7.667191, "latitude": 49.174283, "width": 500, "height": 375, "upload_date": "05 October 2007", "owner_id": 528834, "owner_name": "©junebug", "owner_url": "http://www.panoramio.com/user/528834"} + , + {"photo_id": 4702558, "photo_title": "Sunset ( Isla de Antigua-Caribe)", "photo_url": "http://www.panoramio.com/photo/4702558", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4702558.jpg", "longitude": -61.833801, "latitude": 17.171627, "width": 500, "height": 375, "upload_date": "16 September 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 717413, "photo_title": "Singapore Skyline with Esplanade at night", "photo_url": "http://www.panoramio.com/photo/717413", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/717413.jpg", "longitude": 103.856664, "latitude": 1.291589, "width": 391, "height": 500, "upload_date": "06 February 2007", "owner_id": 20398, "owner_name": "boerx", "owner_url": "http://www.panoramio.com/user/20398"} + , + {"photo_id": 6281064, "photo_title": "Latemar Carezza", "photo_url": "http://www.panoramio.com/photo/6281064", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6281064.jpg", "longitude": 11.595447, "latitude": 46.412476, "width": 500, "height": 332, "upload_date": "03 December 2007", "owner_id": 578163, "owner_name": "Margherita-Italy", "owner_url": "http://www.panoramio.com/user/578163"} + , + {"photo_id": 327016, "photo_title": "bryce canyon", "photo_url": "http://www.panoramio.com/photo/327016", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/327016.jpg", "longitude": -112.210836, "latitude": 37.586146, "width": 500, "height": 375, "upload_date": "07 January 2007", "owner_id": 63705, "owner_name": "Karl Wiktorin", "owner_url": "http://www.panoramio.com/user/63705"} + , + {"photo_id": 301678, "photo_title": "Akashi Kaikyo Bridge (Pearl Bridge)", "photo_url": "http://www.panoramio.com/photo/301678", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/301678.jpg", "longitude": 135.028882, "latitude": 34.623002, "width": 443, "height": 500, "upload_date": "04 January 2007", "owner_id": 30202, "owner_name": "S_Mori", "owner_url": "http://www.panoramio.com/user/30202"} + , + {"photo_id": 6055804, "photo_title": "2007 Balsa de SALBURUA_VITORIA (Alava) PIXELECTA", "photo_url": "http://www.panoramio.com/photo/6055804", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6055804.jpg", "longitude": -2.650537, "latitude": 42.859907, "width": 500, "height": 333, "upload_date": "21 November 2007", "owner_id": 163655, "owner_name": "[[[ PIXELECTA ]]]", "owner_url": "http://www.panoramio.com/user/163655"} + , + {"photo_id": 5946759, "photo_title": "Snow Pond", "photo_url": "http://www.panoramio.com/photo/5946759", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5946759.jpg", "longitude": 10.899510, "latitude": 49.694507, "width": 500, "height": 375, "upload_date": "16 November 2007", "owner_id": 884621, "owner_name": "Florian Eichhorn", "owner_url": "http://www.panoramio.com/user/884621"} + , + {"photo_id": 231305, "photo_title": "Cathedral Rock in Sedona, AZ at Sunset", "photo_url": "http://www.panoramio.com/photo/231305", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/231305.jpg", "longitude": -111.792294, "latitude": 34.818657, "width": 500, "height": 327, "upload_date": "25 December 2006", "owner_id": 45308, "owner_name": "Mike Cavaroc", "owner_url": "http://www.panoramio.com/user/45308"} + , + {"photo_id": 582047, "photo_title": "Old Vineyard with the sun trying to break through the fog: Oakley, CA", "photo_url": "http://www.panoramio.com/photo/582047", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/582047.jpg", "longitude": -121.753750, "latitude": 38.001658, "width": 500, "height": 316, "upload_date": "26 January 2007", "owner_id": 99249, "owner_name": "shaunika", "owner_url": "http://www.panoramio.com/user/99249"} + , + {"photo_id": 679332, "photo_title": "forbidden city", "photo_url": "http://www.panoramio.com/photo/679332", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/679332.jpg", "longitude": 116.396177, "latitude": 39.921734, "width": 500, "height": 248, "upload_date": "04 February 2007", "owner_id": 146092, "owner_name": "sid1662", "owner_url": "http://www.panoramio.com/user/146092"} + , + {"photo_id": 3904189, "photo_title": "Hajnal", "photo_url": "http://www.panoramio.com/photo/3904189", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3904189.jpg", "longitude": 17.361488, "latitude": 47.875138, "width": 500, "height": 333, "upload_date": "13 August 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 11059137, "photo_title": "Sunset at Kythira Greece by Nikos Demiris", "photo_url": "http://www.panoramio.com/photo/11059137", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11059137.jpg", "longitude": 23.003998, "latitude": 36.142034, "width": 500, "height": 346, "upload_date": "09 June 2008", "owner_id": 1629713, "owner_name": "demirisn", "owner_url": "http://www.panoramio.com/user/1629713"} + , + {"photo_id": 2334150, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/2334150", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2334150.jpg", "longitude": 0.491531, "latitude": 40.903993, "width": 500, "height": 373, "upload_date": "21 May 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 5709301, "photo_title": "Ködvarázs II", "photo_url": "http://www.panoramio.com/photo/5709301", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5709301.jpg", "longitude": 17.998352, "latitude": 47.252903, "width": 333, "height": 500, "upload_date": "05 November 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 55029, "photo_title": "Solar Eclipce, Mt.Elbrus, Refuge of 11", "photo_url": "http://www.panoramio.com/photo/55029", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/55029.jpg", "longitude": 42.451859, "latitude": 43.316186, "width": 448, "height": 500, "upload_date": "30 September 2006", "owner_id": 7707, "owner_name": "Yorix", "owner_url": "http://www.panoramio.com/user/7707"} + , + {"photo_id": 702974, "photo_title": "Hundertwasserhaus", "photo_url": "http://www.panoramio.com/photo/702974", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/702974.jpg", "longitude": 16.393780, "latitude": 48.207594, "width": 375, "height": 500, "upload_date": "05 February 2007", "owner_id": 123698, "owner_name": "© Kojak", "owner_url": "http://www.panoramio.com/user/123698"} + , + {"photo_id": 8811826, "photo_title": "Der Baum im Wasser", "photo_url": "http://www.panoramio.com/photo/8811826", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8811826.jpg", "longitude": 9.293532, "latitude": 52.869078, "width": 375, "height": 500, "upload_date": "24 March 2008", "owner_id": 1431077, "owner_name": "Heiner F.", "owner_url": "http://www.panoramio.com/user/1431077"} + , + {"photo_id": 67843, "photo_title": "Torre Eiffel", "photo_url": "http://www.panoramio.com/photo/67843", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/67843.jpg", "longitude": 2.294587, "latitude": 48.858468, "width": 500, "height": 375, "upload_date": "21 October 2006", "owner_id": 9163, "owner_name": "marathoniano", "owner_url": "http://www.panoramio.com/user/9163"} + , + {"photo_id": 1183509, "photo_title": "Viharpart", "photo_url": "http://www.panoramio.com/photo/1183509", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1183509.jpg", "longitude": 15.917473, "latitude": 43.590587, "width": 500, "height": 334, "upload_date": "05 March 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 449049, "photo_title": "Encantos de Santos", "photo_url": "http://www.panoramio.com/photo/449049", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/449049.jpg", "longitude": -46.307716, "latitude": -23.988605, "width": 500, "height": 342, "upload_date": "16 January 2007", "owner_id": 81574, "owner_name": "Criss RB", "owner_url": "http://www.panoramio.com/user/81574"} + , + {"photo_id": 4669228, "photo_title": "Reif an der naab", "photo_url": "http://www.panoramio.com/photo/4669228", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4669228.jpg", "longitude": 12.113457, "latitude": 49.339105, "width": 500, "height": 333, "upload_date": "15 September 2007", "owner_id": 696605, "owner_name": "© alfredschaffer", "owner_url": "http://www.panoramio.com/user/696605"} + , + {"photo_id": 516653, "photo_title": "Alkonyvarázs", "photo_url": "http://www.panoramio.com/photo/516653", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/516653.jpg", "longitude": 17.451611, "latitude": 47.782424, "width": 404, "height": 500, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4214320, "photo_title": "暮色", "photo_url": "http://www.panoramio.com/photo/4214320", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4214320.jpg", "longitude": 110.364532, "latitude": 25.201524, "width": 500, "height": 313, "upload_date": "26 August 2007", "owner_id": 161470, "owner_name": "John Su", "owner_url": "http://www.panoramio.com/user/161470"} + , + {"photo_id": 9419312, "photo_title": "Skeleton", "photo_url": "http://www.panoramio.com/photo/9419312", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9419312.jpg", "longitude": -147.929063, "latitude": -15.091723, "width": 500, "height": 326, "upload_date": "16 April 2008", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 642609, "photo_title": "Oia, Santorini, Cyclades, Hellas, Greece", "photo_url": "http://www.panoramio.com/photo/642609", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/642609.jpg", "longitude": 25.377388, "latitude": 36.460778, "width": 500, "height": 333, "upload_date": "01 February 2007", "owner_id": 131038, "owner_name": "wolffystyle", "owner_url": "http://www.panoramio.com/user/131038"} + , + {"photo_id": 354614, "photo_title": "Dresden_Centrum_01", "photo_url": "http://www.panoramio.com/photo/354614", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/354614.jpg", "longitude": 13.740206, "latitude": 51.056934, "width": 500, "height": 332, "upload_date": "09 January 2007", "owner_id": 71628, "owner_name": "Ulrich Hässler, Dresden", "owner_url": "http://www.panoramio.com/user/71628"} + , + {"photo_id": 678200, "photo_title": "Geometria de terrazas", "photo_url": "http://www.panoramio.com/photo/678200", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/678200.jpg", "longitude": -16.841269, "latitude": 28.235525, "width": 500, "height": 333, "upload_date": "03 February 2007", "owner_id": 92750, "owner_name": "Pablo López Ramos", "owner_url": "http://www.panoramio.com/user/92750"} + , + {"photo_id": 436284, "photo_title": "bandaibasi2", "photo_url": "http://www.panoramio.com/photo/436284", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/436284.jpg", "longitude": 139.051423, "latitude": 37.920063, "width": 500, "height": 393, "upload_date": "15 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 2235454, "photo_title": "La bonde et la brume", "photo_url": "http://www.panoramio.com/photo/2235454", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2235454.jpg", "longitude": 1.595249, "latitude": 47.313181, "width": 500, "height": 500, "upload_date": "15 May 2007", "owner_id": 372189, "owner_name": "Phil©", "owner_url": "http://www.panoramio.com/user/372189"} + , + {"photo_id": 5983, "photo_title": "Waiting", "photo_url": "http://www.panoramio.com/photo/5983", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5983.jpg", "longitude": 7.796173, "latitude": 33.954752, "width": 344, "height": 500, "upload_date": "17 December 2005", "owner_id": 989, "owner_name": "Mrgud", "owner_url": "http://www.panoramio.com/user/989"} + , + {"photo_id": 97402, "photo_title": "Mostar", "photo_url": "http://www.panoramio.com/photo/97402", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/97402.jpg", "longitude": 17.814803, "latitude": 43.337102, "width": 500, "height": 375, "upload_date": "09 December 2006", "owner_id": 12954, "owner_name": "Ziębol", "owner_url": "http://www.panoramio.com/user/12954"} + , + {"photo_id": 5159548, "photo_title": "Autumn - Herbstfarben - Fall", "photo_url": "http://www.panoramio.com/photo/5159548", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5159548.jpg", "longitude": 7.541599, "latitude": 46.834772, "width": 500, "height": 374, "upload_date": "08 October 2007", "owner_id": 635422, "owner_name": "♫ Swissmay", "owner_url": "http://www.panoramio.com/user/635422"} + , + {"photo_id": 1779072, "photo_title": "Égi érintés", "photo_url": "http://www.panoramio.com/photo/1779072", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1779072.jpg", "longitude": 17.747383, "latitude": 47.556835, "width": 462, "height": 500, "upload_date": "14 April 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 5795973, "photo_title": "Emmental mit 7 Hengsten Hohgant und Berneralpen - Emmental, 7 Stallions and Bernese Alpine Snow Mountains", "photo_url": "http://www.panoramio.com/photo/5795973", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5795973.jpg", "longitude": 7.730427, "latitude": 47.033280, "width": 500, "height": 374, "upload_date": "08 November 2007", "owner_id": 635422, "owner_name": "♫ Swissmay", "owner_url": "http://www.panoramio.com/user/635422"} + , + {"photo_id": 6850694, "photo_title": "2007-VITORIA Alava PIXELECTA", "photo_url": "http://www.panoramio.com/photo/6850694", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6850694.jpg", "longitude": -2.649336, "latitude": 42.861260, "width": 500, "height": 116, "upload_date": "02 January 2008", "owner_id": 163655, "owner_name": "[[[ PIXELECTA ]]]", "owner_url": "http://www.panoramio.com/user/163655"} + , + {"photo_id": 11738506, "photo_title": "Galeria de Itálica", "photo_url": "http://www.panoramio.com/photo/11738506", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11738506.jpg", "longitude": -6.046858, "latitude": 37.444199, "width": 378, "height": 500, "upload_date": "03 July 2008", "owner_id": 1038666, "owner_name": "Doenjo", "owner_url": "http://www.panoramio.com/user/1038666"} + , + {"photo_id": 4013965, "photo_title": "Pedaleando en la costanera", "photo_url": "http://www.panoramio.com/photo/4013965", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4013965.jpg", "longitude": -73.231012, "latitude": -39.817655, "width": 500, "height": 366, "upload_date": "18 August 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 611985, "photo_title": "Toda Temple", "photo_url": "http://www.panoramio.com/photo/611985", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/611985.jpg", "longitude": 76.715459, "latitude": 11.420014, "width": 500, "height": 375, "upload_date": "29 January 2007", "owner_id": 130990, "owner_name": "Eye for India. blogspot .com", "owner_url": "http://www.panoramio.com/user/130990"} + , + {"photo_id": 2689441, "photo_title": "Terepszemle", "photo_url": "http://www.panoramio.com/photo/2689441", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2689441.jpg", "longitude": 17.674255, "latitude": 47.601533, "width": 500, "height": 347, "upload_date": "11 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 6599853, "photo_title": "FlowerSun", "photo_url": "http://www.panoramio.com/photo/6599853", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6599853.jpg", "longitude": 21.042938, "latitude": 41.988333, "width": 480, "height": 500, "upload_date": "21 December 2007", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 71855, "photo_title": "British Museum", "photo_url": "http://www.panoramio.com/photo/71855", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/71855.jpg", "longitude": -0.127373, "latitude": 51.519265, "width": 500, "height": 333, "upload_date": "28 October 2006", "owner_id": 1295, "owner_name": "Matthew Walters", "owner_url": "http://www.panoramio.com/user/1295"} + , + {"photo_id": 58291, "photo_title": "Gollinger Wasserfall", "photo_url": "http://www.panoramio.com/photo/58291", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58291.jpg", "longitude": 13.138103, "latitude": 47.601244, "width": 330, "height": 500, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 3903941, "photo_title": "Viharos Pipacsos", "photo_url": "http://www.panoramio.com/photo/3903941", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3903941.jpg", "longitude": 16.638451, "latitude": 47.732396, "width": 500, "height": 331, "upload_date": "13 August 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 5363928, "photo_title": "Antelope Slot Canyon", "photo_url": "http://www.panoramio.com/photo/5363928", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5363928.jpg", "longitude": -111.370811, "latitude": 36.856755, "width": 500, "height": 326, "upload_date": "17 October 2007", "owner_id": 358485, "owner_name": "Francesco Villa", "owner_url": "http://www.panoramio.com/user/358485"} + , + {"photo_id": 2688750, "photo_title": "Playa de Strenc,Mallorca", "photo_url": "http://www.panoramio.com/photo/2688750", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2688750.jpg", "longitude": 2.980042, "latitude": 39.348702, "width": 500, "height": 427, "upload_date": "11 June 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 3148025, "photo_title": "Zuidlede", "photo_url": "http://www.panoramio.com/photo/3148025", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3148025.jpg", "longitude": 3.906112, "latitude": 51.147667, "width": 496, "height": 500, "upload_date": "06 July 2007", "owner_id": 635244, "owner_name": "A.Lebacq", "owner_url": "http://www.panoramio.com/user/635244"} + , + {"photo_id": 809727, "photo_title": "Túl az óperencián", "photo_url": "http://www.panoramio.com/photo/809727", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/809727.jpg", "longitude": 17.062283, "latitude": 43.277580, "width": 500, "height": 334, "upload_date": "13 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 11560716, "photo_title": "China's Great Wall, 09 may 2008", "photo_url": "http://www.panoramio.com/photo/11560716", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11560716.jpg", "longitude": 116.064860, "latitude": 40.287162, "width": 500, "height": 331, "upload_date": "27 June 2008", "owner_id": 1931067, "owner_name": "EugeneTrambo", "owner_url": "http://www.panoramio.com/user/1931067"} + , + {"photo_id": 10484028, "photo_title": "Tuscanny in lower bavaria? Toskana in Niederbayern? near Pfeffenhausen", "photo_url": "http://www.panoramio.com/photo/10484028", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10484028.jpg", "longitude": 11.982479, "latitude": 48.628768, "width": 500, "height": 411, "upload_date": "22 May 2008", "owner_id": 1077251, "owner_name": "picsonthemove", "owner_url": "http://www.panoramio.com/user/1077251"} + , + {"photo_id": 10321724, "photo_title": "Kingston Lacy beech avenue from the middle of the road (don't try this at home...)", "photo_url": "http://www.panoramio.com/photo/10321724", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10321724.jpg", "longitude": -2.051697, "latitude": 50.820469, "width": 500, "height": 473, "upload_date": "17 May 2008", "owner_id": 450216, "owner_name": "Graham Hobbs", "owner_url": "http://www.panoramio.com/user/450216"} + , + {"photo_id": 11847917, "photo_title": "Neda.... The end of an unusual trip! First Prize \"Travel\" Panoramio JULY 2008, a shot by kostas andreopoulos", "photo_url": "http://www.panoramio.com/photo/11847917", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11847917.jpg", "longitude": 21.776275, "latitude": 37.394711, "width": 500, "height": 484, "upload_date": "06 July 2008", "owner_id": 1690483, "owner_name": "k.andre", "owner_url": "http://www.panoramio.com/user/1690483"} + , + {"photo_id": 723285, "photo_title": "Stonehenge Fisheye View June 2000", "photo_url": "http://www.panoramio.com/photo/723285", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723285.jpg", "longitude": -1.826195, "latitude": 51.178849, "width": 500, "height": 500, "upload_date": "07 February 2007", "owner_id": 154364, "owner_name": "Edgy01", "owner_url": "http://www.panoramio.com/user/154364"} + , + {"photo_id": 9831198, "photo_title": "Verőfényes hangulat", "photo_url": "http://www.panoramio.com/photo/9831198", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9831198.jpg", "longitude": 18.331053, "latitude": 47.650689, "width": 333, "height": 500, "upload_date": "01 May 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4670496, "photo_title": "Vuelo rasante entre la niebla", "photo_url": "http://www.panoramio.com/photo/4670496", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4670496.jpg", "longitude": -73.243092, "latitude": -39.809134, "width": 500, "height": 371, "upload_date": "15 September 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 2414624, "photo_title": "Triumvirátus", "photo_url": "http://www.panoramio.com/photo/2414624", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2414624.jpg", "longitude": 17.768154, "latitude": 47.510940, "width": 500, "height": 309, "upload_date": "27 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 196129, "photo_title": "usgo", "photo_url": "http://www.panoramio.com/photo/196129", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/196129.jpg", "longitude": -3.999882, "latitude": 43.439397, "width": 500, "height": 316, "upload_date": "20 December 2006", "owner_id": 38804, "owner_name": "www.oscarsanchez.net", "owner_url": "http://www.panoramio.com/user/38804"} + , + {"photo_id": 304677, "photo_title": "Allee bei Wilhelmsthal", "photo_url": "http://www.panoramio.com/photo/304677", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/304677.jpg", "longitude": 9.409919, "latitude": 51.392686, "width": 500, "height": 409, "upload_date": "05 January 2007", "owner_id": 63703, "owner_name": "Rainer Kaufhold", "owner_url": "http://www.panoramio.com/user/63703"} + , + {"photo_id": 4924213, "photo_title": "Egy varázslatos estén", "photo_url": "http://www.panoramio.com/photo/4924213", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4924213.jpg", "longitude": 2.151239, "latitude": 41.371278, "width": 500, "height": 335, "upload_date": "26 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 189243, "photo_title": "coming in for a landing", "photo_url": "http://www.panoramio.com/photo/189243", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/189243.jpg", "longitude": -123.147984, "latitude": 49.198812, "width": 500, "height": 333, "upload_date": "19 December 2006", "owner_id": 29932, "owner_name": "Rom@nce", "owner_url": "http://www.panoramio.com/user/29932"} + , + {"photo_id": 3121730, "photo_title": "Mers-les-Bains dark clouds looming", "photo_url": "http://www.panoramio.com/photo/3121730", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3121730.jpg", "longitude": 1.383655, "latitude": 50.066878, "width": 500, "height": 375, "upload_date": "04 July 2007", "owner_id": 633531, "owner_name": "ianwstokes", "owner_url": "http://www.panoramio.com/user/633531"} + , + {"photo_id": 5358146, "photo_title": "Lone Rock Rainbows", "photo_url": "http://www.panoramio.com/photo/5358146", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5358146.jpg", "longitude": -111.537795, "latitude": 37.020475, "width": 500, "height": 335, "upload_date": "16 October 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 9633346, "photo_title": "Altstadt von Spello--Winner Contest of April 2008 First Prize of Travel Category", "photo_url": "http://www.panoramio.com/photo/9633346", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9633346.jpg", "longitude": 12.672386, "latitude": 42.989236, "width": 347, "height": 500, "upload_date": "23 April 2008", "owner_id": 1400529, "owner_name": "marita1004", "owner_url": "http://www.panoramio.com/user/1400529"} + , + {"photo_id": 611425, "photo_title": "The Dome of Cologne", "photo_url": "http://www.panoramio.com/photo/611425", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/611425.jpg", "longitude": 6.968604, "latitude": 50.941157, "width": 500, "height": 357, "upload_date": "29 January 2007", "owner_id": 8058, "owner_name": "Ermanec", "owner_url": "http://www.panoramio.com/user/8058"} + , + {"photo_id": 6850661, "photo_title": "Në Fush të Pallaticës", "photo_url": "http://www.panoramio.com/photo/6850661", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6850661.jpg", "longitude": 21.075768, "latitude": 42.007915, "width": 488, "height": 500, "upload_date": "02 January 2008", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 5617509, "photo_title": "Cölöp kiadó", "photo_url": "http://www.panoramio.com/photo/5617509", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5617509.jpg", "longitude": 12.333934, "latitude": 45.425368, "width": 500, "height": 334, "upload_date": "29 October 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 2083687, "photo_title": "Sunrise at Abu Simbel", "photo_url": "http://www.panoramio.com/photo/2083687", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2083687.jpg", "longitude": 31.630840, "latitude": 22.363729, "width": 500, "height": 335, "upload_date": "05 May 2007", "owner_id": 3316, "owner_name": "kristine hannon (www.traveltheglobe.be)", "owner_url": "http://www.panoramio.com/user/3316"} + , + {"photo_id": 7284083, "photo_title": "Japanese garden", "photo_url": "http://www.panoramio.com/photo/7284083", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7284083.jpg", "longitude": -13.673172, "latitude": 21.259301, "width": 335, "height": 500, "upload_date": "22 January 2008", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 5750152, "photo_title": "Earth, Moon and Sky", "photo_url": "http://www.panoramio.com/photo/5750152", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5750152.jpg", "longitude": -117.560234, "latitude": 36.678057, "width": 333, "height": 500, "upload_date": "06 November 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 5633673, "photo_title": "Ridgely Farm Lane", "photo_url": "http://www.panoramio.com/photo/5633673", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5633673.jpg", "longitude": -78.775320, "latitude": 38.031867, "width": 500, "height": 378, "upload_date": "30 October 2007", "owner_id": 523038, "owner_name": "Yank in Dixie", "owner_url": "http://www.panoramio.com/user/523038"} + , + {"photo_id": 723090, "photo_title": "Grand Canyon (Havasupai)", "photo_url": "http://www.panoramio.com/photo/723090", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723090.jpg", "longitude": -112.716293, "latitude": 36.270989, "width": 500, "height": 332, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1226915, "photo_title": "Flamants roses sur l'Etang de Vaccarès", "photo_url": "http://www.panoramio.com/photo/1226915", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1226915.jpg", "longitude": 4.627304, "latitude": 43.551285, "width": 500, "height": 333, "upload_date": "08 March 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 2738883, "photo_title": "Tormenta", "photo_url": "http://www.panoramio.com/photo/2738883", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2738883.jpg", "longitude": -71.616096, "latitude": -33.042558, "width": 333, "height": 500, "upload_date": "14 June 2007", "owner_id": 477365, "owner_name": "✔chilefoto", "owner_url": "http://www.panoramio.com/user/477365"} + , + {"photo_id": 2875846, "photo_title": "Rannoch Moor, Scotland", "photo_url": "http://www.panoramio.com/photo/2875846", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2875846.jpg", "longitude": -4.745750, "latitude": 56.594467, "width": 500, "height": 462, "upload_date": "22 June 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 533456, "photo_title": "Zöld symphonia", "photo_url": "http://www.panoramio.com/photo/533456", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/533456.jpg", "longitude": 17.500362, "latitude": 47.843579, "width": 500, "height": 333, "upload_date": "22 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3078609, "photo_title": "Pagan - Sunset Vista", "photo_url": "http://www.panoramio.com/photo/3078609", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3078609.jpg", "longitude": 94.884624, "latitude": 21.166644, "width": 500, "height": 329, "upload_date": "02 July 2007", "owner_id": 73104, "owner_name": "zerega", "owner_url": "http://www.panoramio.com/user/73104"} + , + {"photo_id": 1599459, "photo_title": "Rosina Lamberti - Templestowe Sunset", "photo_url": "http://www.panoramio.com/photo/1599459", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1599459.jpg", "longitude": 145.145187, "latitude": -37.773700, "width": 500, "height": 332, "upload_date": "02 April 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 37097, "photo_title": "Burj Al Arab at Night", "photo_url": "http://www.panoramio.com/photo/37097", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/37097.jpg", "longitude": 55.190012, "latitude": 25.144411, "width": 333, "height": 500, "upload_date": "05 August 2006", "owner_id": 1295, "owner_name": "Matthew Walters", "owner_url": "http://www.panoramio.com/user/1295"} + , + {"photo_id": 42988, "photo_title": "Mekhong at Nakhon Phanom, Thailand", "photo_url": "http://www.panoramio.com/photo/42988", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/42988.jpg", "longitude": 104.780045, "latitude": 17.415348, "width": 500, "height": 375, "upload_date": "29 August 2006", "owner_id": 6386, "owner_name": "Uwe Werner", "owner_url": "http://www.panoramio.com/user/6386"} + , + {"photo_id": 4738551, "photo_title": "Aquakatedral", "photo_url": "http://www.panoramio.com/photo/4738551", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4738551.jpg", "longitude": 18.026505, "latitude": 47.279462, "width": 500, "height": 334, "upload_date": "18 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 6126327, "photo_title": "Autumnal Morning", "photo_url": "http://www.panoramio.com/photo/6126327", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6126327.jpg", "longitude": 0.209620, "latitude": 51.658827, "width": 500, "height": 500, "upload_date": "25 November 2007", "owner_id": 1130880, "owner_name": "marksimms", "owner_url": "http://www.panoramio.com/user/1130880"} + , + {"photo_id": 1390072, "photo_title": "Winter Wonder Woods", "photo_url": "http://www.panoramio.com/photo/1390072", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1390072.jpg", "longitude": -123.184891, "latitude": 49.400027, "width": 500, "height": 343, "upload_date": "19 March 2007", "owner_id": 164125, "owner_name": "DannyXu", "owner_url": "http://www.panoramio.com/user/164125"} + , + {"photo_id": 8600061, "photo_title": "Templio", "photo_url": "http://www.panoramio.com/photo/8600061", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8600061.jpg", "longitude": 13.600258, "latitude": 37.288703, "width": 500, "height": 375, "upload_date": "17 March 2008", "owner_id": 325031, "owner_name": "Gibrail", "owner_url": "http://www.panoramio.com/user/325031"} + , + {"photo_id": 1232144, "photo_title": "the Wave", "photo_url": "http://www.panoramio.com/photo/1232144", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1232144.jpg", "longitude": -112.006313, "latitude": 36.995921, "width": 497, "height": 500, "upload_date": "08 March 2007", "owner_id": 256348, "owner_name": "DIEZ Jean-Paul", "owner_url": "http://www.panoramio.com/user/256348"} + , + {"photo_id": 12825028, "photo_title": "American Star shipwreck", "photo_url": "http://www.panoramio.com/photo/12825028", "photo_file_url": "http://static1.bareka.com/photos/medium/12825028.jpg", "longitude": -14.178050, "latitude": 28.345596, "width": 500, "height": 375, "upload_date": "05 August 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 9705164, "photo_title": "Die blaue Stunde-Dresden", "photo_url": "http://www.panoramio.com/photo/9705164", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9705164.jpg", "longitude": 13.732374, "latitude": 51.061020, "width": 500, "height": 333, "upload_date": "26 April 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 9701147, "photo_title": "After the thunderstorm II (Calella de Palafrugell)", "photo_url": "http://www.panoramio.com/photo/9701147", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9701147.jpg", "longitude": 3.185166, "latitude": 41.888413, "width": 500, "height": 347, "upload_date": "26 April 2008", "owner_id": 629243, "owner_name": "Olivier Faugeras", "owner_url": "http://www.panoramio.com/user/629243"} + , + {"photo_id": 3414277, "photo_title": "Morning at Vlixos_Lefkada", "photo_url": "http://www.panoramio.com/photo/3414277", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3414277.jpg", "longitude": 20.698693, "latitude": 38.689111, "width": 500, "height": 333, "upload_date": "20 July 2007", "owner_id": 242446, "owner_name": "Ntinos Lagos", "owner_url": "http://www.panoramio.com/user/242446"} + , + {"photo_id": 1205806, "photo_title": "A tavasz aranya", "photo_url": "http://www.panoramio.com/photo/1205806", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1205806.jpg", "longitude": 17.634773, "latitude": 47.557299, "width": 500, "height": 302, "upload_date": "07 March 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 6430261, "photo_title": "The wet side of winter", "photo_url": "http://www.panoramio.com/photo/6430261", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6430261.jpg", "longitude": 9.531434, "latitude": 48.559611, "width": 500, "height": 375, "upload_date": "11 December 2007", "owner_id": 424589, "owner_name": "PeSchn", "owner_url": "http://www.panoramio.com/user/424589"} + , + {"photo_id": 8116025, "photo_title": "Sale el Sol, Cae la Luna", "photo_url": "http://www.panoramio.com/photo/8116025", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8116025.jpg", "longitude": -71.875992, "latitude": -41.170126, "width": 500, "height": 333, "upload_date": "26 February 2008", "owner_id": 4483, "owner_name": "Miguel Coranti", "owner_url": "http://www.panoramio.com/user/4483"} + , + {"photo_id": 1235514, "photo_title": "Pulau Menjangan", "photo_url": "http://www.panoramio.com/photo/1235514", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1235514.jpg", "longitude": 114.502687, "latitude": -8.095941, "width": 500, "height": 341, "upload_date": "09 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 32827, "photo_title": "Xi'an Bell Tower", "photo_url": "http://www.panoramio.com/photo/32827", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/32827.jpg", "longitude": 108.943026, "latitude": 34.260759, "width": 500, "height": 375, "upload_date": "17 July 2006", "owner_id": 5168, "owner_name": "Markus Källander", "owner_url": "http://www.panoramio.com/user/5168"} + , + {"photo_id": 798014, "photo_title": "Porto Canale", "photo_url": "http://www.panoramio.com/photo/798014", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/798014.jpg", "longitude": 12.399648, "latitude": 44.203343, "width": 500, "height": 332, "upload_date": "12 February 2007", "owner_id": 159455, "owner_name": "©Franco Truscello", "owner_url": "http://www.panoramio.com/user/159455"} + , + {"photo_id": 10517317, "photo_title": "Route 66", "photo_url": "http://www.panoramio.com/photo/10517317", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10517317.jpg", "longitude": 18.027492, "latitude": 46.268071, "width": 500, "height": 375, "upload_date": "23 May 2008", "owner_id": 328249, "owner_name": "v.zsoloo", "owner_url": "http://www.panoramio.com/user/328249"} + , + {"photo_id": 416838, "photo_title": "Old Faithful on New Year's Morning", "photo_url": "http://www.panoramio.com/photo/416838", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/416838.jpg", "longitude": -110.827900, "latitude": 44.459354, "width": 500, "height": 375, "upload_date": "13 January 2007", "owner_id": 71099, "owner_name": "Eve in Montana", "owner_url": "http://www.panoramio.com/user/71099"} + , + {"photo_id": 5964, "photo_title": "Skradin bridge", "photo_url": "http://www.panoramio.com/photo/5964", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5964.jpg", "longitude": 15.908031, "latitude": 43.806040, "width": 500, "height": 333, "upload_date": "17 December 2005", "owner_id": 989, "owner_name": "Mrgud", "owner_url": "http://www.panoramio.com/user/989"} + , + {"photo_id": 419923, "photo_title": "bandaibashi2", "photo_url": "http://www.panoramio.com/photo/419923", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/419923.jpg", "longitude": 139.055500, "latitude": 37.920029, "width": 334, "height": 500, "upload_date": "14 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 26985, "photo_title": "Cementerio General", "photo_url": "http://www.panoramio.com/photo/26985", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/26985.jpg", "longitude": -84.091458, "latitude": 9.930174, "width": 393, "height": 500, "upload_date": "23 June 2006", "owner_id": 4112, "owner_name": "Roberto Garcia", "owner_url": "http://www.panoramio.com/user/4112"} + , + {"photo_id": 405866, "photo_title": "awasima", "photo_url": "http://www.panoramio.com/photo/405866", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405866.jpg", "longitude": 139.229908, "latitude": 38.463267, "width": 396, "height": 500, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1319538, "photo_title": "What a place !", "photo_url": "http://www.panoramio.com/photo/1319538", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1319538.jpg", "longitude": -62.542677, "latitude": 6.022092, "width": 329, "height": 500, "upload_date": "14 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 444280, "photo_title": "Cigars are for ladies", "photo_url": "http://www.panoramio.com/photo/444280", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/444280.jpg", "longitude": -82.351027, "latitude": 23.139117, "width": 500, "height": 375, "upload_date": "15 January 2007", "owner_id": 57893, "owner_name": "ThoiryK", "owner_url": "http://www.panoramio.com/user/57893"} + , + {"photo_id": 6016, "photo_title": "Šibenik - tiramol", "photo_url": "http://www.panoramio.com/photo/6016", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6016.jpg", "longitude": 15.890865, "latitude": 43.735693, "width": 473, "height": 500, "upload_date": "18 December 2005", "owner_id": 991, "owner_name": "Mario Marotti", "owner_url": "http://www.panoramio.com/user/991"} + , + {"photo_id": 3531661, "photo_title": "Zúzmara", "photo_url": "http://www.panoramio.com/photo/3531661", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3531661.jpg", "longitude": 17.498131, "latitude": 47.847727, "width": 500, "height": 346, "upload_date": "25 July 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 723088, "photo_title": "Friendly Evening Haze", "photo_url": "http://www.panoramio.com/photo/723088", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723088.jpg", "longitude": 25.428715, "latitude": 36.421282, "width": 333, "height": 500, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 422813, "photo_title": "tanokami", "photo_url": "http://www.panoramio.com/photo/422813", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/422813.jpg", "longitude": 138.777237, "latitude": 37.581453, "width": 500, "height": 379, "upload_date": "14 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 516256, "photo_title": "A hitehagyott", "photo_url": "http://www.panoramio.com/photo/516256", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/516256.jpg", "longitude": 17.533493, "latitude": 47.842139, "width": 500, "height": 291, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 706978, "photo_title": "Snow at full moon", "photo_url": "http://www.panoramio.com/photo/706978", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/706978.jpg", "longitude": 23.878784, "latitude": 69.829207, "width": 500, "height": 334, "upload_date": "05 February 2007", "owner_id": 56091, "owner_name": "Kjetil Vaage Øie", "owner_url": "http://www.panoramio.com/user/56091"} + , + {"photo_id": 4994983, "photo_title": "Camogli - Castello della \"Dragonara\" (north-west looking photograph)", "photo_url": "http://www.panoramio.com/photo/4994983", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4994983.jpg", "longitude": 9.151220, "latitude": 44.350207, "width": 325, "height": 500, "upload_date": "30 September 2007", "owner_id": 180947, "owner_name": "gilberto silvestri", "owner_url": "http://www.panoramio.com/user/180947"} + , + {"photo_id": 1315255, "photo_title": "Tulpen in Holland", "photo_url": "http://www.panoramio.com/photo/1315255", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1315255.jpg", "longitude": 4.556494, "latitude": 52.278451, "width": 500, "height": 321, "upload_date": "14 March 2007", "owner_id": 193467, "owner_name": "Jörg Behmann", "owner_url": "http://www.panoramio.com/user/193467"} + , + {"photo_id": 5204412, "photo_title": "Alaska Range", "photo_url": "http://www.panoramio.com/photo/5204412", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5204412.jpg", "longitude": -150.150146, "latitude": 62.734601, "width": 500, "height": 375, "upload_date": "09 October 2007", "owner_id": 71099, "owner_name": "Eve in Montana", "owner_url": "http://www.panoramio.com/user/71099"} + , + {"photo_id": 5204668, "photo_title": "Scotland", "photo_url": "http://www.panoramio.com/photo/5204668", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5204668.jpg", "longitude": -4.821882, "latitude": 56.634188, "width": 500, "height": 500, "upload_date": "09 October 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 1706188, "photo_title": "Night", "photo_url": "http://www.panoramio.com/photo/1706188", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1706188.jpg", "longitude": 21.440957, "latitude": 48.427236, "width": 390, "height": 500, "upload_date": "09 April 2007", "owner_id": 346103, "owner_name": "lacitot", "owner_url": "http://www.panoramio.com/user/346103"} + , + {"photo_id": 6366165, "photo_title": "Il Latemar", "photo_url": "http://www.panoramio.com/photo/6366165", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6366165.jpg", "longitude": 11.575856, "latitude": 46.410138, "width": 500, "height": 375, "upload_date": "08 December 2007", "owner_id": 933456, "owner_name": "© Marco De Candido", "owner_url": "http://www.panoramio.com/user/933456"} + , + {"photo_id": 5433048, "photo_title": "moon photoshop", "photo_url": "http://www.panoramio.com/photo/5433048", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5433048.jpg", "longitude": 11.337848, "latitude": 46.460602, "width": 500, "height": 335, "upload_date": "20 October 2007", "owner_id": 578163, "owner_name": "Margherita-Italy", "owner_url": "http://www.panoramio.com/user/578163"} + , + {"photo_id": 611035, "photo_title": "Ice berg", "photo_url": "http://www.panoramio.com/photo/611035", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/611035.jpg", "longitude": -58.886719, "latitude": -63.470145, "width": 333, "height": 500, "upload_date": "29 January 2007", "owner_id": 14940, "owner_name": "elmtree", "owner_url": "http://www.panoramio.com/user/14940"} + , + {"photo_id": 4258269, "photo_title": "Új nap kelte", "photo_url": "http://www.panoramio.com/photo/4258269", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4258269.jpg", "longitude": 17.474785, "latitude": 47.832057, "width": 500, "height": 327, "upload_date": "28 August 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 37088, "photo_title": "Komandoo From The Air", "photo_url": "http://www.panoramio.com/photo/37088", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/37088.jpg", "longitude": 73.422661, "latitude": 5.496900, "width": 500, "height": 278, "upload_date": "05 August 2006", "owner_id": 1295, "owner_name": "Matthew Walters", "owner_url": "http://www.panoramio.com/user/1295"} + , + {"photo_id": 71667, "photo_title": "2006년06월11일(일) 장전계곡 및 단임골 046_resize", "photo_url": "http://www.panoramio.com/photo/71667", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/71667.jpg", "longitude": 128.533516, "latitude": 37.435340, "width": 500, "height": 333, "upload_date": "28 October 2006", "owner_id": 9424, "owner_name": "박범호", "owner_url": "http://www.panoramio.com/user/9424"} + , + {"photo_id": 5300468, "photo_title": "Lac du Vieux Emosson", "photo_url": "http://www.panoramio.com/photo/5300468", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5300468.jpg", "longitude": 6.883256, "latitude": 46.055744, "width": 500, "height": 500, "upload_date": "14 October 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 591351, "photo_title": "smokestack_8739", "photo_url": "http://www.panoramio.com/photo/591351", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/591351.jpg", "longitude": -79.386027, "latitude": 43.648168, "width": 500, "height": 392, "upload_date": "27 January 2007", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 11224316, "photo_title": "Remindful winter season-Vardar river", "photo_url": "http://www.panoramio.com/photo/11224316", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11224316.jpg", "longitude": 21.084051, "latitude": 42.013782, "width": 214, "height": 500, "upload_date": "15 June 2008", "owner_id": 695042, "owner_name": "Neim Sejfuli ♦", "owner_url": "http://www.panoramio.com/user/695042"} + , + {"photo_id": 5968187, "photo_title": "2007 VITORIA Alava PIXELECTA", "photo_url": "http://www.panoramio.com/photo/5968187", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5968187.jpg", "longitude": -2.650087, "latitude": 42.860206, "width": 500, "height": 333, "upload_date": "17 November 2007", "owner_id": 163655, "owner_name": "[[[ PIXELECTA ]]]", "owner_url": "http://www.panoramio.com/user/163655"} + , + {"photo_id": 1781517, "photo_title": "Yosemite Falls in Winter", "photo_url": "http://www.panoramio.com/photo/1781517", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1781517.jpg", "longitude": -119.590130, "latitude": 37.744318, "width": 500, "height": 400, "upload_date": "15 April 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 5796376, "photo_title": "Shuto Expressway Loop Line in Nihombashi", "photo_url": "http://www.panoramio.com/photo/5796376", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5796376.jpg", "longitude": 139.776344, "latitude": 35.684536, "width": 327, "height": 500, "upload_date": "08 November 2007", "owner_id": 558055, "owner_name": "www.tokyoform.com", "owner_url": "http://www.panoramio.com/user/558055"} + , + {"photo_id": 5523741, "photo_title": "Saskatchewan Sunset October 24/07 (and there is the flat land of the prairies at the bottom of this pic ;)", "photo_url": "http://www.panoramio.com/photo/5523741", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5523741.jpg", "longitude": -105.535011, "latitude": 50.502073, "width": 375, "height": 500, "upload_date": "24 October 2007", "owner_id": 133037, "owner_name": "Lilypon", "owner_url": "http://www.panoramio.com/user/133037"} + , + {"photo_id": 196125, "photo_title": "arnía y covachos", "photo_url": "http://www.panoramio.com/photo/196125", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/196125.jpg", "longitude": -3.914223, "latitude": 43.474349, "width": 500, "height": 337, "upload_date": "20 December 2006", "owner_id": 38804, "owner_name": "www.oscarsanchez.net", "owner_url": "http://www.panoramio.com/user/38804"} + , + {"photo_id": 349726, "photo_title": "thailand ko-samui sunset", "photo_url": "http://www.panoramio.com/photo/349726", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/349726.jpg", "longitude": 99.930954, "latitude": 9.472344, "width": 500, "height": 334, "upload_date": "08 January 2007", "owner_id": 69671, "owner_name": "illusandpics.com", "owner_url": "http://www.panoramio.com/user/69671"} + , + {"photo_id": 280106, "photo_title": "dune01", "photo_url": "http://www.panoramio.com/photo/280106", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/280106.jpg", "longitude": -5.089073, "latitude": 30.229408, "width": 500, "height": 345, "upload_date": "01 January 2007", "owner_id": 58867, "owner_name": "Lachaud Franck", "owner_url": "http://www.panoramio.com/user/58867"} + , + {"photo_id": 4446015, "photo_title": "Mennyei fényjáték", "photo_url": "http://www.panoramio.com/photo/4446015", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4446015.jpg", "longitude": 17.818108, "latitude": 47.525084, "width": 500, "height": 333, "upload_date": "06 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4644180, "photo_title": "Bridalveil Falls from Valley View", "photo_url": "http://www.panoramio.com/photo/4644180", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4644180.jpg", "longitude": -119.661723, "latitude": 37.717419, "width": 500, "height": 357, "upload_date": "14 September 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 457302, "photo_title": "Matterhorn Zermatt", "photo_url": "http://www.panoramio.com/photo/457302", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/457302.jpg", "longitude": 7.746391, "latitude": 46.016992, "width": 500, "height": 375, "upload_date": "16 January 2007", "owner_id": 47930, "owner_name": "werni", "owner_url": "http://www.panoramio.com/user/47930"} + , + {"photo_id": 4258138, "photo_title": "Szentkút", "photo_url": "http://www.panoramio.com/photo/4258138", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4258138.jpg", "longitude": 17.731848, "latitude": 47.243755, "width": 500, "height": 334, "upload_date": "28 August 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 26986, "photo_title": "Cementerio General", "photo_url": "http://www.panoramio.com/photo/26986", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/26986.jpg", "longitude": -84.091158, "latitude": 9.930047, "width": 500, "height": 373, "upload_date": "23 June 2006", "owner_id": 4112, "owner_name": "Roberto Garcia", "owner_url": "http://www.panoramio.com/user/4112"} + , + {"photo_id": 1269869, "photo_title": "Barents Sea at night, Finnmark, Norway", "photo_url": "http://www.panoramio.com/photo/1269869", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1269869.jpg", "longitude": 30.868149, "latitude": 70.438638, "width": 500, "height": 324, "upload_date": "11 March 2007", "owner_id": 66734, "owner_name": "Svein Solhaug", "owner_url": "http://www.panoramio.com/user/66734"} + , + {"photo_id": 515971, "photo_title": "A hosszútávfutó magányossága", "photo_url": "http://www.panoramio.com/photo/515971", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/515971.jpg", "longitude": 17.870121, "latitude": 47.373012, "width": 500, "height": 276, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 36486, "photo_title": "Sunrise on Trondheimsfjord", "photo_url": "http://www.panoramio.com/photo/36486", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36486.jpg", "longitude": 10.333843, "latitude": 63.456186, "width": 500, "height": 332, "upload_date": "02 August 2006", "owner_id": 5703, "owner_name": "dancer", "owner_url": "http://www.panoramio.com/user/5703"} + , + {"photo_id": 4950702, "photo_title": "Abandoned Gas Stand, Hachimantai, Iwate, Japan", "photo_url": "http://www.panoramio.com/photo/4950702", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4950702.jpg", "longitude": 141.062308, "latitude": 39.955547, "width": 500, "height": 335, "upload_date": "28 September 2007", "owner_id": 699984, "owner_name": "Fried Toast", "owner_url": "http://www.panoramio.com/user/699984"} + , + {"photo_id": 2345653, "photo_title": "planet mars", "photo_url": "http://www.panoramio.com/photo/2345653", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2345653.jpg", "longitude": 33.631908, "latitude": 27.380118, "width": 500, "height": 322, "upload_date": "22 May 2007", "owner_id": 223374, "owner_name": "voutsen", "owner_url": "http://www.panoramio.com/user/223374"} + , + {"photo_id": 4612307, "photo_title": "Sitges - Spinaker", "photo_url": "http://www.panoramio.com/photo/4612307", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4612307.jpg", "longitude": 1.859436, "latitude": 41.211722, "width": 500, "height": 371, "upload_date": "13 September 2007", "owner_id": 138691, "owner_name": "Josep Maria Alegre", "owner_url": "http://www.panoramio.com/user/138691"} + , + {"photo_id": 4644311, "photo_title": "Through the Looking Glass", "photo_url": "http://www.panoramio.com/photo/4644311", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4644311.jpg", "longitude": -119.649745, "latitude": 37.722019, "width": 333, "height": 500, "upload_date": "14 September 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 1480664, "photo_title": "Királyi szurkolótábor", "photo_url": "http://www.panoramio.com/photo/1480664", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1480664.jpg", "longitude": 17.300034, "latitude": 47.190646, "width": 500, "height": 269, "upload_date": "24 March 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 8492774, "photo_title": "Lago Fedaia in estate Panoramio and ATP first CONTEST, March 2008, category Scenery : awarded \" Honorable Mention\". Many thanks to all voters", "photo_url": "http://www.panoramio.com/photo/8492774", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8492774.jpg", "longitude": 11.867519, "latitude": 46.463128, "width": 500, "height": 375, "upload_date": "12 March 2008", "owner_id": 6033, "owner_name": "► Marco Vanzo", "owner_url": "http://www.panoramio.com/user/6033"} + , + {"photo_id": 57835, "photo_title": "Seewaldsee 2 - St.Koloman", "photo_url": "http://www.panoramio.com/photo/57835", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57835.jpg", "longitude": 13.274918, "latitude": 47.630115, "width": 500, "height": 333, "upload_date": "05 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 57837, "photo_title": "Der Hraunfossar an einem kalten Wintertag .....(MS)", "photo_url": "http://www.panoramio.com/photo/57837", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57837.jpg", "longitude": -20.939941, "latitude": 64.698078, "width": 500, "height": 264, "upload_date": "05 October 2006", "owner_id": 7434, "owner_name": "baldinger reisen ag, waedenswil/switzerland", "owner_url": "http://www.panoramio.com/user/7434"} + , + {"photo_id": 70641, "photo_title": "Lake Nakuru (Kenya)", "photo_url": "http://www.panoramio.com/photo/70641", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/70641.jpg", "longitude": 36.114979, "latitude": -0.324782, "width": 500, "height": 333, "upload_date": "25 October 2006", "owner_id": 8975, "owner_name": "Laura Sayalero", "owner_url": "http://www.panoramio.com/user/8975"} + , + {"photo_id": 766205, "photo_title": "posta sol porto colom", "photo_url": "http://www.panoramio.com/photo/766205", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/766205.jpg", "longitude": 3.264495, "latitude": 39.425093, "width": 500, "height": 335, "upload_date": "10 February 2007", "owner_id": 134682, "owner_name": "------ Cafate ------", "owner_url": "http://www.panoramio.com/user/134682"} + , + {"photo_id": 10662910, "photo_title": "Megvilágosodván", "photo_url": "http://www.panoramio.com/photo/10662910", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10662910.jpg", "longitude": 17.718544, "latitude": 47.460130, "width": 500, "height": 334, "upload_date": "27 May 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 8703547, "photo_title": "Lonely bike-rider", "photo_url": "http://www.panoramio.com/photo/8703547", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8703547.jpg", "longitude": 6.039004, "latitude": 52.208974, "width": 500, "height": 467, "upload_date": "21 March 2008", "owner_id": 523564, "owner_name": "Luud Riphagen", "owner_url": "http://www.panoramio.com/user/523564"} + , + {"photo_id": 11669907, "photo_title": "Alba sulle pale di San Martino", "photo_url": "http://www.panoramio.com/photo/11669907", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11669907.jpg", "longitude": 11.568518, "latitude": 46.345269, "width": 500, "height": 361, "upload_date": "30 June 2008", "owner_id": 6033, "owner_name": "► Marco Vanzo", "owner_url": "http://www.panoramio.com/user/6033"} + , + {"photo_id": 11403916, "photo_title": "Lonely", "photo_url": "http://www.panoramio.com/photo/11403916", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11403916.jpg", "longitude": 18.164520, "latitude": 46.345269, "width": 500, "height": 375, "upload_date": "21 June 2008", "owner_id": 328249, "owner_name": "v.zsoloo", "owner_url": "http://www.panoramio.com/user/328249"} + , + {"photo_id": 289803, "photo_title": "Rain Clouds", "photo_url": "http://www.panoramio.com/photo/289803", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/289803.jpg", "longitude": -57.733154, "latitude": -51.661908, "width": 500, "height": 335, "upload_date": "03 January 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 123413, "photo_title": "Paisaje cromático de Landmanalaugar", "photo_url": "http://www.panoramio.com/photo/123413", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/123413.jpg", "longitude": -19.085140, "latitude": 63.918285, "width": 500, "height": 332, "upload_date": "12 December 2006", "owner_id": 20549, "owner_name": "oscarvg", "owner_url": "http://www.panoramio.com/user/20549"} + , + {"photo_id": 595734, "photo_title": "Sphinx profile", "photo_url": "http://www.panoramio.com/photo/595734", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/595734.jpg", "longitude": 31.137791, "latitude": 29.975034, "width": 500, "height": 330, "upload_date": "27 January 2007", "owner_id": 124418, "owner_name": "Pierre-Jean Durieu", "owner_url": "http://www.panoramio.com/user/124418"} + , + {"photo_id": 3282726, "photo_title": "Shanghai - Inside the Jinmao Tower", "photo_url": "http://www.panoramio.com/photo/3282726", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3282726.jpg", "longitude": 121.501153, "latitude": 31.237519, "width": 500, "height": 335, "upload_date": "13 July 2007", "owner_id": 578163, "owner_name": "Margherita-Italy", "owner_url": "http://www.panoramio.com/user/578163"} + , + {"photo_id": 1346342, "photo_title": "nemrut", "photo_url": "http://www.panoramio.com/photo/1346342", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1346342.jpg", "longitude": 38.761826, "latitude": 38.042413, "width": 340, "height": 500, "upload_date": "16 March 2007", "owner_id": 2659, "owner_name": "ozalph", "owner_url": "http://www.panoramio.com/user/2659"} + , + {"photo_id": 151849, "photo_title": "panoramas photo @ the cross at Xin-Yi and Kee-Lung road ( my 2nd try )", "photo_url": "http://www.panoramio.com/photo/151849", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/151849.jpg", "longitude": 121.559209, "latitude": 25.033073, "width": 500, "height": 348, "upload_date": "15 December 2006", "owner_id": 27791, "owner_name": "Jerome Chen", "owner_url": "http://www.panoramio.com/user/27791"} + , + {"photo_id": 1212973, "photo_title": "Perhaps Neruda's View", "photo_url": "http://www.panoramio.com/photo/1212973", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1212973.jpg", "longitude": 14.398935, "latitude": 50.084752, "width": 500, "height": 333, "upload_date": "07 March 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 809789, "photo_title": "Pihike", "photo_url": "http://www.panoramio.com/photo/809789", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/809789.jpg", "longitude": 17.457018, "latitude": 47.881010, "width": 500, "height": 387, "upload_date": "13 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 88150, "photo_title": "Marmore Falls - Umbria - Italy", "photo_url": "http://www.panoramio.com/photo/88150", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/88150.jpg", "longitude": 12.716667, "latitude": 42.550000, "width": 375, "height": 500, "upload_date": "28 November 2006", "owner_id": 11098, "owner_name": "Michele Masnata", "owner_url": "http://www.panoramio.com/user/11098"} + , + {"photo_id": 624990, "photo_title": "Mélyrepülés", "photo_url": "http://www.panoramio.com/photo/624990", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/624990.jpg", "longitude": 17.455988, "latitude": 47.881931, "width": 500, "height": 288, "upload_date": "30 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 612449, "photo_title": "Rio de Janeiro - Vista do Corcovado ©G.Schüür", "photo_url": "http://www.panoramio.com/photo/612449", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/612449.jpg", "longitude": -43.210323, "latitude": -22.951463, "width": 500, "height": 400, "upload_date": "29 January 2007", "owner_id": 120756, "owner_name": "Germano Schüür", "owner_url": "http://www.panoramio.com/user/120756"} + , + {"photo_id": 1545313, "photo_title": "Tempestade", "photo_url": "http://www.panoramio.com/photo/1545313", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1545313.jpg", "longitude": -48.678703, "latitude": -26.643470, "width": 500, "height": 341, "upload_date": "29 March 2007", "owner_id": 160342, "owner_name": "Jakson Santos", "owner_url": "http://www.panoramio.com/user/160342"} + , + {"photo_id": 1595492, "photo_title": "Explosión Rosa", "photo_url": "http://www.panoramio.com/photo/1595492", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1595492.jpg", "longitude": -73.250393, "latitude": -39.813481, "width": 500, "height": 375, "upload_date": "02 April 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 5501284, "photo_title": "Da qui passano i sogni...", "photo_url": "http://www.panoramio.com/photo/5501284", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5501284.jpg", "longitude": 12.335930, "latitude": 45.435563, "width": 375, "height": 500, "upload_date": "23 October 2007", "owner_id": 325031, "owner_name": "Gibrail", "owner_url": "http://www.panoramio.com/user/325031"} + , + {"photo_id": 444265, "photo_title": "Cafe, Calle and Capitol of Cuba", "photo_url": "http://www.panoramio.com/photo/444265", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/444265.jpg", "longitude": -82.350453, "latitude": 23.136354, "width": 500, "height": 375, "upload_date": "15 January 2007", "owner_id": 57893, "owner_name": "ThoiryK", "owner_url": "http://www.panoramio.com/user/57893"} + , + {"photo_id": 9590, "photo_title": "South Street Seaport and Financial Center Skyline [007783]", "photo_url": "http://www.panoramio.com/photo/9590", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9590.jpg", "longitude": -74.001760, "latitude": 40.704937, "width": 500, "height": 375, "upload_date": "04 February 2006", "owner_id": 1489, "owner_name": "Thorsten", "owner_url": "http://www.panoramio.com/user/1489"} + , + {"photo_id": 204153, "photo_title": "Stormheimfjell and Hamperokken mountains near Brevikeidet ", "photo_url": "http://www.panoramio.com/photo/204153", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/204153.jpg", "longitude": 19.650421, "latitude": 69.668899, "width": 500, "height": 375, "upload_date": "21 December 2006", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 916095, "photo_title": "Before daybreak on Mount Etna (as seen from Piano Provenzana)", "photo_url": "http://www.panoramio.com/photo/916095", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/916095.jpg", "longitude": 15.038610, "latitude": 37.793881, "width": 500, "height": 375, "upload_date": "20 February 2007", "owner_id": 67714, "owner_name": "Robert Gulyas", "owner_url": "http://www.panoramio.com/user/67714"} + , + {"photo_id": 680320, "photo_title": "A severe storm approaches Nyngan, NSW www.ozthunder.com", "photo_url": "http://www.panoramio.com/photo/680320", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/680320.jpg", "longitude": 147.154312, "latitude": -31.563910, "width": 500, "height": 378, "upload_date": "04 February 2007", "owner_id": 67208, "owner_name": "Michael Thompson", "owner_url": "http://www.panoramio.com/user/67208"} + , + {"photo_id": 6018, "photo_title": "Jadrija - barke", "photo_url": "http://www.panoramio.com/photo/6018", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6018.jpg", "longitude": 15.841599, "latitude": 43.725026, "width": 500, "height": 176, "upload_date": "18 December 2005", "owner_id": 991, "owner_name": "Mario Marotti", "owner_url": "http://www.panoramio.com/user/991"} + , + {"photo_id": 36485, "photo_title": "Great Belt Bridge", "photo_url": "http://www.panoramio.com/photo/36485", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36485.jpg", "longitude": 11.029501, "latitude": 55.342130, "width": 500, "height": 332, "upload_date": "02 August 2006", "owner_id": 5703, "owner_name": "dancer", "owner_url": "http://www.panoramio.com/user/5703"} + , + {"photo_id": 19098, "photo_title": "Jökulsárlón", "photo_url": "http://www.panoramio.com/photo/19098", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/19098.jpg", "longitude": -16.355896, "latitude": 64.037351, "width": 500, "height": 333, "upload_date": "02 May 2006", "owner_id": 2885, "owner_name": "Luis Rodríguez Baena", "owner_url": "http://www.panoramio.com/user/2885"} + , + {"photo_id": 55458, "photo_title": "034 Troianisches Pferd", "photo_url": "http://www.panoramio.com/photo/55458", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/55458.jpg", "longitude": 26.240464, "latitude": 39.957188, "width": 375, "height": 500, "upload_date": "01 October 2006", "owner_id": 7633, "owner_name": "Daniel Meyer", "owner_url": "http://www.panoramio.com/user/7633"} + , + {"photo_id": 1800357, "photo_title": "Beach & Evening Light - Garrapata State Park Big Sur, CA", "photo_url": "http://www.panoramio.com/photo/1800357", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1800357.jpg", "longitude": -121.925915, "latitude": 36.455437, "width": 500, "height": 345, "upload_date": "16 April 2007", "owner_id": 107613, "owner_name": "Tom Grubbe", "owner_url": "http://www.panoramio.com/user/107613"} + , + {"photo_id": 1447086, "photo_title": "Odyssey", "photo_url": "http://www.panoramio.com/photo/1447086", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1447086.jpg", "longitude": 15.923395, "latitude": 43.589530, "width": 500, "height": 323, "upload_date": "22 March 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 10378421, "photo_title": "Red Bus", "photo_url": "http://www.panoramio.com/photo/10378421", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10378421.jpg", "longitude": -0.124497, "latitude": 51.500809, "width": 414, "height": 500, "upload_date": "19 May 2008", "owner_id": 325031, "owner_name": "Gibrail", "owner_url": "http://www.panoramio.com/user/325031"} + , + {"photo_id": 1087672, "photo_title": "És azután menydörgést hallottunk...", "photo_url": "http://www.panoramio.com/photo/1087672", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1087672.jpg", "longitude": 15.917473, "latitude": 43.590836, "width": 500, "height": 299, "upload_date": "28 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 74950, "photo_title": "高千穂", "photo_url": "http://www.panoramio.com/photo/74950", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/74950.jpg", "longitude": 131.019516, "latitude": 32.320504, "width": 500, "height": 375, "upload_date": "03 November 2006", "owner_id": 9556, "owner_name": "shigesato", "owner_url": "http://www.panoramio.com/user/9556"} + , + {"photo_id": 1749978, "photo_title": "Campos de Criptana", "photo_url": "http://www.panoramio.com/photo/1749978", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1749978.jpg", "longitude": -3.123207, "latitude": 39.409805, "width": 500, "height": 334, "upload_date": "12 April 2007", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 94171, "photo_title": "Matsumoto Castle", "photo_url": "http://www.panoramio.com/photo/94171", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/94171.jpg", "longitude": 137.967778, "latitude": 36.239194, "width": 408, "height": 500, "upload_date": "09 December 2006", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 2053084, "photo_title": "Blue lagoon, Melchior islands", "photo_url": "http://www.panoramio.com/photo/2053084", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2053084.jpg", "longitude": -62.830811, "latitude": -64.415921, "width": 500, "height": 336, "upload_date": "03 May 2007", "owner_id": 3316, "owner_name": "kristine hannon (www.traveltheglobe.be)", "owner_url": "http://www.panoramio.com/user/3316"} + , + {"photo_id": 86244, "photo_title": "Palmeras", "photo_url": "http://www.panoramio.com/photo/86244", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/86244.jpg", "longitude": -1.116829, "latitude": 37.930930, "width": 333, "height": 500, "upload_date": "25 November 2006", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 629489, "photo_title": "Hare in winter fur...beast of the Cave of Caerbannog.", "photo_url": "http://www.panoramio.com/photo/629489", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/629489.jpg", "longitude": -105.645390, "latitude": 40.296593, "width": 500, "height": 376, "upload_date": "31 January 2007", "owner_id": 87752, "owner_name": "Richard Ryer", "owner_url": "http://www.panoramio.com/user/87752"} + , + {"photo_id": 8459506, "photo_title": "Baltic sunrise in Kiel", "photo_url": "http://www.panoramio.com/photo/8459506", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8459506.jpg", "longitude": 10.169671, "latitude": 54.430970, "width": 500, "height": 375, "upload_date": "11 March 2008", "owner_id": 73946, "owner_name": "pembo", "owner_url": "http://www.panoramio.com/user/73946"} + , + {"photo_id": 36599, "photo_title": "ц Зачатия Анны на Углу", "photo_url": "http://www.panoramio.com/photo/36599", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36599.jpg", "longitude": 37.630963, "latitude": 55.750159, "width": 500, "height": 375, "upload_date": "03 August 2006", "owner_id": 5641, "owner_name": "sergey duhanin", "owner_url": "http://www.panoramio.com/user/5641"} + , + {"photo_id": 62716, "photo_title": "Amanecer en la Sauceda", "photo_url": "http://www.panoramio.com/photo/62716", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/62716.jpg", "longitude": -5.591730, "latitude": 36.521630, "width": 500, "height": 330, "upload_date": "15 October 2006", "owner_id": 473, "owner_name": "Juanlu", "owner_url": "http://www.panoramio.com/user/473"} + , + {"photo_id": 4709631, "photo_title": "The sun sets in the East....", "photo_url": "http://www.panoramio.com/photo/4709631", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4709631.jpg", "longitude": -112.624583, "latitude": 45.211038, "width": 500, "height": 375, "upload_date": "17 September 2007", "owner_id": 71099, "owner_name": "Eve in Montana", "owner_url": "http://www.panoramio.com/user/71099"} + , + {"photo_id": 11408203, "photo_title": "05-08-31_Paramo de MASA_PIXELECTA", "photo_url": "http://www.panoramio.com/photo/11408203", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11408203.jpg", "longitude": -3.536568, "latitude": 42.669357, "width": 500, "height": 375, "upload_date": "21 June 2008", "owner_id": 163655, "owner_name": "[[[ PIXELECTA ]]]", "owner_url": "http://www.panoramio.com/user/163655"} + , + {"photo_id": 416263, "photo_title": "Mt. Meeker at Dawn", "photo_url": "http://www.panoramio.com/photo/416263", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/416263.jpg", "longitude": -105.579643, "latitude": 40.270472, "width": 500, "height": 374, "upload_date": "13 January 2007", "owner_id": 87752, "owner_name": "Richard Ryer", "owner_url": "http://www.panoramio.com/user/87752"} + , + {"photo_id": 1289233, "photo_title": " High Dades", "photo_url": "http://www.panoramio.com/photo/1289233", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1289233.jpg", "longitude": -5.838375, "latitude": 31.652066, "width": 500, "height": 329, "upload_date": "12 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 1567767, "photo_title": "Rosina Lamberti - Sunset Templestowe, 31 March 2007", "photo_url": "http://www.panoramio.com/photo/1567767", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1567767.jpg", "longitude": 145.133858, "latitude": -37.765015, "width": 500, "height": 237, "upload_date": "31 March 2007", "owner_id": 140796, "owner_name": "rosina lamberti", "owner_url": "http://www.panoramio.com/user/140796"} + , + {"photo_id": 4130842, "photo_title": "Árvore Solar", "photo_url": "http://www.panoramio.com/photo/4130842", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4130842.jpg", "longitude": -51.830320, "latitude": -22.939424, "width": 427, "height": 500, "upload_date": "23 August 2007", "owner_id": 465654, "owner_name": "Carlos Sica", "owner_url": "http://www.panoramio.com/user/465654"} + , + {"photo_id": 340508, "photo_title": "Sunset from Camelback Mountain Echo Trail", "photo_url": "http://www.panoramio.com/photo/340508", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/340508.jpg", "longitude": -111.969969, "latitude": 33.520820, "width": 333, "height": 500, "upload_date": "08 January 2007", "owner_id": 45308, "owner_name": "Mike Cavaroc", "owner_url": "http://www.panoramio.com/user/45308"} + , + {"photo_id": 74792, "photo_title": "annapurna south", "photo_url": "http://www.panoramio.com/photo/74792", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/74792.jpg", "longitude": 83.804398, "latitude": 28.524813, "width": 500, "height": 334, "upload_date": "03 November 2006", "owner_id": 9812, "owner_name": "wsm earp", "owner_url": "http://www.panoramio.com/user/9812"} + , + {"photo_id": 4445995, "photo_title": "Ködvarázs", "photo_url": "http://www.panoramio.com/photo/4445995", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4445995.jpg", "longitude": 18.053970, "latitude": 47.276783, "width": 500, "height": 334, "upload_date": "06 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3032620, "photo_title": "Mira sin bueyes", "photo_url": "http://www.panoramio.com/photo/3032620", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3032620.jpg", "longitude": -8.802710, "latitude": 40.459324, "width": 500, "height": 327, "upload_date": "30 June 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 415533, "photo_title": "Manila Sunset", "photo_url": "http://www.panoramio.com/photo/415533", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/415533.jpg", "longitude": 120.984208, "latitude": 14.572339, "width": 333, "height": 500, "upload_date": "13 January 2007", "owner_id": 20398, "owner_name": "boerx", "owner_url": "http://www.panoramio.com/user/20398"} + , + {"photo_id": 723004, "photo_title": "Bouncing Light", "photo_url": "http://www.panoramio.com/photo/723004", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723004.jpg", "longitude": 25.379276, "latitude": 36.461468, "width": 500, "height": 332, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 2514494, "photo_title": "klatschmohn bis zum Horizont", "photo_url": "http://www.panoramio.com/photo/2514494", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2514494.jpg", "longitude": 12.025051, "latitude": 54.145244, "width": 500, "height": 334, "upload_date": "01 June 2007", "owner_id": 82603, "owner_name": "HelgeNug", "owner_url": "http://www.panoramio.com/user/82603"} + , + {"photo_id": 436289, "photo_title": "koaganogawa", "photo_url": "http://www.panoramio.com/photo/436289", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/436289.jpg", "longitude": 139.065456, "latitude": 37.831548, "width": 500, "height": 341, "upload_date": "15 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 73027, "photo_title": "Concourse, British Museum", "photo_url": "http://www.panoramio.com/photo/73027", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/73027.jpg", "longitude": -0.127201, "latitude": 51.519532, "width": 500, "height": 326, "upload_date": "29 October 2006", "owner_id": 1295, "owner_name": "Matthew Walters", "owner_url": "http://www.panoramio.com/user/1295"} + , + {"photo_id": 9766996, "photo_title": "Racetrack Playa", "photo_url": "http://www.panoramio.com/photo/9766996", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9766996.jpg", "longitude": -117.558091, "latitude": 36.664815, "width": 388, "height": 500, "upload_date": "29 April 2008", "owner_id": 308300, "owner_name": "Tony R Immoos", "owner_url": "http://www.panoramio.com/user/308300"} + , + {"photo_id": 1455193, "photo_title": "Вулкан Карымский, со склона вулкана Малый Семячик", "photo_url": "http://www.panoramio.com/photo/1455193", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1455193.jpg", "longitude": 159.626970, "latitude": 54.133227, "width": 500, "height": 345, "upload_date": "23 March 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 1234797, "photo_title": "Sahalie Falls, Mckenzie River", "photo_url": "http://www.panoramio.com/photo/1234797", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1234797.jpg", "longitude": -121.997187, "latitude": 44.348769, "width": 500, "height": 420, "upload_date": "09 March 2007", "owner_id": 128746, "owner_name": "© Michael Hatten", "owner_url": "http://www.panoramio.com/user/128746"} + , + {"photo_id": 3989102, "photo_title": "El Gran Miércoles", "photo_url": "http://www.panoramio.com/photo/3989102", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3989102.jpg", "longitude": -17.991056, "latitude": 27.797638, "width": 500, "height": 375, "upload_date": "17 August 2007", "owner_id": 787217, "owner_name": "♣ Víctor S de Lara ♣", "owner_url": "http://www.panoramio.com/user/787217"} + , + {"photo_id": 85625, "photo_title": "Cañón de Valdeinfiernos", "photo_url": "http://www.panoramio.com/photo/85625", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/85625.jpg", "longitude": -1.961060, "latitude": 37.801511, "width": 333, "height": 500, "upload_date": "24 November 2006", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 4558716, "photo_title": "Corsica - West Coast", "photo_url": "http://www.panoramio.com/photo/4558716", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4558716.jpg", "longitude": 8.655338, "latitude": 42.253108, "width": 500, "height": 341, "upload_date": "10 September 2007", "owner_id": 49870, "owner_name": "Jean-Michel Raggioli", "owner_url": "http://www.panoramio.com/user/49870"} + , + {"photo_id": 3201916, "photo_title": "Mönch", "photo_url": "http://www.panoramio.com/photo/3201916", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3201916.jpg", "longitude": 7.640026, "latitude": 46.745537, "width": 500, "height": 374, "upload_date": "09 July 2007", "owner_id": 635422, "owner_name": "♫ Swissmay", "owner_url": "http://www.panoramio.com/user/635422"} + , + {"photo_id": 4365440, "photo_title": "a piece of wood", "photo_url": "http://www.panoramio.com/photo/4365440", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4365440.jpg", "longitude": -1.254158, "latitude": 44.480463, "width": 221, "height": 500, "upload_date": "03 September 2007", "owner_id": 521836, "owner_name": "KLEFER", "owner_url": "http://www.panoramio.com/user/521836"} + , + {"photo_id": 124545, "photo_title": "66_St-Cyp_vagues_01", "photo_url": "http://www.panoramio.com/photo/124545", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/124545.jpg", "longitude": 3.037736, "latitude": 42.623436, "width": 500, "height": 333, "upload_date": "12 December 2006", "owner_id": 18696, "owner_name": "Besnard", "owner_url": "http://www.panoramio.com/user/18696"} + , + {"photo_id": 65666, "photo_title": "Barco fantasma", "photo_url": "http://www.panoramio.com/photo/65666", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/65666.jpg", "longitude": -14.179380, "latitude": 28.344878, "width": 500, "height": 375, "upload_date": "18 October 2006", "owner_id": 8658, "owner_name": "Canarina", "owner_url": "http://www.panoramio.com/user/8658"} + , + {"photo_id": 573064, "photo_title": "Looking west across Isfjorden", "photo_url": "http://www.panoramio.com/photo/573064", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/573064.jpg", "longitude": 7.681332, "latitude": 62.558395, "width": 500, "height": 332, "upload_date": "26 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 859786, "photo_title": "Aurora Borealis, Andøya, Vesterålen, Norway", "photo_url": "http://www.panoramio.com/photo/859786", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/859786.jpg", "longitude": 15.605392, "latitude": 69.118548, "width": 500, "height": 377, "upload_date": "17 February 2007", "owner_id": 66734, "owner_name": "Svein Solhaug", "owner_url": "http://www.panoramio.com/user/66734"} + , + {"photo_id": 507024, "photo_title": "Agrárcolorgeometria", "photo_url": "http://www.panoramio.com/photo/507024", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507024.jpg", "longitude": 18.014488, "latitude": 47.316017, "width": 500, "height": 300, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 6665111, "photo_title": "Coucher du soleil depuis les Crêts", "photo_url": "http://www.panoramio.com/photo/6665111", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6665111.jpg", "longitude": 6.172214, "latitude": 46.129129, "width": 500, "height": 375, "upload_date": "24 December 2007", "owner_id": 359127, "owner_name": "wx", "owner_url": "http://www.panoramio.com/user/359127"} + , + {"photo_id": 679331, "photo_title": "wentworth falls", "photo_url": "http://www.panoramio.com/photo/679331", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/679331.jpg", "longitude": 150.371124, "latitude": -33.727111, "width": 498, "height": 500, "upload_date": "04 February 2007", "owner_id": 146092, "owner_name": "sid1662", "owner_url": "http://www.panoramio.com/user/146092"} + , + {"photo_id": 459436, "photo_title": "aikawa", "photo_url": "http://www.panoramio.com/photo/459436", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459436.jpg", "longitude": 138.234701, "latitude": 37.998936, "width": 500, "height": 341, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 31662, "photo_title": "NY_7_GE", "photo_url": "http://www.panoramio.com/photo/31662", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/31662.jpg", "longitude": -73.977041, "latitude": 40.761528, "width": 452, "height": 500, "upload_date": "11 July 2006", "owner_id": 4657, "owner_name": "Giuseppe Grande", "owner_url": "http://www.panoramio.com/user/4657"} + , + {"photo_id": 1488304, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/1488304", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1488304.jpg", "longitude": 138.135223, "latitude": 36.848719, "width": 383, "height": 500, "upload_date": "25 March 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 181939, "photo_title": "The Eiffel Tower, Paris", "photo_url": "http://www.panoramio.com/photo/181939", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/181939.jpg", "longitude": 2.288718, "latitude": 48.861920, "width": 384, "height": 500, "upload_date": "18 December 2006", "owner_id": 12954, "owner_name": "Ziębol", "owner_url": "http://www.panoramio.com/user/12954"} + , + {"photo_id": 2422198, "photo_title": "In the Pine's Shade", "photo_url": "http://www.panoramio.com/photo/2422198", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2422198.jpg", "longitude": -112.393484, "latitude": 44.580075, "width": 500, "height": 333, "upload_date": "27 May 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 2363576, "photo_title": "Cienfuegos Yacht Club", "photo_url": "http://www.panoramio.com/photo/2363576", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2363576.jpg", "longitude": -80.450901, "latitude": 22.126499, "width": 500, "height": 306, "upload_date": "23 May 2007", "owner_id": 2575, "owner_name": "mikel ortega", "owner_url": "http://www.panoramio.com/user/2575"} + , + {"photo_id": 58296, "photo_title": "Liechtensteinklamm 2", "photo_url": "http://www.panoramio.com/photo/58296", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58296.jpg", "longitude": 13.190546, "latitude": 47.310140, "width": 333, "height": 500, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 507328, "photo_title": "Pillantás a hídról", "photo_url": "http://www.panoramio.com/photo/507328", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/507328.jpg", "longitude": 17.629859, "latitude": 47.687102, "width": 500, "height": 334, "upload_date": "20 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 468161, "photo_title": "Honfleur", "photo_url": "http://www.panoramio.com/photo/468161", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/468161.jpg", "longitude": 0.234833, "latitude": 49.421806, "width": 500, "height": 350, "upload_date": "17 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 2521031, "photo_title": "Derűs délután", "photo_url": "http://www.panoramio.com/photo/2521031", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2521031.jpg", "longitude": 17.523537, "latitude": 47.751790, "width": 380, "height": 500, "upload_date": "02 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 934105, "photo_title": "Times Square", "photo_url": "http://www.panoramio.com/photo/934105", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/934105.jpg", "longitude": -73.986762, "latitude": 40.756652, "width": 375, "height": 500, "upload_date": "21 February 2007", "owner_id": 123698, "owner_name": "© Kojak", "owner_url": "http://www.panoramio.com/user/123698"} + , + {"photo_id": 57824, "photo_title": "Hallstatt 3", "photo_url": "http://www.panoramio.com/photo/57824", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57824.jpg", "longitude": 13.642616, "latitude": 47.556372, "width": 500, "height": 333, "upload_date": "05 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 1370861, "photo_title": "Wanganui Sunrise", "photo_url": "http://www.panoramio.com/photo/1370861", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1370861.jpg", "longitude": 175.053218, "latitude": -39.927193, "width": 500, "height": 400, "upload_date": "17 March 2007", "owner_id": 286729, "owner_name": "jimwitkowski", "owner_url": "http://www.panoramio.com/user/286729"} + , + {"photo_id": 4823023, "photo_title": "Cielo en llamas ( Sky on fire )", "photo_url": "http://www.panoramio.com/photo/4823023", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4823023.jpg", "longitude": -0.471725, "latitude": 39.601588, "width": 500, "height": 375, "upload_date": "22 September 2007", "owner_id": 787217, "owner_name": "♣ Víctor S de Lara ♣", "owner_url": "http://www.panoramio.com/user/787217"} + , + {"photo_id": 520945, "photo_title": "Estvarázs", "photo_url": "http://www.panoramio.com/photo/520945", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/520945.jpg", "longitude": 17.627692, "latitude": 47.665156, "width": 500, "height": 334, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 818423, "photo_title": "Karst Countryside in Guangxi, China", "photo_url": "http://www.panoramio.com/photo/818423", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/818423.jpg", "longitude": 106.953964, "latitude": 22.716023, "width": 500, "height": 206, "upload_date": "14 February 2007", "owner_id": 164125, "owner_name": "DannyXu", "owner_url": "http://www.panoramio.com/user/164125"} + , + {"photo_id": 532730, "photo_title": "Nightfall and fog at lake Helgeren", "photo_url": "http://www.panoramio.com/photo/532730", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/532730.jpg", "longitude": 10.708923, "latitude": 60.074348, "width": 419, "height": 500, "upload_date": "22 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 650237, "photo_title": "Aruba, Eagle Beach, Divi Divi Tree", "photo_url": "http://www.panoramio.com/photo/650237", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/650237.jpg", "longitude": -70.055099, "latitude": 12.555003, "width": 500, "height": 375, "upload_date": "01 February 2007", "owner_id": 136446, "owner_name": "© Wim", "owner_url": "http://www.panoramio.com/user/136446"} + , + {"photo_id": 2414590, "photo_title": "Egy csendes estén", "photo_url": "http://www.panoramio.com/photo/2414590", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2414590.jpg", "longitude": 17.626448, "latitude": 47.662613, "width": 500, "height": 334, "upload_date": "27 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 10544520, "photo_title": "Plansee", "photo_url": "http://www.panoramio.com/photo/10544520", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10544520.jpg", "longitude": 10.799389, "latitude": 47.473011, "width": 500, "height": 242, "upload_date": "24 May 2008", "owner_id": 634000, "owner_name": "© Massimo De Candido", "owner_url": "http://www.panoramio.com/user/634000"} + , + {"photo_id": 11341211, "photo_title": "AMAPOLAS AL SOL", "photo_url": "http://www.panoramio.com/photo/11341211", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11341211.jpg", "longitude": -1.995735, "latitude": 42.471844, "width": 500, "height": 374, "upload_date": "19 June 2008", "owner_id": 1487989, "owner_name": "mesias", "owner_url": "http://www.panoramio.com/user/1487989"} + , + {"photo_id": 134748, "photo_title": "20060813_9795_raw", "photo_url": "http://www.panoramio.com/photo/134748", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/134748.jpg", "longitude": 30.452921, "latitude": 50.358700, "width": 500, "height": 333, "upload_date": "13 December 2006", "owner_id": 17090, "owner_name": "Pavel Danko", "owner_url": "http://www.panoramio.com/user/17090"} + , + {"photo_id": 66816, "photo_title": "desierto cerca de Tolar Grande", "photo_url": "http://www.panoramio.com/photo/66816", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/66816.jpg", "longitude": -67.394257, "latitude": -24.584593, "width": 374, "height": 500, "upload_date": "19 October 2006", "owner_id": 9080, "owner_name": "Marco Teodonio", "owner_url": "http://www.panoramio.com/user/9080"} + , + {"photo_id": 70148, "photo_title": "Grotto Azure, Capris: The cave is lit by light refracting through the water.", "photo_url": "http://www.panoramio.com/photo/70148", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/70148.jpg", "longitude": 14.203262, "latitude": 40.560895, "width": 500, "height": 375, "upload_date": "25 October 2006", "owner_id": 1634, "owner_name": "Rick Guthrie", "owner_url": "http://www.panoramio.com/user/1634"} + , + {"photo_id": 1409801, "photo_title": "Hedges, Aerial", "photo_url": "http://www.panoramio.com/photo/1409801", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1409801.jpg", "longitude": 9.027843, "latitude": 56.130772, "width": 332, "height": 500, "upload_date": "20 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 840971, "photo_title": "Upper Thracian Lowlands", "photo_url": "http://www.panoramio.com/photo/840971", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/840971.jpg", "longitude": 26.364269, "latitude": 42.717759, "width": 500, "height": 400, "upload_date": "16 February 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 9557772, "photo_title": "Le Shan Giant Buddha Statue - Geotagged April 08 Photo Contest Heritage Category Honorable Mentions", "photo_url": "http://www.panoramio.com/photo/9557772", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9557772.jpg", "longitude": 103.769115, "latitude": 29.547084, "width": 375, "height": 500, "upload_date": "20 April 2008", "owner_id": 964751, "owner_name": "jymsn123", "owner_url": "http://www.panoramio.com/user/964751"} + , + {"photo_id": 4716049, "photo_title": "Sol-edad", "photo_url": "http://www.panoramio.com/photo/4716049", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4716049.jpg", "longitude": -73.228008, "latitude": -39.820720, "width": 366, "height": 500, "upload_date": "17 September 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 1419283, "photo_title": "Sunset in Boka", "photo_url": "http://www.panoramio.com/photo/1419283", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1419283.jpg", "longitude": 18.703022, "latitude": 42.479883, "width": 500, "height": 375, "upload_date": "20 March 2007", "owner_id": 239453, "owner_name": "Šovran Nikša", "owner_url": "http://www.panoramio.com/user/239453"} + , + {"photo_id": 3507222, "photo_title": "The sheperd of the Glen", "photo_url": "http://www.panoramio.com/photo/3507222", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3507222.jpg", "longitude": -4.840164, "latitude": 56.641504, "width": 500, "height": 334, "upload_date": "24 July 2007", "owner_id": 599676, "owner_name": "mossip", "owner_url": "http://www.panoramio.com/user/599676"} + , + {"photo_id": 3521820, "photo_title": "Utolsó pillantás", "photo_url": "http://www.panoramio.com/photo/3521820", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3521820.jpg", "longitude": 17.809353, "latitude": 47.528097, "width": 500, "height": 334, "upload_date": "25 July 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 521264, "photo_title": "Felhőátvonulás", "photo_url": "http://www.panoramio.com/photo/521264", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/521264.jpg", "longitude": 17.760429, "latitude": 47.555329, "width": 500, "height": 280, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 636723, "photo_title": "ASZFALTOZÓK", "photo_url": "http://www.panoramio.com/photo/636723", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/636723.jpg", "longitude": 19.038105, "latitude": 47.520041, "width": 500, "height": 318, "upload_date": "31 January 2007", "owner_id": 137538, "owner_name": "BALÁS ISTVÁN", "owner_url": "http://www.panoramio.com/user/137538"} + , + {"photo_id": 153144, "photo_title": "cierny_vah01", "photo_url": "http://www.panoramio.com/photo/153144", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/153144.jpg", "longitude": 19.907227, "latitude": 49.020084, "width": 500, "height": 332, "upload_date": "15 December 2006", "owner_id": 28092, "owner_name": "Design d15", "owner_url": "http://www.panoramio.com/user/28092"} + , + {"photo_id": 7485246, "photo_title": "Túl mindenen", "photo_url": "http://www.panoramio.com/photo/7485246", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7485246.jpg", "longitude": 17.624259, "latitude": 47.662092, "width": 500, "height": 334, "upload_date": "31 January 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4884030, "photo_title": "A Cloud is Born", "photo_url": "http://www.panoramio.com/photo/4884030", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4884030.jpg", "longitude": -119.631693, "latitude": 37.724208, "width": 333, "height": 500, "upload_date": "24 September 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 6126146, "photo_title": "North Weald Park", "photo_url": "http://www.panoramio.com/photo/6126146", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6126146.jpg", "longitude": 0.264530, "latitude": 51.624631, "width": 500, "height": 333, "upload_date": "25 November 2007", "owner_id": 1130880, "owner_name": "marksimms", "owner_url": "http://www.panoramio.com/user/1130880"} + , + {"photo_id": 438342, "photo_title": "Sunrise in Sierra Nevada", "photo_url": "http://www.panoramio.com/photo/438342", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/438342.jpg", "longitude": -119.225607, "latitude": 37.945213, "width": 500, "height": 318, "upload_date": "15 January 2007", "owner_id": 93560, "owner_name": "Alex Petrov", "owner_url": "http://www.panoramio.com/user/93560"} + , + {"photo_id": 91978, "photo_title": "Dubrovnik (Croatia)", "photo_url": "http://www.panoramio.com/photo/91978", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/91978.jpg", "longitude": 18.108457, "latitude": 42.642909, "width": 500, "height": 375, "upload_date": "04 December 2006", "owner_id": 11403, "owner_name": "Arnáiz", "owner_url": "http://www.panoramio.com/user/11403"} + , + {"photo_id": 10816587, "photo_title": "Cementiri de Carcassonne", "photo_url": "http://www.panoramio.com/photo/10816587", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10816587.jpg", "longitude": 2.365751, "latitude": 43.205551, "width": 500, "height": 333, "upload_date": "01 June 2008", "owner_id": 599233, "owner_name": "SílviaPrats", "owner_url": "http://www.panoramio.com/user/599233"} + , + {"photo_id": 292943, "photo_title": "Aekingerzand", "photo_url": "http://www.panoramio.com/photo/292943", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/292943.jpg", "longitude": 6.296024, "latitude": 52.935293, "width": 500, "height": 333, "upload_date": "03 January 2007", "owner_id": 62613, "owner_name": "erik van den Ham", "owner_url": "http://www.panoramio.com/user/62613"} + , + {"photo_id": 4696655, "photo_title": "Old boat", "photo_url": "http://www.panoramio.com/photo/4696655", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4696655.jpg", "longitude": 27.399902, "latitude": 42.414079, "width": 500, "height": 357, "upload_date": "16 September 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 348752, "photo_title": "_Cariniana legalis_ (Lecythidaceae), Santa Rita do Passa Quatro, SP,Brasil", "photo_url": "http://www.panoramio.com/photo/348752", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/348752.jpg", "longitude": -47.618523, "latitude": -21.691885, "width": 500, "height": 375, "upload_date": "08 January 2007", "owner_id": 56214, "owner_name": "Vinícius Antonio de Oliveira Dittrich", "owner_url": "http://www.panoramio.com/user/56214"} + , + {"photo_id": 3724631, "photo_title": "Abbazia di Chiaravalle in un'alba nebbiosa", "photo_url": "http://www.panoramio.com/photo/3724631", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3724631.jpg", "longitude": 9.201404, "latitude": 45.424284, "width": 500, "height": 375, "upload_date": "04 August 2007", "owner_id": 732643, "owner_name": "La Mugna", "owner_url": "http://www.panoramio.com/user/732643"} + , + {"photo_id": 405853, "photo_title": "oyasirazu", "photo_url": "http://www.panoramio.com/photo/405853", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405853.jpg", "longitude": 137.747955, "latitude": 37.009133, "width": 500, "height": 384, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1192286, "photo_title": "Ojos del mar - 1", "photo_url": "http://www.panoramio.com/photo/1192286", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1192286.jpg", "longitude": -67.369022, "latitude": -24.630634, "width": 500, "height": 337, "upload_date": "06 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 589411, "photo_title": "Sunset, London, UK.", "photo_url": "http://www.panoramio.com/photo/589411", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/589411.jpg", "longitude": -0.123596, "latitude": 51.500942, "width": 500, "height": 346, "upload_date": "27 January 2007", "owner_id": 44319, "owner_name": "André Bonacin", "owner_url": "http://www.panoramio.com/user/44319"} + , + {"photo_id": 7586406, "photo_title": "Sol naciente en Villarrica", "photo_url": "http://www.panoramio.com/photo/7586406", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7586406.jpg", "longitude": -72.219400, "latitude": -39.289273, "width": 500, "height": 375, "upload_date": "04 February 2008", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 621, "photo_title": "Cape Drastis / Corfu", "photo_url": "http://www.panoramio.com/photo/621", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/621.jpg", "longitude": 19.701061, "latitude": 39.795744, "width": 500, "height": 375, "upload_date": "27 September 2005", "owner_id": 30, "owner_name": "eSHa", "owner_url": "http://www.panoramio.com/user/30"} + , + {"photo_id": 2379636, "photo_title": "Detail from the valley below Holmbukttind", "photo_url": "http://www.panoramio.com/photo/2379636", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2379636.jpg", "longitude": 19.781570, "latitude": 69.476339, "width": 500, "height": 375, "upload_date": "24 May 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 5725557, "photo_title": "Kardzhali lake - Panorama", "photo_url": "http://www.panoramio.com/photo/5725557", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5725557.jpg", "longitude": 25.242250, "latitude": 41.668667, "width": 500, "height": 187, "upload_date": "05 November 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 22393, "photo_title": "View from Bosphorus Bridge", "photo_url": "http://www.panoramio.com/photo/22393", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/22393.jpg", "longitude": 28.999443, "latitude": 41.027053, "width": 500, "height": 355, "upload_date": "04 June 2006", "owner_id": 3504, "owner_name": "zeytinbass", "owner_url": "http://www.panoramio.com/user/3504"} + , + {"photo_id": 5611129, "photo_title": "Torrent de Pareis - Sa Calobra (Mallorca)", "photo_url": "http://www.panoramio.com/photo/5611129", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5611129.jpg", "longitude": 2.807093, "latitude": 39.851709, "width": 500, "height": 373, "upload_date": "29 October 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 3457918, "photo_title": "Walk of Venus", "photo_url": "http://www.panoramio.com/photo/3457918", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3457918.jpg", "longitude": 14.721851, "latitude": 44.838891, "width": 500, "height": 367, "upload_date": "22 July 2007", "owner_id": 346103, "owner_name": "lacitot", "owner_url": "http://www.panoramio.com/user/346103"} + , + {"photo_id": 21135, "photo_title": "icebergs in the Channel", "photo_url": "http://www.panoramio.com/photo/21135", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/21135.jpg", "longitude": -63.017578, "latitude": -64.774125, "width": 500, "height": 338, "upload_date": "24 May 2006", "owner_id": 3316, "owner_name": "kristine hannon (www.traveltheglobe.be)", "owner_url": "http://www.panoramio.com/user/3316"} + , + {"photo_id": 1288597, "photo_title": "Gift", "photo_url": "http://www.panoramio.com/photo/1288597", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1288597.jpg", "longitude": 72.920036, "latitude": 4.038077, "width": 337, "height": 500, "upload_date": "12 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 708502, "photo_title": "A single skier from Gogsøyra tw Litjskjorta mountain", "photo_url": "http://www.panoramio.com/photo/708502", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/708502.jpg", "longitude": 8.160782, "latitude": 62.645604, "width": 424, "height": 500, "upload_date": "05 February 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 4386456, "photo_title": "good bye", "photo_url": "http://www.panoramio.com/photo/4386456", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4386456.jpg", "longitude": -1.254845, "latitude": 44.463191, "width": 500, "height": 405, "upload_date": "04 September 2007", "owner_id": 521836, "owner_name": "KLEFER", "owner_url": "http://www.panoramio.com/user/521836"} + , + {"photo_id": 902303, "photo_title": "Kék", "photo_url": "http://www.panoramio.com/photo/902303", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/902303.jpg", "longitude": 17.941017, "latitude": 47.650703, "width": 334, "height": 500, "upload_date": "19 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3660960, "photo_title": "Angkor - Ta Prohm IV", "photo_url": "http://www.panoramio.com/photo/3660960", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3660960.jpg", "longitude": 103.890334, "latitude": 13.435028, "width": 338, "height": 500, "upload_date": "01 August 2007", "owner_id": 73104, "owner_name": "zerega", "owner_url": "http://www.panoramio.com/user/73104"} + , + {"photo_id": 902570, "photo_title": "Tavitündér", "photo_url": "http://www.panoramio.com/photo/902570", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/902570.jpg", "longitude": 17.468948, "latitude": 47.871914, "width": 500, "height": 345, "upload_date": "19 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 2521005, "photo_title": "Megvilágosodás elött", "photo_url": "http://www.panoramio.com/photo/2521005", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2521005.jpg", "longitude": 17.515984, "latitude": 47.743825, "width": 500, "height": 286, "upload_date": "02 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 586159, "photo_title": "Central Park", "photo_url": "http://www.panoramio.com/photo/586159", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/586159.jpg", "longitude": -73.971816, "latitude": 40.775789, "width": 500, "height": 375, "upload_date": "27 January 2007", "owner_id": 123698, "owner_name": "© Kojak", "owner_url": "http://www.panoramio.com/user/123698"} + , + {"photo_id": 23475, "photo_title": "Good Morning", "photo_url": "http://www.panoramio.com/photo/23475", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/23475.jpg", "longitude": -28.210895, "latitude": 38.680351, "width": 500, "height": 375, "upload_date": "11 June 2006", "owner_id": 3760, "owner_name": "Frank Pustlauck", "owner_url": "http://www.panoramio.com/user/3760"} + , + {"photo_id": 1006005, "photo_title": "04-09-07_\"La Nube Sangrante\"_017_PIXELECTA", "photo_url": "http://www.panoramio.com/photo/1006005", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1006005.jpg", "longitude": -0.896330, "latitude": 41.738016, "width": 500, "height": 375, "upload_date": "24 February 2007", "owner_id": 163655, "owner_name": "[[[ PIXELECTA ]]]", "owner_url": "http://www.panoramio.com/user/163655"} + , + {"photo_id": 3473597, "photo_title": "Sails in the sunset", "photo_url": "http://www.panoramio.com/photo/3473597", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3473597.jpg", "longitude": -87.173424, "latitude": 45.158317, "width": 500, "height": 375, "upload_date": "22 July 2007", "owner_id": 555551, "owner_name": "Marilyn Whiteley", "owner_url": "http://www.panoramio.com/user/555551"} + , + {"photo_id": 3809992, "photo_title": "Długie Pobrzeże latem/ Las casas narcisistas que se pasan el día mirándose en el espejo del agua - gracias Arturo García!", "photo_url": "http://www.panoramio.com/photo/3809992", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3809992.jpg", "longitude": 18.658776, "latitude": 54.350679, "width": 500, "height": 375, "upload_date": "08 August 2007", "owner_id": 277750, "owner_name": "Karolina P.", "owner_url": "http://www.panoramio.com/user/277750"} + , + {"photo_id": 2280401, "photo_title": "Hetyke-egyke", "photo_url": "http://www.panoramio.com/photo/2280401", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2280401.jpg", "longitude": 17.829094, "latitude": 47.206508, "width": 500, "height": 308, "upload_date": "18 May 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 290772, "photo_title": "Tormenta Bahía de Pollensa", "photo_url": "http://www.panoramio.com/photo/290772", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/290772.jpg", "longitude": 3.116437, "latitude": 39.928440, "width": 500, "height": 335, "upload_date": "03 January 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 57822, "photo_title": "Maria Alm - Pfarrkirche", "photo_url": "http://www.panoramio.com/photo/57822", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/57822.jpg", "longitude": 12.903442, "latitude": 47.407877, "width": 346, "height": 500, "upload_date": "05 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 516322, "photo_title": "A völgy", "photo_url": "http://www.panoramio.com/photo/516322", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/516322.jpg", "longitude": 17.774162, "latitude": 47.292504, "width": 338, "height": 500, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 12271085, "photo_title": "Ein Bild für meine Freunde", "photo_url": "http://www.panoramio.com/photo/12271085", "photo_file_url": "http://static2.bareka.com/photos/medium/12271085.jpg", "longitude": 9.284134, "latitude": 51.510933, "width": 500, "height": 333, "upload_date": "19 July 2008", "owner_id": 497213, "owner_name": "UlrichSchnuerer", "owner_url": "http://www.panoramio.com/user/497213"} + , + {"photo_id": 5050864, "photo_title": "Álmok útján", "photo_url": "http://www.panoramio.com/photo/5050864", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5050864.jpg", "longitude": 12.333773, "latitude": 45.436466, "width": 500, "height": 354, "upload_date": "02 October 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 617461, "photo_title": "Miravet", "photo_url": "http://www.panoramio.com/photo/617461", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/617461.jpg", "longitude": 0.593348, "latitude": 41.035568, "width": 500, "height": 334, "upload_date": "29 January 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 2689526, "photo_title": "Égszakadás", "photo_url": "http://www.panoramio.com/photo/2689526", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2689526.jpg", "longitude": 17.503624, "latitude": 47.749481, "width": 500, "height": 325, "upload_date": "11 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 38135, "photo_title": "Amanecer en el sur", "photo_url": "http://www.panoramio.com/photo/38135", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/38135.jpg", "longitude": -64.983333, "latitude": -31.900000, "width": 500, "height": 375, "upload_date": "11 August 2006", "owner_id": 4483, "owner_name": "Miguel Coranti", "owner_url": "http://www.panoramio.com/user/4483"} + , + {"photo_id": 1087737, "photo_title": "Szeles nyárelő", "photo_url": "http://www.panoramio.com/photo/1087737", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1087737.jpg", "longitude": 17.605934, "latitude": 47.603154, "width": 500, "height": 333, "upload_date": "28 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 8411394, "photo_title": "Dead Vlei", "photo_url": "http://www.panoramio.com/photo/8411394", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8411394.jpg", "longitude": 15.295715, "latitude": -24.764914, "width": 500, "height": 341, "upload_date": "09 March 2008", "owner_id": 1204358, "owner_name": "aldenc", "owner_url": "http://www.panoramio.com/user/1204358"} + , + {"photo_id": 8491464, "photo_title": "Horsetail Falls on El Capitan", "photo_url": "http://www.panoramio.com/photo/8491464", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8491464.jpg", "longitude": -119.623947, "latitude": 37.723512, "width": 357, "height": 500, "upload_date": "12 March 2008", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 58134, "photo_title": "Chateaux Lake Louise from the head of the lake", "photo_url": "http://www.panoramio.com/photo/58134", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58134.jpg", "longitude": -116.239901, "latitude": 51.407291, "width": 500, "height": 375, "upload_date": "06 October 2006", "owner_id": 8118, "owner_name": "Michael Gerstmann", "owner_url": "http://www.panoramio.com/user/8118"} + , + {"photo_id": 11237087, "photo_title": " Ein Strand zum träumen", "photo_url": "http://www.panoramio.com/photo/11237087", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11237087.jpg", "longitude": 15.914984, "latitude": 38.683366, "width": 500, "height": 294, "upload_date": "15 June 2008", "owner_id": 1400529, "owner_name": "marita1004", "owner_url": "http://www.panoramio.com/user/1400529"} + , + {"photo_id": 8384850, "photo_title": "Winter has gone", "photo_url": "http://www.panoramio.com/photo/8384850", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8384850.jpg", "longitude": 12.428112, "latitude": 49.084351, "width": 500, "height": 333, "upload_date": "08 March 2008", "owner_id": 696605, "owner_name": "© alfredschaffer", "owner_url": "http://www.panoramio.com/user/696605"} + , + {"photo_id": 3947779, "photo_title": "Mont-Saint-Michel floating in water", "photo_url": "http://www.panoramio.com/photo/3947779", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3947779.jpg", "longitude": -1.508625, "latitude": 48.634561, "width": 500, "height": 335, "upload_date": "15 August 2007", "owner_id": 57893, "owner_name": "ThoiryK", "owner_url": "http://www.panoramio.com/user/57893"} + , + {"photo_id": 1069321, "photo_title": "The old Temple N2", "photo_url": "http://www.panoramio.com/photo/1069321", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1069321.jpg", "longitude": 37.426300, "latitude": 56.370622, "width": 500, "height": 333, "upload_date": "27 February 2007", "owner_id": 212477, "owner_name": "Cherepanov Timofey", "owner_url": "http://www.panoramio.com/user/212477"} + , + {"photo_id": 5756689, "photo_title": "Tokyo Metropolitan Government", "photo_url": "http://www.panoramio.com/photo/5756689", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5756689.jpg", "longitude": 139.690722, "latitude": 35.689906, "width": 500, "height": 339, "upload_date": "06 November 2007", "owner_id": 558055, "owner_name": "www.tokyoform.com", "owner_url": "http://www.panoramio.com/user/558055"} + , + {"photo_id": 1599763, "photo_title": "Atomium", "photo_url": "http://www.panoramio.com/photo/1599763", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1599763.jpg", "longitude": 4.341531, "latitude": 50.894805, "width": 500, "height": 375, "upload_date": "02 April 2007", "owner_id": 18137, "owner_name": "digitaler lumpensammler", "owner_url": "http://www.panoramio.com/user/18137"} + , + {"photo_id": 516375, "photo_title": "A zöld folyó", "photo_url": "http://www.panoramio.com/photo/516375", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/516375.jpg", "longitude": 17.724895, "latitude": 46.297137, "width": 369, "height": 500, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1538329, "photo_title": "View east from Empire State Building by night", "photo_url": "http://www.panoramio.com/photo/1538329", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1538329.jpg", "longitude": -73.986332, "latitude": 40.748346, "width": 500, "height": 332, "upload_date": "28 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 1838875, "photo_title": "Modern art in Mainz", "photo_url": "http://www.panoramio.com/photo/1838875", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1838875.jpg", "longitude": 8.276659, "latitude": 50.001071, "width": 500, "height": 393, "upload_date": "19 April 2007", "owner_id": 12954, "owner_name": "Ziębol", "owner_url": "http://www.panoramio.com/user/12954"} + , + {"photo_id": 4740891, "photo_title": "The golden path - Az aranyozott ösvény", "photo_url": "http://www.panoramio.com/photo/4740891", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4740891.jpg", "longitude": 17.599239, "latitude": 47.639948, "width": 500, "height": 334, "upload_date": "18 September 2007", "owner_id": 217370, "owner_name": "Borbély Márk", "owner_url": "http://www.panoramio.com/user/217370"} + , + {"photo_id": 441376, "photo_title": "Bolungarvik", "photo_url": "http://www.panoramio.com/photo/441376", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/441376.jpg", "longitude": -23.197975, "latitude": 66.151698, "width": 500, "height": 333, "upload_date": "15 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 3354401, "photo_title": "Alkonyi színjáték", "photo_url": "http://www.panoramio.com/photo/3354401", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3354401.jpg", "longitude": 17.504225, "latitude": 47.745730, "width": 500, "height": 334, "upload_date": "16 July 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 809506, "photo_title": "Szivárványhorizont", "photo_url": "http://www.panoramio.com/photo/809506", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/809506.jpg", "longitude": 15.969830, "latitude": 43.626632, "width": 500, "height": 334, "upload_date": "13 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 36387, "photo_title": "Adobe Headquarters - Looking Up", "photo_url": "http://www.panoramio.com/photo/36387", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/36387.jpg", "longitude": -121.893804, "latitude": 37.330959, "width": 351, "height": 500, "upload_date": "02 August 2006", "owner_id": 5684, "owner_name": "Brent Townshend", "owner_url": "http://www.panoramio.com/user/5684"} + , + {"photo_id": 722982, "photo_title": "Antelope-Light", "photo_url": "http://www.panoramio.com/photo/722982", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/722982.jpg", "longitude": -111.371326, "latitude": 36.857236, "width": 333, "height": 500, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 138030, "photo_title": "Kinderdijk", "photo_url": "http://www.panoramio.com/photo/138030", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/138030.jpg", "longitude": 4.645500, "latitude": 51.879458, "width": 500, "height": 335, "upload_date": "13 December 2006", "owner_id": 18131, "owner_name": "ron zoeteweij", "owner_url": "http://www.panoramio.com/user/18131"} + , + {"photo_id": 9725235, "photo_title": "railway / Małopolska / województwo małopolskie", "photo_url": "http://www.panoramio.com/photo/9725235", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9725235.jpg", "longitude": 20.363159, "latitude": 49.748443, "width": 321, "height": 500, "upload_date": "28 April 2008", "owner_id": 454219, "owner_name": "Rafal Ociepka", "owner_url": "http://www.panoramio.com/user/454219"} + , + {"photo_id": 945984, "photo_title": "El canal", "photo_url": "http://www.panoramio.com/photo/945984", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/945984.jpg", "longitude": 0.484858, "latitude": 40.901901, "width": 378, "height": 500, "upload_date": "21 February 2007", "owner_id": 3022, "owner_name": "Arcadi", "owner_url": "http://www.panoramio.com/user/3022"} + , + {"photo_id": 677953, "photo_title": "Shuto Expressway over the Sumida River", "photo_url": "http://www.panoramio.com/photo/677953", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/677953.jpg", "longitude": 139.788644, "latitude": 35.690411, "width": 500, "height": 364, "upload_date": "03 February 2007", "owner_id": 78856, "owner_name": "chrisjongkind • archive", "owner_url": "http://www.panoramio.com/user/78856"} + , + {"photo_id": 2723655, "photo_title": "Orciano Pisano", "photo_url": "http://www.panoramio.com/photo/2723655", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2723655.jpg", "longitude": 10.505505, "latitude": 43.491911, "width": 366, "height": 500, "upload_date": "13 June 2007", "owner_id": 65478, "owner_name": "Gabriele Marabotti", "owner_url": "http://www.panoramio.com/user/65478"} + , + {"photo_id": 444745, "photo_title": "Pres de Nefta", "photo_url": "http://www.panoramio.com/photo/444745", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/444745.jpg", "longitude": 7.904320, "latitude": 33.766590, "width": 500, "height": 333, "upload_date": "15 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 1388623, "photo_title": "El Aviario (Parque Ecológico, Puebla, México)", "photo_url": "http://www.panoramio.com/photo/1388623", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1388623.jpg", "longitude": -98.187540, "latitude": 19.025552, "width": 500, "height": 488, "upload_date": "18 March 2007", "owner_id": 274633, "owner_name": "D4v17 ]7. G.", "owner_url": "http://www.panoramio.com/user/274633"} + , + {"photo_id": 792658, "photo_title": "Reichtag in the dome, Berlin HDR", "photo_url": "http://www.panoramio.com/photo/792658", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/792658.jpg", "longitude": 13.376133, "latitude": 52.518610, "width": 376, "height": 500, "upload_date": "12 February 2007", "owner_id": 161254, "owner_name": "fotoartistry", "owner_url": "http://www.panoramio.com/user/161254"} + , + {"photo_id": 324694, "photo_title": "Thachted houses", "photo_url": "http://www.panoramio.com/photo/324694", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/324694.jpg", "longitude": 137.235117, "latitude": 36.132095, "width": 500, "height": 265, "upload_date": "06 January 2007", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 2353496, "photo_title": "рассвет над вулканом Жупановский", "photo_url": "http://www.panoramio.com/photo/2353496", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2353496.jpg", "longitude": 158.591080, "latitude": 53.497850, "width": 500, "height": 337, "upload_date": "23 May 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 7251801, "photo_title": "Fellegek közt", "photo_url": "http://www.panoramio.com/photo/7251801", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7251801.jpg", "longitude": 18.314981, "latitude": 47.638820, "width": 500, "height": 329, "upload_date": "20 January 2008", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 35422, "photo_title": "caracas", "photo_url": "http://www.panoramio.com/photo/35422", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/35422.jpg", "longitude": -66.904507, "latitude": 10.498193, "width": 500, "height": 375, "upload_date": "29 July 2006", "owner_id": 3360, "owner_name": "ozzy", "owner_url": "http://www.panoramio.com/user/3360"} + , + {"photo_id": 405861, "photo_title": "myoukou", "photo_url": "http://www.panoramio.com/photo/405861", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/405861.jpg", "longitude": 138.295898, "latitude": 37.099003, "width": 500, "height": 383, "upload_date": "13 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 2719848, "photo_title": "Idaho relic", "photo_url": "http://www.panoramio.com/photo/2719848", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2719848.jpg", "longitude": -111.398749, "latitude": 42.286707, "width": 500, "height": 375, "upload_date": "13 June 2007", "owner_id": 555551, "owner_name": "Marilyn Whiteley", "owner_url": "http://www.panoramio.com/user/555551"} + , + {"photo_id": 599401, "photo_title": "Hozenji", "photo_url": "http://www.panoramio.com/photo/599401", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/599401.jpg", "longitude": 135.502450, "latitude": 34.668002, "width": 500, "height": 500, "upload_date": "28 January 2007", "owner_id": 128403, "owner_name": "mechanics", "owner_url": "http://www.panoramio.com/user/128403"} + , + {"photo_id": 53101, "photo_title": "Night Auadkhara", "photo_url": "http://www.panoramio.com/photo/53101", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/53101.jpg", "longitude": 40.631331, "latitude": 43.525806, "width": 500, "height": 323, "upload_date": "27 September 2006", "owner_id": 7707, "owner_name": "Yorix", "owner_url": "http://www.panoramio.com/user/7707"} + , + {"photo_id": 112752, "photo_title": "V-35-003b", "photo_url": "http://www.panoramio.com/photo/112752", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/112752.jpg", "longitude": 12.339267, "latitude": 45.433696, "width": 500, "height": 338, "upload_date": "11 December 2006", "owner_id": 17599, "owner_name": "Dmitry Andreev", "owner_url": "http://www.panoramio.com/user/17599"} + , + {"photo_id": 1946749, "photo_title": "Mt Hood and a John Deer Tractor over the Wooden Shoe Tulip Fields Monitor Oregon", "photo_url": "http://www.panoramio.com/photo/1946749", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1946749.jpg", "longitude": -122.740974, "latitude": 45.119326, "width": 500, "height": 351, "upload_date": "27 April 2007", "owner_id": 128746, "owner_name": "© Michael Hatten", "owner_url": "http://www.panoramio.com/user/128746"} + , + {"photo_id": 723074, "photo_title": "September Twilight in Thira", "photo_url": "http://www.panoramio.com/photo/723074", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723074.jpg", "longitude": 25.430603, "latitude": 36.416862, "width": 500, "height": 223, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1658251, "photo_title": "Behold the moon", "photo_url": "http://www.panoramio.com/photo/1658251", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1658251.jpg", "longitude": 15.589085, "latitude": 78.170125, "width": 333, "height": 500, "upload_date": "06 April 2007", "owner_id": 3574, "owner_name": "blackone", "owner_url": "http://www.panoramio.com/user/3574"} + , + {"photo_id": 2225571, "photo_title": "Landscape (Via Di Porta Castello Street) ~ Tarquinia, Italy", "photo_url": "http://www.panoramio.com/photo/2225571", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2225571.jpg", "longitude": 11.751836, "latitude": 42.255808, "width": 500, "height": 335, "upload_date": "15 May 2007", "owner_id": 395380, "owner_name": "Rafael (Retrocool)", "owner_url": "http://www.panoramio.com/user/395380"} + , + {"photo_id": 348071, "photo_title": "Perfect ice for skating, Svartlögafjärden", "photo_url": "http://www.panoramio.com/photo/348071", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/348071.jpg", "longitude": 19.021196, "latitude": 59.558766, "width": 500, "height": 375, "upload_date": "08 January 2007", "owner_id": 70471, "owner_name": "David Thyberg", "owner_url": "http://www.panoramio.com/user/70471"} + , + {"photo_id": 1408683, "photo_title": "Dragon", "photo_url": "http://www.panoramio.com/photo/1408683", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1408683.jpg", "longitude": 11.099625, "latitude": 24.203758, "width": 334, "height": 500, "upload_date": "20 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 58293, "photo_title": "Hundeschlittenrennen in Werfenweng", "photo_url": "http://www.panoramio.com/photo/58293", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58293.jpg", "longitude": 13.263245, "latitude": 47.465062, "width": 500, "height": 377, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 1488328, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/1488328", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1488328.jpg", "longitude": 139.290161, "latitude": 37.860218, "width": 500, "height": 383, "upload_date": "25 March 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 5439200, "photo_title": "shinjuku", "photo_url": "http://www.panoramio.com/photo/5439200", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5439200.jpg", "longitude": 139.693281, "latitude": 35.690921, "width": 500, "height": 500, "upload_date": "20 October 2007", "owner_id": 128403, "owner_name": "mechanics", "owner_url": "http://www.panoramio.com/user/128403"} + , + {"photo_id": 86241, "photo_title": "camino", "photo_url": "http://www.panoramio.com/photo/86241", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/86241.jpg", "longitude": -1.145668, "latitude": 38.170464, "width": 333, "height": 500, "upload_date": "25 November 2006", "owner_id": 10969, "owner_name": "Juanra", "owner_url": "http://www.panoramio.com/user/10969"} + , + {"photo_id": 4757733, "photo_title": "MASSIVE WAVE", "photo_url": "http://www.panoramio.com/photo/4757733", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4757733.jpg", "longitude": -1.262569, "latitude": 44.426793, "width": 259, "height": 500, "upload_date": "19 September 2007", "owner_id": 521836, "owner_name": "KLEFER", "owner_url": "http://www.panoramio.com/user/521836"} + , + {"photo_id": 941286, "photo_title": "Mesa Arch (3x1 pano)", "photo_url": "http://www.panoramio.com/photo/941286", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/941286.jpg", "longitude": -109.863667, "latitude": 38.388159, "width": 500, "height": 181, "upload_date": "21 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1284843, "photo_title": "Озеро Хангар в кратере вулкана", "photo_url": "http://www.panoramio.com/photo/1284843", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1284843.jpg", "longitude": 157.393055, "latitude": 54.764255, "width": 500, "height": 197, "upload_date": "12 March 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 2602988, "photo_title": "The best beach of Manihi", "photo_url": "http://www.panoramio.com/photo/2602988", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2602988.jpg", "longitude": -145.847282, "latitude": -14.348134, "width": 500, "height": 333, "upload_date": "06 June 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 2273013, "photo_title": "Another View of Vedra Island", "photo_url": "http://www.panoramio.com/photo/2273013", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2273013.jpg", "longitude": 1.247164, "latitude": 38.859406, "width": 500, "height": 465, "upload_date": "18 May 2007", "owner_id": 213866, "owner_name": "Nicolas Mertens", "owner_url": "http://www.panoramio.com/user/213866"} + , + {"photo_id": 8857011, "photo_title": "The Subway,Zion NP", "photo_url": "http://www.panoramio.com/photo/8857011", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8857011.jpg", "longitude": -113.055840, "latitude": 37.308741, "width": 500, "height": 375, "upload_date": "26 March 2008", "owner_id": 1465912, "owner_name": "funtor", "owner_url": "http://www.panoramio.com/user/1465912"} + , + {"photo_id": 167606, "photo_title": "Rainy Causeway Bay", "photo_url": "http://www.panoramio.com/photo/167606", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/167606.jpg", "longitude": 114.169595, "latitude": 22.293028, "width": 500, "height": 238, "upload_date": "16 December 2006", "owner_id": 31693, "owner_name": "Huw Thomas", "owner_url": "http://www.panoramio.com/user/31693"} + , + {"photo_id": 11077834, "photo_title": "In sunset", "photo_url": "http://www.panoramio.com/photo/11077834", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11077834.jpg", "longitude": 174.865694, "latitude": -41.330162, "width": 500, "height": 357, "upload_date": "10 June 2008", "owner_id": 1248894, "owner_name": "Eva Kaprinay", "owner_url": "http://www.panoramio.com/user/1248894"} + , + {"photo_id": 10919439, "photo_title": "Majestic Møøse", "photo_url": "http://www.panoramio.com/photo/10919439", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10919439.jpg", "longitude": -110.549712, "latitude": 43.866322, "width": 500, "height": 400, "upload_date": "04 June 2008", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 4892928, "photo_title": "tsukudajima", "photo_url": "http://www.panoramio.com/photo/4892928", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4892928.jpg", "longitude": 139.788172, "latitude": 35.672141, "width": 430, "height": 500, "upload_date": "25 September 2007", "owner_id": 128403, "owner_name": "mechanics", "owner_url": "http://www.panoramio.com/user/128403"} + , + {"photo_id": 5798660, "photo_title": "Guiding Light", "photo_url": "http://www.panoramio.com/photo/5798660", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5798660.jpg", "longitude": -111.374674, "latitude": 36.861974, "width": 333, "height": 500, "upload_date": "08 November 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 94219, "photo_title": "Bridge of Manganji", "photo_url": "http://www.panoramio.com/photo/94219", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/94219.jpg", "longitude": 137.821137, "latitude": 36.329284, "width": 500, "height": 375, "upload_date": "09 December 2006", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 3772695, "photo_title": "Fotomontaggio di Arquata & Andromeda", "photo_url": "http://www.panoramio.com/photo/3772695", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3772695.jpg", "longitude": 13.304100, "latitude": 42.773731, "width": 500, "height": 375, "upload_date": "07 August 2007", "owner_id": 646873, "owner_name": "Fabio Roman", "owner_url": "http://www.panoramio.com/user/646873"} + , + {"photo_id": 1314842, "photo_title": "Река Сим с моста (1729 км)", "photo_url": "http://www.panoramio.com/photo/1314842", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1314842.jpg", "longitude": 57.309623, "latitude": 55.013544, "width": 500, "height": 335, "upload_date": "14 March 2007", "owner_id": 268724, "owner_name": "Korotnev AV", "owner_url": "http://www.panoramio.com/user/268724"} + , + {"photo_id": 5333278, "photo_title": "hong kong, early evening", "photo_url": "http://www.panoramio.com/photo/5333278", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5333278.jpg", "longitude": 114.151651, "latitude": 22.280112, "width": 375, "height": 500, "upload_date": "15 October 2007", "owner_id": 90373, "owner_name": "michael habla", "owner_url": "http://www.panoramio.com/user/90373"} + , + {"photo_id": 2574624, "photo_title": "Mount Everest", "photo_url": "http://www.panoramio.com/photo/2574624", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2574624.jpg", "longitude": 86.933270, "latitude": 27.979546, "width": 500, "height": 375, "upload_date": "04 June 2007", "owner_id": 534045, "owner_name": "Lucjon", "owner_url": "http://www.panoramio.com/user/534045"} + , + {"photo_id": 160808, "photo_title": "Luquillo Beach", "photo_url": "http://www.panoramio.com/photo/160808", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/160808.jpg", "longitude": -65.677128, "latitude": 18.364871, "width": 500, "height": 375, "upload_date": "16 December 2006", "owner_id": 28766, "owner_name": "Tim Jansa", "owner_url": "http://www.panoramio.com/user/28766"} + , + {"photo_id": 2883625, "photo_title": "Sokorói impresszió", "photo_url": "http://www.panoramio.com/photo/2883625", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2883625.jpg", "longitude": 17.678204, "latitude": 47.533661, "width": 500, "height": 332, "upload_date": "22 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 287785, "photo_title": "Cascada Fuente del Algar © (Foto_Seb)", "photo_url": "http://www.panoramio.com/photo/287785", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/287785.jpg", "longitude": -0.095959, "latitude": 38.659359, "width": 500, "height": 332, "upload_date": "03 January 2007", "owner_id": 55833, "owner_name": "Sebastien Pigneur Jans (Outdoor Photographer) seolta@terra.es", "owner_url": "http://www.panoramio.com/user/55833"} + , + {"photo_id": 354350, "photo_title": "Bondhus icefall up close", "photo_url": "http://www.panoramio.com/photo/354350", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/354350.jpg", "longitude": 6.296539, "latitude": 60.071436, "width": 500, "height": 332, "upload_date": "09 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 3625784, "photo_title": "P.N.P.J.(Croacia)", "photo_url": "http://www.panoramio.com/photo/3625784", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3625784.jpg", "longitude": 15.612602, "latitude": 44.883911, "width": 500, "height": 375, "upload_date": "30 July 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 4866107, "photo_title": "Milkdrop sunset", "photo_url": "http://www.panoramio.com/photo/4866107", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4866107.jpg", "longitude": 16.693897, "latitude": 43.183338, "width": 334, "height": 500, "upload_date": "24 September 2007", "owner_id": 989, "owner_name": "Mrgud", "owner_url": "http://www.panoramio.com/user/989"} + , + {"photo_id": 5217595, "photo_title": "kolory...", "photo_url": "http://www.panoramio.com/photo/5217595", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5217595.jpg", "longitude": 17.990541, "latitude": 54.253292, "width": 375, "height": 500, "upload_date": "10 October 2007", "owner_id": 277750, "owner_name": "Karolina P.", "owner_url": "http://www.panoramio.com/user/277750"} + , + {"photo_id": 1235515, "photo_title": "Gangga sunset", "photo_url": "http://www.panoramio.com/photo/1235515", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1235515.jpg", "longitude": 115.063634, "latitude": -8.586962, "width": 332, "height": 500, "upload_date": "09 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 88143, "photo_title": "Anse Cocos - La Digue - Seychelles", "photo_url": "http://www.panoramio.com/photo/88143", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/88143.jpg", "longitude": 55.850029, "latitude": -4.365924, "width": 500, "height": 375, "upload_date": "28 November 2006", "owner_id": 11098, "owner_name": "Michele Masnata", "owner_url": "http://www.panoramio.com/user/11098"} + , + {"photo_id": 993105, "photo_title": "Dinos", "photo_url": "http://www.panoramio.com/photo/993105", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/993105.jpg", "longitude": 47.267990, "latitude": 34.392321, "width": 432, "height": 500, "upload_date": "24 February 2007", "owner_id": 83972, "owner_name": "Maxim Popov (http://www.popovm.ru)", "owner_url": "http://www.panoramio.com/user/83972"} + , + {"photo_id": 3382098, "photo_title": "Golden sunset", "photo_url": "http://www.panoramio.com/photo/3382098", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3382098.jpg", "longitude": -9.231960, "latitude": 38.652899, "width": 500, "height": 375, "upload_date": "18 July 2007", "owner_id": 465080, "owner_name": "Vasco Pires", "owner_url": "http://www.panoramio.com/user/465080"} + , + {"photo_id": 4689747, "photo_title": "La disipación de un ensueño", "photo_url": "http://www.panoramio.com/photo/4689747", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4689747.jpg", "longitude": -73.231199, "latitude": -39.817288, "width": 500, "height": 375, "upload_date": "16 September 2007", "owner_id": 327310, "owner_name": "Erwin Woenckhaus", "owner_url": "http://www.panoramio.com/user/327310"} + , + {"photo_id": 2520917, "photo_title": "Két vihar közt alkonyatkor", "photo_url": "http://www.panoramio.com/photo/2520917", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2520917.jpg", "longitude": 17.514782, "latitude": 47.747057, "width": 500, "height": 334, "upload_date": "02 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 419927, "photo_title": "echigoheiya", "photo_url": "http://www.panoramio.com/photo/419927", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/419927.jpg", "longitude": 138.885427, "latitude": 37.568562, "width": 500, "height": 334, "upload_date": "14 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1977433, "photo_title": "Victoria Falls, devils cauldron natural hot tub at lip of falls", "photo_url": "http://www.panoramio.com/photo/1977433", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1977433.jpg", "longitude": 25.853426, "latitude": -17.923924, "width": 500, "height": 375, "upload_date": "29 April 2007", "owner_id": 165455, "owner_name": "snorth", "owner_url": "http://www.panoramio.com/user/165455"} + , + {"photo_id": 3417691, "photo_title": "Völgy-Zugoly", "photo_url": "http://www.panoramio.com/photo/3417691", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3417691.jpg", "longitude": 17.826734, "latitude": 47.359293, "width": 500, "height": 346, "upload_date": "20 July 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 4166241, "photo_title": "Egy másik világ", "photo_url": "http://www.panoramio.com/photo/4166241", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4166241.jpg", "longitude": 18.056545, "latitude": 47.276667, "width": 333, "height": 500, "upload_date": "25 August 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3976033, "photo_title": "Sunrise Blüemlisalp Switzerland", "photo_url": "http://www.panoramio.com/photo/3976033", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3976033.jpg", "longitude": 7.779844, "latitude": 46.528974, "width": 500, "height": 333, "upload_date": "16 August 2007", "owner_id": 47930, "owner_name": "werni", "owner_url": "http://www.panoramio.com/user/47930"} + , + {"photo_id": 1449570, "photo_title": "Akabat", "photo_url": "http://www.panoramio.com/photo/1449570", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1449570.jpg", "longitude": 28.286717, "latitude": 27.484675, "width": 500, "height": 304, "upload_date": "22 March 2007", "owner_id": 304324, "owner_name": "OxyPhoto.ru - O x y", "owner_url": "http://www.panoramio.com/user/304324"} + , + {"photo_id": 8802, "photo_title": "Statue of Liberty [003393]", "photo_url": "http://www.panoramio.com/photo/8802", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8802.jpg", "longitude": -74.044375, "latitude": 40.688871, "width": 500, "height": 375, "upload_date": "27 January 2006", "owner_id": 1489, "owner_name": "Thorsten", "owner_url": "http://www.panoramio.com/user/1489"} + , + {"photo_id": 6015859, "photo_title": "Amazing place to drink ouzo", "photo_url": "http://www.panoramio.com/photo/6015859", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6015859.jpg", "longitude": 23.057030, "latitude": 36.687990, "width": 500, "height": 333, "upload_date": "19 November 2007", "owner_id": 242446, "owner_name": "Ntinos Lagos", "owner_url": "http://www.panoramio.com/user/242446"} + , + {"photo_id": 653941, "photo_title": "Mt. Moran across Jackson Lake", "photo_url": "http://www.panoramio.com/photo/653941", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/653941.jpg", "longitude": -110.656099, "latitude": 43.897336, "width": 500, "height": 374, "upload_date": "02 February 2007", "owner_id": 87752, "owner_name": "Richard Ryer", "owner_url": "http://www.panoramio.com/user/87752"} + , + {"photo_id": 354695, "photo_title": "Dresden_Zwinger_01", "photo_url": "http://www.panoramio.com/photo/354695", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/354695.jpg", "longitude": 13.734369, "latitude": 51.053481, "width": 399, "height": 500, "upload_date": "09 January 2007", "owner_id": 71628, "owner_name": "Ulrich Hässler, Dresden", "owner_url": "http://www.panoramio.com/user/71628"} + , + {"photo_id": 8327051, "photo_title": "Anelito di .... luce", "photo_url": "http://www.panoramio.com/photo/8327051", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8327051.jpg", "longitude": 13.717203, "latitude": 45.699706, "width": 500, "height": 375, "upload_date": "06 March 2008", "owner_id": 1121720, "owner_name": "▬ Mauro Antonini ▬", "owner_url": "http://www.panoramio.com/user/1121720"} + , + {"photo_id": 522126, "photo_title": "Íme a ludas hogy Márton lemaradt", "photo_url": "http://www.panoramio.com/photo/522126", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/522126.jpg", "longitude": 16.855431, "latitude": 47.653594, "width": 500, "height": 319, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 3948179, "photo_title": " petit matin en Vendée, sur la rive droite du Jaunay, 11 août 2007. #921, 933", "photo_url": "http://www.panoramio.com/photo/3948179", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3948179.jpg", "longitude": -1.901278, "latitude": 46.663487, "width": 500, "height": 343, "upload_date": "15 August 2007", "owner_id": 666755, "owner_name": "Armagnac", "owner_url": "http://www.panoramio.com/user/666755"} + , + {"photo_id": 1781399, "photo_title": "Dawn in Yosemite Valley", "photo_url": "http://www.panoramio.com/photo/1781399", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1781399.jpg", "longitude": -119.590645, "latitude": 37.743775, "width": 333, "height": 500, "upload_date": "15 April 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 905112, "photo_title": "Searea buildings in Odaiba", "photo_url": "http://www.panoramio.com/photo/905112", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/905112.jpg", "longitude": 139.773039, "latitude": 35.635670, "width": 500, "height": 372, "upload_date": "19 February 2007", "owner_id": 78856, "owner_name": "chrisjongkind • archive", "owner_url": "http://www.panoramio.com/user/78856"} + , + {"photo_id": 6935706, "photo_title": "poranek w ogniu - morning on fire", "photo_url": "http://www.panoramio.com/photo/6935706", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6935706.jpg", "longitude": 20.319901, "latitude": 49.730028, "width": 500, "height": 332, "upload_date": "06 January 2008", "owner_id": 454219, "owner_name": "Rafal Ociepka", "owner_url": "http://www.panoramio.com/user/454219"} + , + {"photo_id": 29606, "photo_title": "Romance entre el Agua y la Roca", "photo_url": "http://www.panoramio.com/photo/29606", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/29606.jpg", "longitude": -64.859161, "latitude": -31.991480, "width": 500, "height": 375, "upload_date": "01 July 2006", "owner_id": 4483, "owner_name": "Miguel Coranti", "owner_url": "http://www.panoramio.com/user/4483"} + , + {"photo_id": 58290, "photo_title": "Taurachbahn", "photo_url": "http://www.panoramio.com/photo/58290", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58290.jpg", "longitude": 13.688021, "latitude": 47.130418, "width": 500, "height": 369, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 44982, "photo_title": "Paris200412PJDSC_9304l", "photo_url": "http://www.panoramio.com/photo/44982", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/44982.jpg", "longitude": 2.301636, "latitude": 48.853760, "width": 500, "height": 332, "upload_date": "02 September 2006", "owner_id": 6703, "owner_name": "Peter Jansen", "owner_url": "http://www.panoramio.com/user/6703"} + , + {"photo_id": 532669, "photo_title": "Closeup of wheatfield in november", "photo_url": "http://www.panoramio.com/photo/532669", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/532669.jpg", "longitude": 11.276093, "latitude": 59.644239, "width": 375, "height": 500, "upload_date": "22 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 723648, "photo_title": "Elk near Jasper", "photo_url": "http://www.panoramio.com/photo/723648", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/723648.jpg", "longitude": -118.046207, "latitude": 52.923290, "width": 500, "height": 332, "upload_date": "07 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 535234, "photo_title": "Cathedral Cove near Hahei, New Zealand", "photo_url": "http://www.panoramio.com/photo/535234", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/535234.jpg", "longitude": 175.790222, "latitude": -36.828611, "width": 500, "height": 375, "upload_date": "22 January 2007", "owner_id": 101257, "owner_name": "Denis Campbell", "owner_url": "http://www.panoramio.com/user/101257"} + , + {"photo_id": 15299, "photo_title": "Bodrum Sunset", "photo_url": "http://www.panoramio.com/photo/15299", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/15299.jpg", "longitude": 27.425308, "latitude": 37.028595, "width": 500, "height": 375, "upload_date": "19 March 2006", "owner_id": 2351, "owner_name": "Serdar Bilecen", "owner_url": "http://www.panoramio.com/user/2351"} + , + {"photo_id": 1932227, "photo_title": "Mono Lake 3", "photo_url": "http://www.panoramio.com/photo/1932227", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1932227.jpg", "longitude": -119.023819, "latitude": 37.940068, "width": 333, "height": 500, "upload_date": "26 April 2007", "owner_id": 40260, "owner_name": "Don Albonico", "owner_url": "http://www.panoramio.com/user/40260"} + , + {"photo_id": 744906, "photo_title": "Tsukahara Highland", "photo_url": "http://www.panoramio.com/photo/744906", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/744906.jpg", "longitude": 131.403952, "latitude": 33.320201, "width": 500, "height": 375, "upload_date": "08 February 2007", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 490198, "photo_title": "Jal Mahal, Jaipur", "photo_url": "http://www.panoramio.com/photo/490198", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/490198.jpg", "longitude": 75.842797, "latitude": 26.954571, "width": 500, "height": 403, "upload_date": "19 January 2007", "owner_id": 10456, "owner_name": "eulogio", "owner_url": "http://www.panoramio.com/user/10456"} + , + {"photo_id": 451032, "photo_title": "Mono Lake", "photo_url": "http://www.panoramio.com/photo/451032", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/451032.jpg", "longitude": -119.017537, "latitude": 37.941803, "width": 363, "height": 500, "upload_date": "16 January 2007", "owner_id": 93560, "owner_name": "Alex Petrov", "owner_url": "http://www.panoramio.com/user/93560"} + , + {"photo_id": 5808345, "photo_title": "Majesty in the snow", "photo_url": "http://www.panoramio.com/photo/5808345", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5808345.jpg", "longitude": 9.944987, "latitude": 48.684866, "width": 367, "height": 500, "upload_date": "09 November 2007", "owner_id": 424589, "owner_name": "PeSchn", "owner_url": "http://www.panoramio.com/user/424589"} + , + {"photo_id": 2718436, "photo_title": "BKCC view northwest", "photo_url": "http://www.panoramio.com/photo/2718436", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2718436.jpg", "longitude": 139.752048, "latitude": 35.708102, "width": 500, "height": 365, "upload_date": "12 June 2007", "owner_id": 558055, "owner_name": "www.tokyoform.com", "owner_url": "http://www.panoramio.com/user/558055"} + , + {"photo_id": 5446639, "photo_title": "Осень", "photo_url": "http://www.panoramio.com/photo/5446639", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5446639.jpg", "longitude": 23.824694, "latitude": 53.680547, "width": 500, "height": 375, "upload_date": "21 October 2007", "owner_id": 937915, "owner_name": "HiV", "owner_url": "http://www.panoramio.com/user/937915"} + , + {"photo_id": 3393267, "photo_title": "Barco hundido (pecio) /Shipwreck /épave ", "photo_url": "http://www.panoramio.com/photo/3393267", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3393267.jpg", "longitude": -81.680587, "latitude": 45.255181, "width": 329, "height": 500, "upload_date": "18 July 2007", "owner_id": 401966, "owner_name": "Syl de Canada", "owner_url": "http://www.panoramio.com/user/401966"} + , + {"photo_id": 4369140, "photo_title": "Beach on Håja", "photo_url": "http://www.panoramio.com/photo/4369140", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4369140.jpg", "longitude": 18.096886, "latitude": 69.740825, "width": 500, "height": 375, "upload_date": "03 September 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 3711738, "photo_title": "Safe", "photo_url": "http://www.panoramio.com/photo/3711738", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3711738.jpg", "longitude": 1.787220, "latitude": 41.224610, "width": 500, "height": 375, "upload_date": "04 August 2007", "owner_id": 138691, "owner_name": "Josep Maria Alegre", "owner_url": "http://www.panoramio.com/user/138691"} + , + {"photo_id": 7415554, "photo_title": "Sunrise at Hae-keum-gang, Korea", "photo_url": "http://www.panoramio.com/photo/7415554", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7415554.jpg", "longitude": 128.605957, "latitude": 34.698719, "width": 500, "height": 500, "upload_date": "28 January 2008", "owner_id": 1221287, "owner_name": "TS Jeung", "owner_url": "http://www.panoramio.com/user/1221287"} + , + {"photo_id": 10129080, "photo_title": "Polish Silesia sunset.", "photo_url": "http://www.panoramio.com/photo/10129080", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10129080.jpg", "longitude": 18.819752, "latitude": 49.789798, "width": 500, "height": 335, "upload_date": "11 May 2008", "owner_id": 548131, "owner_name": "murart", "owner_url": "http://www.panoramio.com/user/548131"} + , + {"photo_id": 11827263, "photo_title": ": Casa Rustica", "photo_url": "http://www.panoramio.com/photo/11827263", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11827263.jpg", "longitude": -8.644395, "latitude": 42.795039, "width": 500, "height": 375, "upload_date": "05 July 2008", "owner_id": 546858, "owner_name": "Lazariparcero", "owner_url": "http://www.panoramio.com/user/546858"} + , + {"photo_id": 9185096, "photo_title": "E per cambiare... oggi è nevicato ! 07.04.2008", "photo_url": "http://www.panoramio.com/photo/9185096", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9185096.jpg", "longitude": 11.469633, "latitude": 46.304547, "width": 500, "height": 375, "upload_date": "07 April 2008", "owner_id": 6033, "owner_name": "► Marco Vanzo", "owner_url": "http://www.panoramio.com/user/6033"} + , + {"photo_id": 691, "photo_title": "Monasterio de Santa Catalina. Arequipa, Perú", "photo_url": "http://www.panoramio.com/photo/691", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/691.jpg", "longitude": -71.536671, "latitude": -16.395835, "width": 500, "height": 375, "upload_date": "05 October 2005", "owner_id": 7, "owner_name": "Eduardo Manchón", "owner_url": "http://www.panoramio.com/user/7"} + , + {"photo_id": 672525, "photo_title": "Pyramid", "photo_url": "http://www.panoramio.com/photo/672525", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/672525.jpg", "longitude": 31.132421, "latitude": 29.978283, "width": 500, "height": 474, "upload_date": "03 February 2007", "owner_id": 123698, "owner_name": "© Kojak", "owner_url": "http://www.panoramio.com/user/123698"} + , + {"photo_id": 275730, "photo_title": "Oberalp - 2033 m", "photo_url": "http://www.panoramio.com/photo/275730", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/275730.jpg", "longitude": 8.668191, "latitude": 46.661528, "width": 500, "height": 333, "upload_date": "01 January 2007", "owner_id": 57869, "owner_name": "NAGY Albert", "owner_url": "http://www.panoramio.com/user/57869"} + , + {"photo_id": 3661332, "photo_title": "Angkor - Temple vs Trees", "photo_url": "http://www.panoramio.com/photo/3661332", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3661332.jpg", "longitude": 103.855079, "latitude": 13.449099, "width": 500, "height": 461, "upload_date": "01 August 2007", "owner_id": 73104, "owner_name": "zerega", "owner_url": "http://www.panoramio.com/user/73104"} + , + {"photo_id": 336151, "photo_title": "Lake north of Tupaassat", "photo_url": "http://www.panoramio.com/photo/336151", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/336151.jpg", "longitude": -44.307861, "latitude": 60.376030, "width": 500, "height": 333, "upload_date": "07 January 2007", "owner_id": 62557, "owner_name": "Dirk Jenrich", "owner_url": "http://www.panoramio.com/user/62557"} + , + {"photo_id": 423705, "photo_title": "Bouche du Pu`u `Ō`ō", "photo_url": "http://www.panoramio.com/photo/423705", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/423705.jpg", "longitude": -155.106182, "latitude": 19.390101, "width": 500, "height": 349, "upload_date": "14 January 2007", "owner_id": 75602, "owner_name": "Lloulhy", "owner_url": "http://www.panoramio.com/user/75602"} + , + {"photo_id": 1344795, "photo_title": "Tree in a field, Aerial", "photo_url": "http://www.panoramio.com/photo/1344795", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1344795.jpg", "longitude": 12.058611, "latitude": 55.471581, "width": 500, "height": 332, "upload_date": "16 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 5591839, "photo_title": "Can I touch the clouds?", "photo_url": "http://www.panoramio.com/photo/5591839", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5591839.jpg", "longitude": 130.689411, "latitude": 33.305569, "width": 333, "height": 500, "upload_date": "28 October 2007", "owner_id": 775356, "owner_name": "ascesis.image", "owner_url": "http://www.panoramio.com/user/775356"} + , + {"photo_id": 5476386, "photo_title": "Nuages crépusculaires sur le Lauterbrunnental", "photo_url": "http://www.panoramio.com/photo/5476386", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5476386.jpg", "longitude": 7.908010, "latitude": 46.592490, "width": 500, "height": 375, "upload_date": "22 October 2007", "owner_id": 359127, "owner_name": "wx", "owner_url": "http://www.panoramio.com/user/359127"} + , + {"photo_id": 459556, "photo_title": "minatopia", "photo_url": "http://www.panoramio.com/photo/459556", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459556.jpg", "longitude": 139.058182, "latitude": 37.930041, "width": 381, "height": 500, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1407525, "photo_title": "Mackinac Bridge, Michigan", "photo_url": "http://www.panoramio.com/photo/1407525", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1407525.jpg", "longitude": -84.729652, "latitude": 45.788250, "width": 500, "height": 313, "upload_date": "20 March 2007", "owner_id": 60173, "owner_name": "Lars Jensen", "owner_url": "http://www.panoramio.com/user/60173"} + , + {"photo_id": 74790, "photo_title": "kang taiga with moon in sunset", "photo_url": "http://www.panoramio.com/photo/74790", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/74790.jpg", "longitude": 86.830101, "latitude": 27.811750, "width": 500, "height": 334, "upload_date": "03 November 2006", "owner_id": 9812, "owner_name": "wsm earp", "owner_url": "http://www.panoramio.com/user/9812"} + , + {"photo_id": 4025902, "photo_title": "Coloured Poznań ", "photo_url": "http://www.panoramio.com/photo/4025902", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4025902.jpg", "longitude": 16.934255, "latitude": 52.407878, "width": 500, "height": 316, "upload_date": "19 August 2007", "owner_id": 369127, "owner_name": "♥ Caterpillar", "owner_url": "http://www.panoramio.com/user/369127"} + , + {"photo_id": 88121, "photo_title": "View from Punta Martin - Liguria - Italy", "photo_url": "http://www.panoramio.com/photo/88121", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/88121.jpg", "longitude": 8.795028, "latitude": 44.468489, "width": 500, "height": 375, "upload_date": "28 November 2006", "owner_id": 11098, "owner_name": "Michele Masnata", "owner_url": "http://www.panoramio.com/user/11098"} + , + {"photo_id": 8214845, "photo_title": "Molino Albolafia,cauce del Guadalquivir(Córdoba)", "photo_url": "http://www.panoramio.com/photo/8214845", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8214845.jpg", "longitude": -4.780898, "latitude": 37.876242, "width": 500, "height": 375, "upload_date": "01 March 2008", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 23364, "photo_title": "Alanya, Taurus-Mountains of Kemer", "photo_url": "http://www.panoramio.com/photo/23364", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/23364.jpg", "longitude": 31.979656, "latitude": 36.548466, "width": 500, "height": 375, "upload_date": "10 June 2006", "owner_id": 3760, "owner_name": "Frank Pustlauck", "owner_url": "http://www.panoramio.com/user/3760"} + , + {"photo_id": 6128452, "photo_title": "В осеннем парке - In autumn park", "photo_url": "http://www.panoramio.com/photo/6128452", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6128452.jpg", "longitude": 37.458926, "latitude": 55.737422, "width": 500, "height": 500, "upload_date": "25 November 2007", "owner_id": 244932, "owner_name": "Andrey Jitkov", "owner_url": "http://www.panoramio.com/user/244932"} + , + {"photo_id": 4356679, "photo_title": "Old Santa Fe Caboose", "photo_url": "http://www.panoramio.com/photo/4356679", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4356679.jpg", "longitude": -119.699687, "latitude": 36.707083, "width": 500, "height": 335, "upload_date": "03 September 2007", "owner_id": 339677, "owner_name": "Chip Stephan", "owner_url": "http://www.panoramio.com/user/339677"} + , + {"photo_id": 436312, "photo_title": "tokimesse", "photo_url": "http://www.panoramio.com/photo/436312", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/436312.jpg", "longitude": 139.059105, "latitude": 37.932013, "width": 396, "height": 500, "upload_date": "15 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 1089381, "photo_title": "Szabadon szélben", "photo_url": "http://www.panoramio.com/photo/1089381", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1089381.jpg", "longitude": 17.604561, "latitude": 47.588799, "width": 332, "height": 500, "upload_date": "28 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 5667175, "photo_title": "Northen Lights", "photo_url": "http://www.panoramio.com/photo/5667175", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5667175.jpg", "longitude": 28.482399, "latitude": 66.227860, "width": 500, "height": 333, "upload_date": "01 November 2007", "owner_id": 897591, "owner_name": "markku pirttimaa www.karhukuusamo.com", "owner_url": "http://www.panoramio.com/user/897591"} + , + {"photo_id": 1317737, "photo_title": "Bora Bora", "photo_url": "http://www.panoramio.com/photo/1317737", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1317737.jpg", "longitude": -151.739988, "latitude": -16.538715, "width": 500, "height": 351, "upload_date": "14 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 993129, "photo_title": "Würzburg", "photo_url": "http://www.panoramio.com/photo/993129", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/993129.jpg", "longitude": 9.931523, "latitude": 49.793310, "width": 500, "height": 395, "upload_date": "24 February 2007", "owner_id": 83972, "owner_name": "Maxim Popov (http://www.popovm.ru)", "owner_url": "http://www.panoramio.com/user/83972"} + , + {"photo_id": 1836922, "photo_title": "Fountain Place / Dallas / Texas", "photo_url": "http://www.panoramio.com/photo/1836922", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1836922.jpg", "longitude": -96.802940, "latitude": 32.785236, "width": 500, "height": 405, "upload_date": "19 April 2007", "owner_id": 57778, "owner_name": "William Lile", "owner_url": "http://www.panoramio.com/user/57778"} + , + {"photo_id": 3409786, "photo_title": "Molinos de Elguea con Gorbea al fondo", "photo_url": "http://www.panoramio.com/photo/3409786", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3409786.jpg", "longitude": -2.325025, "latitude": 42.951271, "width": 500, "height": 303, "upload_date": "19 July 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 476284, "photo_title": "Place \"Poda\"", "photo_url": "http://www.panoramio.com/photo/476284", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/476284.jpg", "longitude": 27.471657, "latitude": 42.447655, "width": 500, "height": 357, "upload_date": "18 January 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 3499645, "photo_title": "Tükör-kép", "photo_url": "http://www.panoramio.com/photo/3499645", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3499645.jpg", "longitude": 17.503667, "latitude": 47.843522, "width": 500, "height": 333, "upload_date": "24 July 2007", "owner_id": 689769, "owner_name": "Ponty István", "owner_url": "http://www.panoramio.com/user/689769"} + , + {"photo_id": 1419901, "photo_title": "Øresundsbroen seen from Sweden (The Dragon Tail), Aerial", "photo_url": "http://www.panoramio.com/photo/1419901", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1419901.jpg", "longitude": 12.885418, "latitude": 55.566213, "width": 332, "height": 500, "upload_date": "20 March 2007", "owner_id": 278074, "owner_name": "H. C. Steensen", "owner_url": "http://www.panoramio.com/user/278074"} + , + {"photo_id": 441727, "photo_title": "Фортеця у Кам'янці-Подільському", "photo_url": "http://www.panoramio.com/photo/441727", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/441727.jpg", "longitude": 26.563311, "latitude": 48.672486, "width": 375, "height": 500, "upload_date": "15 January 2007", "owner_id": 13058, "owner_name": "Kyryl", "owner_url": "http://www.panoramio.com/user/13058"} + , + {"photo_id": 309122, "photo_title": "Standing Stone, Spittal of Glenshee", "photo_url": "http://www.panoramio.com/photo/309122", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/309122.jpg", "longitude": -3.461593, "latitude": 56.814745, "width": 500, "height": 332, "upload_date": "05 January 2007", "owner_id": 64815, "owner_name": "PigleT", "owner_url": "http://www.panoramio.com/user/64815"} + , + {"photo_id": 2599560, "photo_title": "Isigaki Island Hirakubosaki lighthouse 石垣島 平久保崎灯台", "photo_url": "http://www.panoramio.com/photo/2599560", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2599560.jpg", "longitude": 124.315994, "latitude": 24.610064, "width": 500, "height": 328, "upload_date": "06 June 2007", "owner_id": 446937, "owner_name": "y_komatsu", "owner_url": "http://www.panoramio.com/user/446937"} + , + {"photo_id": 6545801, "photo_title": "Front Range of the Canadian Rocky Mountains", "photo_url": "http://www.panoramio.com/photo/6545801", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6545801.jpg", "longitude": -115.248213, "latitude": 51.026389, "width": 500, "height": 338, "upload_date": "18 December 2007", "owner_id": 85489, "owner_name": "Bruce MacIver", "owner_url": "http://www.panoramio.com/user/85489"} + , + {"photo_id": 1254026, "photo_title": "Hagia Sophia (inside)", "photo_url": "http://www.panoramio.com/photo/1254026", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1254026.jpg", "longitude": 28.979831, "latitude": 41.008548, "width": 500, "height": 408, "upload_date": "10 March 2007", "owner_id": 258322, "owner_name": "www.tatjana.ingold.ch", "owner_url": "http://www.panoramio.com/user/258322"} + , + {"photo_id": 911501, "photo_title": "View from Nordenskiöldtoppen, Svalbard", "photo_url": "http://www.panoramio.com/photo/911501", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/911501.jpg", "longitude": 15.402832, "latitude": 78.184088, "width": 500, "height": 308, "upload_date": "20 February 2007", "owner_id": 66734, "owner_name": "Svein Solhaug", "owner_url": "http://www.panoramio.com/user/66734"} + , + {"photo_id": 3797140, "photo_title": "Mas Francesc", "photo_url": "http://www.panoramio.com/photo/3797140", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3797140.jpg", "longitude": 2.408388, "latitude": 41.962346, "width": 500, "height": 332, "upload_date": "08 August 2007", "owner_id": 756267, "owner_name": "Albert Codina", "owner_url": "http://www.panoramio.com/user/756267"} + , + {"photo_id": 150165, "photo_title": "Aso crater from the air", "photo_url": "http://www.panoramio.com/photo/150165", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/150165.jpg", "longitude": 131.083159, "latitude": 32.885390, "width": 500, "height": 375, "upload_date": "14 December 2006", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 532631, "photo_title": "Last bath in Oslofjorden - self portrait", "photo_url": "http://www.panoramio.com/photo/532631", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/532631.jpg", "longitude": 10.782223, "latitude": 59.854773, "width": 500, "height": 205, "upload_date": "22 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 3978149, "photo_title": "Les Mines 3", "photo_url": "http://www.panoramio.com/photo/3978149", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3978149.jpg", "longitude": 1.315312, "latitude": 45.921961, "width": 500, "height": 500, "upload_date": "16 August 2007", "owner_id": 372189, "owner_name": "Phil©", "owner_url": "http://www.panoramio.com/user/372189"} + , + {"photo_id": 848807, "photo_title": "mystic morning", "photo_url": "http://www.panoramio.com/photo/848807", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/848807.jpg", "longitude": 10.144372, "latitude": 54.323031, "width": 375, "height": 500, "upload_date": "17 February 2007", "owner_id": 73946, "owner_name": "pembo", "owner_url": "http://www.panoramio.com/user/73946"} + , + {"photo_id": 4097972, "photo_title": "Dry Land", "photo_url": "http://www.panoramio.com/photo/4097972", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4097972.jpg", "longitude": 25.936694, "latitude": 41.660906, "width": 500, "height": 333, "upload_date": "22 August 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 479927, "photo_title": "Monterosso at night", "photo_url": "http://www.panoramio.com/photo/479927", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/479927.jpg", "longitude": 9.655094, "latitude": 44.144461, "width": 500, "height": 357, "upload_date": "18 January 2007", "owner_id": 100907, "owner_name": "Julia Wahl", "owner_url": "http://www.panoramio.com/user/100907"} + , + {"photo_id": 50872, "photo_title": "Düne 40 auf dem Weg nach Sossusvlei ...", "photo_url": "http://www.panoramio.com/photo/50872", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/50872.jpg", "longitude": 15.593033, "latitude": -24.720950, "width": 500, "height": 192, "upload_date": "22 September 2006", "owner_id": 7434, "owner_name": "baldinger reisen ag, waedenswil/switzerland", "owner_url": "http://www.panoramio.com/user/7434"} + , + {"photo_id": 2903483, "photo_title": "Reggeli", "photo_url": "http://www.panoramio.com/photo/2903483", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2903483.jpg", "longitude": 17.469549, "latitude": 47.868977, "width": 410, "height": 500, "upload_date": "23 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4226249, "photo_title": "Rainbow", "photo_url": "http://www.panoramio.com/photo/4226249", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4226249.jpg", "longitude": 9.615569, "latitude": 62.529150, "width": 500, "height": 230, "upload_date": "27 August 2007", "owner_id": 223406, "owner_name": "Sigmund Rise", "owner_url": "http://www.panoramio.com/user/223406"} + , + {"photo_id": 2267849, "photo_title": "Rayos vistos desde mi ventana", "photo_url": "http://www.panoramio.com/photo/2267849", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2267849.jpg", "longitude": -89.203963, "latitude": 13.728734, "width": 500, "height": 375, "upload_date": "17 May 2007", "owner_id": 170919, "owner_name": "Wilber Calderón - El Salvador", "owner_url": "http://www.panoramio.com/user/170919"} + , + {"photo_id": 459470, "photo_title": "bandaibashi4", "photo_url": "http://www.panoramio.com/photo/459470", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459470.jpg", "longitude": 139.051123, "latitude": 37.919081, "width": 500, "height": 399, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 5279707, "photo_title": "Jægervasstindane", "photo_url": "http://www.panoramio.com/photo/5279707", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5279707.jpg", "longitude": 19.651279, "latitude": 69.771296, "width": 500, "height": 375, "upload_date": "13 October 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 1057758, "photo_title": "Giant dragonfly in rice field", "photo_url": "http://www.panoramio.com/photo/1057758", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1057758.jpg", "longitude": 137.115641, "latitude": 34.862834, "width": 500, "height": 375, "upload_date": "27 February 2007", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 479454, "photo_title": "Morning sun over lake Øymarksjøen", "photo_url": "http://www.panoramio.com/photo/479454", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/479454.jpg", "longitude": 11.637611, "latitude": 59.338617, "width": 333, "height": 500, "upload_date": "18 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 87263, "photo_title": "Payun - Mendoza - Argentina", "photo_url": "http://www.panoramio.com/photo/87263", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/87263.jpg", "longitude": -69.280128, "latitude": -36.643080, "width": 500, "height": 333, "upload_date": "27 November 2006", "owner_id": 8409, "owner_name": "Hector Fabian Garrido", "owner_url": "http://www.panoramio.com/user/8409"} + , + {"photo_id": 11430112, "photo_title": "Tramonto dalla Pietra Parcellara", "photo_url": "http://www.panoramio.com/photo/11430112", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11430112.jpg", "longitude": 9.476480, "latitude": 44.843334, "width": 500, "height": 375, "upload_date": "22 June 2008", "owner_id": 22921, "owner_name": "Francesco Favalesi - VAL LURETTA", "owner_url": "http://www.panoramio.com/user/22921"} + , + {"photo_id": 33760, "photo_title": "Yu Yuan Gardens", "photo_url": "http://www.panoramio.com/photo/33760", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/33760.jpg", "longitude": 121.487803, "latitude": 31.228821, "width": 500, "height": 375, "upload_date": "21 July 2006", "owner_id": 5168, "owner_name": "Markus Källander", "owner_url": "http://www.panoramio.com/user/5168"} + , + {"photo_id": 1935332, "photo_title": "Lafayette", "photo_url": "http://www.panoramio.com/photo/1935332", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1935332.jpg", "longitude": 2.311839, "latitude": 48.864475, "width": 384, "height": 500, "upload_date": "26 April 2007", "owner_id": 372189, "owner_name": "Phil©", "owner_url": "http://www.panoramio.com/user/372189"} + , + {"photo_id": 2558954, "photo_title": "Two Thumbs Morning", "photo_url": "http://www.panoramio.com/photo/2558954", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2558954.jpg", "longitude": 170.463352, "latitude": -43.999792, "width": 500, "height": 400, "upload_date": "04 June 2007", "owner_id": 286729, "owner_name": "jimwitkowski", "owner_url": "http://www.panoramio.com/user/286729"} + , + {"photo_id": 94190, "photo_title": "morning light", "photo_url": "http://www.panoramio.com/photo/94190", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/94190.jpg", "longitude": 138.362846, "latitude": 35.981896, "width": 500, "height": 375, "upload_date": "09 December 2006", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 1283054, "photo_title": "Panorama - Bahia desde la playa", "photo_url": "http://www.panoramio.com/photo/1283054", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1283054.jpg", "longitude": -1.990094, "latitude": 43.316053, "width": 500, "height": 167, "upload_date": "12 March 2007", "owner_id": 218075, "owner_name": "fotoramas", "owner_url": "http://www.panoramio.com/user/218075"} + , + {"photo_id": 2541040, "photo_title": "Színförgeteg", "photo_url": "http://www.panoramio.com/photo/2541040", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2541040.jpg", "longitude": 17.506886, "latitude": 47.744403, "width": 500, "height": 334, "upload_date": "03 June 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 837872, "photo_title": "Midnight Sunset", "photo_url": "http://www.panoramio.com/photo/837872", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/837872.jpg", "longitude": -14.670181, "latitude": 65.142363, "width": 500, "height": 333, "upload_date": "16 February 2007", "owner_id": 175423, "owner_name": "Fabien Barrau", "owner_url": "http://www.panoramio.com/user/175423"} + , + {"photo_id": 1706995, "photo_title": "Cantera de Manresa", "photo_url": "http://www.panoramio.com/photo/1706995", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1706995.jpg", "longitude": 3.131152, "latitude": 39.868942, "width": 335, "height": 500, "upload_date": "09 April 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 575731, "photo_title": "Le Mont Saint-Michel (Francia)", "photo_url": "http://www.panoramio.com/photo/575731", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/575731.jpg", "longitude": -1.498604, "latitude": 48.636085, "width": 500, "height": 334, "upload_date": "26 January 2007", "owner_id": 38814, "owner_name": "Romeo Ferrari", "owner_url": "http://www.panoramio.com/user/38814"} + , + {"photo_id": 1960951, "photo_title": "Utah Autumn Aspen", "photo_url": "http://www.panoramio.com/photo/1960951", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1960951.jpg", "longitude": -111.620750, "latitude": 40.441721, "width": 500, "height": 332, "upload_date": "28 April 2007", "owner_id": 107359, "owner_name": "Ron Cooper", "owner_url": "http://www.panoramio.com/user/107359"} + , + {"photo_id": 162298, "photo_title": "Nuvole (Effetto Dio) sopra Marano Ticino (2 of 2), settembre 2005", "photo_url": "http://www.panoramio.com/photo/162298", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/162298.jpg", "longitude": 8.623238, "latitude": 45.629825, "width": 500, "height": 375, "upload_date": "16 December 2006", "owner_id": 18925, "owner_name": "Marco Ferrari", "owner_url": "http://www.panoramio.com/user/18925"} + , + {"photo_id": 9358587, "photo_title": "Sicilia, a me bedda!", "photo_url": "http://www.panoramio.com/photo/9358587", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9358587.jpg", "longitude": 14.652908, "latitude": 38.068172, "width": 500, "height": 375, "upload_date": "14 April 2008", "owner_id": 325031, "owner_name": "Gibrail", "owner_url": "http://www.panoramio.com/user/325031"} + , + {"photo_id": 11271799, "photo_title": "Candelaria, version completa ( Candelaria, full version )", "photo_url": "http://www.panoramio.com/photo/11271799", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/11271799.jpg", "longitude": -18.005776, "latitude": 27.750886, "width": 334, "height": 500, "upload_date": "16 June 2008", "owner_id": 787217, "owner_name": "♣ Víctor S de Lara ♣", "owner_url": "http://www.panoramio.com/user/787217"} + , + {"photo_id": 81, "photo_title": "North Cape from plane", "photo_url": "http://www.panoramio.com/photo/81", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/81.jpg", "longitude": 25.786285, "latitude": 71.171196, "width": 500, "height": 340, "upload_date": "30 July 2005", "owner_id": 7, "owner_name": "Eduardo Manchón", "owner_url": "http://www.panoramio.com/user/7"} + , + {"photo_id": 6548480, "photo_title": "珠峰晓月", "photo_url": "http://www.panoramio.com/photo/6548480", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6548480.jpg", "longitude": 86.857567, "latitude": 28.119833, "width": 500, "height": 332, "upload_date": "18 December 2007", "owner_id": 1201050, "owner_name": "黄河影人", "owner_url": "http://www.panoramio.com/user/1201050"} + , + {"photo_id": 1989382, "photo_title": "", "photo_url": "http://www.panoramio.com/photo/1989382", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1989382.jpg", "longitude": 20.628827, "latitude": 52.062874, "width": 500, "height": 375, "upload_date": "29 April 2007", "owner_id": 234038, "owner_name": "Jacek M.", "owner_url": "http://www.panoramio.com/user/234038"} + , + {"photo_id": 3186699, "photo_title": "Ruta del Cares: Paredón de los Collainos -más 400 m. de vertical-", "photo_url": "http://www.panoramio.com/photo/3186699", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3186699.jpg", "longitude": -4.863296, "latitude": 43.253174, "width": 335, "height": 500, "upload_date": "08 July 2007", "owner_id": 129297, "owner_name": "Enrique Ortiz de Zárate", "owner_url": "http://www.panoramio.com/user/129297"} + , + {"photo_id": 9899533, "photo_title": "Grado: Are you Ready? . . . . . . . . . Honorable mention \"Scenery\" May Contest 2008", "photo_url": "http://www.panoramio.com/photo/9899533", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9899533.jpg", "longitude": 13.395016, "latitude": 45.676262, "width": 500, "height": 375, "upload_date": "04 May 2008", "owner_id": 381221, "owner_name": "Flavio Snidero", "owner_url": "http://www.panoramio.com/user/381221"} + , + {"photo_id": 324623, "photo_title": "richmond bridge", "photo_url": "http://www.panoramio.com/photo/324623", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/324623.jpg", "longitude": 147.439506, "latitude": -42.734358, "width": 500, "height": 375, "upload_date": "06 January 2007", "owner_id": 66974, "owner_name": "lieskovec", "owner_url": "http://www.panoramio.com/user/66974"} + , + {"photo_id": 4450585, "photo_title": "Giorno di riposo", "photo_url": "http://www.panoramio.com/photo/4450585", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4450585.jpg", "longitude": 35.440521, "latitude": 33.732906, "width": 500, "height": 375, "upload_date": "06 September 2007", "owner_id": 407625, "owner_name": "Lyana Luna", "owner_url": "http://www.panoramio.com/user/407625"} + , + {"photo_id": 1088801, "photo_title": "Kalászos impresszió", "photo_url": "http://www.panoramio.com/photo/1088801", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1088801.jpg", "longitude": 17.727127, "latitude": 47.444575, "width": 500, "height": 360, "upload_date": "28 February 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 290083, "photo_title": "Beach full of life", "photo_url": "http://www.panoramio.com/photo/290083", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/290083.jpg", "longitude": -59.072113, "latitude": -52.430478, "width": 335, "height": 500, "upload_date": "03 January 2007", "owner_id": 61890, "owner_name": "enriquevidalphoto.com", "owner_url": "http://www.panoramio.com/user/61890"} + , + {"photo_id": 5734694, "photo_title": "Virginia Horse Country", "photo_url": "http://www.panoramio.com/photo/5734694", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5734694.jpg", "longitude": -78.754292, "latitude": 38.014964, "width": 500, "height": 375, "upload_date": "05 November 2007", "owner_id": 523038, "owner_name": "Yank in Dixie", "owner_url": "http://www.panoramio.com/user/523038"} + , + {"photo_id": 6012970, "photo_title": "Herbstliches Venedig", "photo_url": "http://www.panoramio.com/photo/6012970", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6012970.jpg", "longitude": 12.343435, "latitude": 45.433752, "width": 500, "height": 336, "upload_date": "19 November 2007", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 6321454, "photo_title": "Sea Storm III - \" Dragonara \" Castle", "photo_url": "http://www.panoramio.com/photo/6321454", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6321454.jpg", "longitude": 9.151177, "latitude": 44.350211, "width": 444, "height": 500, "upload_date": "05 December 2007", "owner_id": 180947, "owner_name": "gilberto silvestri", "owner_url": "http://www.panoramio.com/user/180947"} + , + {"photo_id": 459569, "photo_title": "mt hakkai", "photo_url": "http://www.panoramio.com/photo/459569", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459569.jpg", "longitude": 138.921432, "latitude": 37.092157, "width": 500, "height": 389, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 940337, "photo_title": "Sunrising Monuments", "photo_url": "http://www.panoramio.com/photo/940337", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/940337.jpg", "longitude": -110.110474, "latitude": 36.980255, "width": 500, "height": 287, "upload_date": "21 February 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 2400305, "photo_title": "Cape of Favaritx, Gateway to Another Planet", "photo_url": "http://www.panoramio.com/photo/2400305", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2400305.jpg", "longitude": 4.264122, "latitude": 39.996608, "width": 500, "height": 352, "upload_date": "26 May 2007", "owner_id": 213866, "owner_name": "Nicolas Mertens", "owner_url": "http://www.panoramio.com/user/213866"} + , + {"photo_id": 398130, "photo_title": "Aiguille du Chardonnet", "photo_url": "http://www.panoramio.com/photo/398130", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/398130.jpg", "longitude": 7.013569, "latitude": 45.979190, "width": 500, "height": 333, "upload_date": "12 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 283954, "photo_title": "Dong-ao:The most beautiful coast of Taiwan", "photo_url": "http://www.panoramio.com/photo/283954", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/283954.jpg", "longitude": 121.850481, "latitude": 24.524822, "width": 500, "height": 375, "upload_date": "02 January 2007", "owner_id": 60214, "owner_name": "swinelin", "owner_url": "http://www.panoramio.com/user/60214"} + , + {"photo_id": 5115188, "photo_title": "Iceland", "photo_url": "http://www.panoramio.com/photo/5115188", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5115188.jpg", "longitude": -23.008804, "latitude": 64.947976, "width": 500, "height": 333, "upload_date": "05 October 2007", "owner_id": 588149, "owner_name": "Adam Salwanowicz", "owner_url": "http://www.panoramio.com/user/588149"} + , + {"photo_id": 1865268, "photo_title": "Rainbow Ridge Sunset", "photo_url": "http://www.panoramio.com/photo/1865268", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1865268.jpg", "longitude": -112.404728, "latitude": 36.426808, "width": 500, "height": 333, "upload_date": "21 April 2007", "owner_id": 66847, "owner_name": "Lukas Novak", "owner_url": "http://www.panoramio.com/user/66847"} + , + {"photo_id": 1633076, "photo_title": "Parliament", "photo_url": "http://www.panoramio.com/photo/1633076", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1633076.jpg", "longitude": 19.046752, "latitude": 47.512998, "width": 500, "height": 500, "upload_date": "04 April 2007", "owner_id": 52226, "owner_name": "jenoapu", "owner_url": "http://www.panoramio.com/user/52226"} + , + {"photo_id": 800056, "photo_title": "Karst Landscape in Guangxi, China", "photo_url": "http://www.panoramio.com/photo/800056", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/800056.jpg", "longitude": 107.121944, "latitude": 23.605000, "width": 500, "height": 191, "upload_date": "13 February 2007", "owner_id": 164125, "owner_name": "DannyXu", "owner_url": "http://www.panoramio.com/user/164125"} + , + {"photo_id": 21304, "photo_title": "Matterhorn", "photo_url": "http://www.panoramio.com/photo/21304", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/21304.jpg", "longitude": 7.718582, "latitude": 45.994577, "width": 375, "height": 500, "upload_date": "28 May 2006", "owner_id": 3404, "owner_name": "Csongor Böröczky", "owner_url": "http://www.panoramio.com/user/3404"} + , + {"photo_id": 402493, "photo_title": "Burg-Eltz", "photo_url": "http://www.panoramio.com/photo/402493", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/402493.jpg", "longitude": 7.336400, "latitude": 50.206104, "width": 369, "height": 500, "upload_date": "12 January 2007", "owner_id": 6105, "owner_name": "hackltom", "owner_url": "http://www.panoramio.com/user/6105"} + , + {"photo_id": 411453, "photo_title": "Dune 45 in Sosussvlei", "photo_url": "http://www.panoramio.com/photo/411453", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/411453.jpg", "longitude": 15.397339, "latitude": -24.739972, "width": 500, "height": 333, "upload_date": "13 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 1813822, "photo_title": "Csendes délután", "photo_url": "http://www.panoramio.com/photo/1813822", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1813822.jpg", "longitude": 17.779655, "latitude": 47.507229, "width": 500, "height": 334, "upload_date": "17 April 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 798783, "photo_title": "Georgia, Antelope Canyon, AZ", "photo_url": "http://www.panoramio.com/photo/798783", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/798783.jpg", "longitude": -111.385489, "latitude": 36.873441, "width": 376, "height": 500, "upload_date": "12 February 2007", "owner_id": 52440, "owner_name": "Hank Waxman", "owner_url": "http://www.panoramio.com/user/52440"} + , + {"photo_id": 5193281, "photo_title": "The park at Gamlehaugen a bautiful day in September 2007, Bergen - Norway", "photo_url": "http://www.panoramio.com/photo/5193281", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5193281.jpg", "longitude": 5.336909, "latitude": 60.341253, "width": 500, "height": 279, "upload_date": "09 October 2007", "owner_id": 121518, "owner_name": "S.M Tunli - www.tunliweb.no", "owner_url": "http://www.panoramio.com/user/121518"} + , + {"photo_id": 642882, "photo_title": "La Presolana e la Cometa Hale-Bopp", "photo_url": "http://www.panoramio.com/photo/642882", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/642882.jpg", "longitude": 10.094032, "latitude": 45.927991, "width": 500, "height": 375, "upload_date": "01 February 2007", "owner_id": 38814, "owner_name": "Romeo Ferrari", "owner_url": "http://www.panoramio.com/user/38814"} + , + {"photo_id": 304963, "photo_title": "Calanque d'En Vau 2", "photo_url": "http://www.panoramio.com/photo/304963", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/304963.jpg", "longitude": 5.500288, "latitude": 43.201422, "width": 500, "height": 375, "upload_date": "05 January 2007", "owner_id": 64344, "owner_name": "Seb - Lyon", "owner_url": "http://www.panoramio.com/user/64344"} + , + {"photo_id": 6126154, "photo_title": "Swan - EPping Forest", "photo_url": "http://www.panoramio.com/photo/6126154", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6126154.jpg", "longitude": 0.025658, "latitude": 51.638836, "width": 499, "height": 500, "upload_date": "25 November 2007", "owner_id": 1130880, "owner_name": "marksimms", "owner_url": "http://www.panoramio.com/user/1130880"} + , + {"photo_id": 441426, "photo_title": "Dettifoss", "photo_url": "http://www.panoramio.com/photo/441426", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/441426.jpg", "longitude": -16.390743, "latitude": 65.819939, "width": 500, "height": 350, "upload_date": "15 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 4105301, "photo_title": "Eikesdalsvatnet. Norway.", "photo_url": "http://www.panoramio.com/photo/4105301", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4105301.jpg", "longitude": 8.171768, "latitude": 62.561718, "width": 500, "height": 326, "upload_date": "22 August 2007", "owner_id": 806637, "owner_name": "Bjørn Fransgjerde", "owner_url": "http://www.panoramio.com/user/806637"} + , + {"photo_id": 519765, "photo_title": "Derűs szeglet", "photo_url": "http://www.panoramio.com/photo/519765", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/519765.jpg", "longitude": 17.173862, "latitude": 46.633997, "width": 500, "height": 282, "upload_date": "21 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 4401751, "photo_title": "Fire Escape", "photo_url": "http://www.panoramio.com/photo/4401751", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4401751.jpg", "longitude": -2.315347, "latitude": 52.644873, "width": 366, "height": 500, "upload_date": "04 September 2007", "owner_id": 1295, "owner_name": "Matthew Walters", "owner_url": "http://www.panoramio.com/user/1295"} + , + {"photo_id": 1747294, "photo_title": "Red Fort II / Fuerte rojo II", "photo_url": "http://www.panoramio.com/photo/1747294", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1747294.jpg", "longitude": 73.017197, "latitude": 26.296801, "width": 500, "height": 375, "upload_date": "12 April 2007", "owner_id": 414, "owner_name": "Sonia Villegas", "owner_url": "http://www.panoramio.com/user/414"} + , + {"photo_id": 2856289, "photo_title": "Copacabana Praia", "photo_url": "http://www.panoramio.com/photo/2856289", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2856289.jpg", "longitude": -43.179188, "latitude": -22.969457, "width": 500, "height": 375, "upload_date": "20 June 2007", "owner_id": 496676, "owner_name": "Quasebart", "owner_url": "http://www.panoramio.com/user/496676"} + , + {"photo_id": 3116906, "photo_title": "Mototaki Falls", "photo_url": "http://www.panoramio.com/photo/3116906", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/3116906.jpg", "longitude": 139.954662, "latitude": 39.158750, "width": 500, "height": 375, "upload_date": "04 July 2007", "owner_id": 164173, "owner_name": "tsushima", "owner_url": "http://www.panoramio.com/user/164173"} + , + {"photo_id": 8919659, "photo_title": "Bavarian Forest", "photo_url": "http://www.panoramio.com/photo/8919659", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/8919659.jpg", "longitude": 12.429099, "latitude": 49.084548, "width": 500, "height": 332, "upload_date": "28 March 2008", "owner_id": 696605, "owner_name": "© alfredschaffer", "owner_url": "http://www.panoramio.com/user/696605"} + , + {"photo_id": 2040174, "photo_title": "Looking east from Sognefjellet - april 29", "photo_url": "http://www.panoramio.com/photo/2040174", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2040174.jpg", "longitude": 7.974873, "latitude": 61.561141, "width": 375, "height": 500, "upload_date": "03 May 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 1195122, "photo_title": "Cerro Macon", "photo_url": "http://www.panoramio.com/photo/1195122", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1195122.jpg", "longitude": -67.356405, "latitude": -24.528540, "width": 335, "height": 500, "upload_date": "06 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 1182587, "photo_title": "Gaggenau-Moosbronn, Wallfahrtskirche", "photo_url": "http://www.panoramio.com/photo/1182587", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1182587.jpg", "longitude": 8.384285, "latitude": 48.840486, "width": 382, "height": 500, "upload_date": "05 March 2007", "owner_id": 66229, "owner_name": "Mast", "owner_url": "http://www.panoramio.com/user/66229"} + , + {"photo_id": 4787323, "photo_title": "Hell's Gate(Antigua-Caribe)", "photo_url": "http://www.panoramio.com/photo/4787323", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4787323.jpg", "longitude": -61.722651, "latitude": 17.140052, "width": 500, "height": 375, "upload_date": "20 September 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 5474175, "photo_title": "Chemin bucolique au Lauterbrunnental 2", "photo_url": "http://www.panoramio.com/photo/5474175", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/5474175.jpg", "longitude": 7.909877, "latitude": 46.580479, "width": 500, "height": 384, "upload_date": "22 October 2007", "owner_id": 359127, "owner_name": "wx", "owner_url": "http://www.panoramio.com/user/359127"} + , + {"photo_id": 479364, "photo_title": "The Earth Above Us II", "photo_url": "http://www.panoramio.com/photo/479364", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/479364.jpg", "longitude": 19.053029, "latitude": 47.601392, "width": 500, "height": 317, "upload_date": "18 January 2007", "owner_id": 57869, "owner_name": "NAGY Albert", "owner_url": "http://www.panoramio.com/user/57869"} + , + {"photo_id": 575110, "photo_title": "A huge wave crashes against the front of Kiama Blowhole www.ozthunder.com", "photo_url": "http://www.panoramio.com/photo/575110", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/575110.jpg", "longitude": 150.863657, "latitude": -34.671264, "width": 500, "height": 338, "upload_date": "26 January 2007", "owner_id": 67208, "owner_name": "Michael Thompson", "owner_url": "http://www.panoramio.com/user/67208"} + , + {"photo_id": 543624, "photo_title": "Dalmát álom", "photo_url": "http://www.panoramio.com/photo/543624", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/543624.jpg", "longitude": 15.969143, "latitude": 43.624768, "width": 500, "height": 333, "upload_date": "23 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 121224, "photo_title": "ParadisePW", "photo_url": "http://www.panoramio.com/photo/121224", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/121224.jpg", "longitude": -62.907715, "latitude": -64.830254, "width": 500, "height": 329, "upload_date": "12 December 2006", "owner_id": 19856, "owner_name": "Juan Kratzmaier", "owner_url": "http://www.panoramio.com/user/19856"} + , + {"photo_id": 10074505, "photo_title": "Volcàn Chaitèn, Chaitèn, Palena, Chile Por Daniel Basualto", "photo_url": "http://www.panoramio.com/photo/10074505", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10074505.jpg", "longitude": -72.759705, "latitude": -42.908160, "width": 375, "height": 500, "upload_date": "10 May 2008", "owner_id": 88547, "owner_name": "Patricia Santini", "owner_url": "http://www.panoramio.com/user/88547"} + , + {"photo_id": 10378, "photo_title": "Chiang Mai, temple", "photo_url": "http://www.panoramio.com/photo/10378", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10378.jpg", "longitude": 98.921596, "latitude": 18.805157, "width": 319, "height": 500, "upload_date": "06 February 2006", "owner_id": 414, "owner_name": "Sonia Villegas", "owner_url": "http://www.panoramio.com/user/414"} + , + {"photo_id": 532620, "photo_title": "Morning mist near Skjønhaug", "photo_url": "http://www.panoramio.com/photo/532620", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/532620.jpg", "longitude": 11.297293, "latitude": 59.639511, "width": 333, "height": 500, "upload_date": "22 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 625805, "photo_title": "Primosten blue(s)", "photo_url": "http://www.panoramio.com/photo/625805", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/625805.jpg", "longitude": 15.932236, "latitude": 43.575168, "width": 500, "height": 334, "upload_date": "30 January 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 247704, "photo_title": "Paris in the night", "photo_url": "http://www.panoramio.com/photo/247704", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/247704.jpg", "longitude": 2.294512, "latitude": 48.858052, "width": 327, "height": 500, "upload_date": "27 December 2006", "owner_id": 51517, "owner_name": "threshold2000", "owner_url": "http://www.panoramio.com/user/51517"} + , + {"photo_id": 73888, "photo_title": "Fitz-Roy", "photo_url": "http://www.panoramio.com/photo/73888", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/73888.jpg", "longitude": -72.987328, "latitude": -49.277885, "width": 500, "height": 204, "upload_date": "01 November 2006", "owner_id": 7372, "owner_name": "vuillet", "owner_url": "http://www.panoramio.com/user/7372"} + , + {"photo_id": 6065568, "photo_title": "Amigos para siempre Paris-Francia", "photo_url": "http://www.panoramio.com/photo/6065568", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6065568.jpg", "longitude": 2.288697, "latitude": 48.861906, "width": 375, "height": 500, "upload_date": "22 November 2007", "owner_id": 83865, "owner_name": "Epi F.Villanueva", "owner_url": "http://www.panoramio.com/user/83865"} + , + {"photo_id": 9643938, "photo_title": "Occhio indiscreto ... sulla città ... illuminata ", "photo_url": "http://www.panoramio.com/photo/9643938", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/9643938.jpg", "longitude": 13.818569, "latitude": 45.641329, "width": 500, "height": 449, "upload_date": "23 April 2008", "owner_id": 1121720, "owner_name": "▬ Mauro Antonini ▬", "owner_url": "http://www.panoramio.com/user/1121720"} + , + {"photo_id": 532643, "photo_title": "Icecarved granite at Herføl", "photo_url": "http://www.panoramio.com/photo/532643", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/532643.jpg", "longitude": 11.054649, "latitude": 58.986512, "width": 375, "height": 500, "upload_date": "22 January 2007", "owner_id": 39160, "owner_name": "Snemann", "owner_url": "http://www.panoramio.com/user/39160"} + , + {"photo_id": 112298, "photo_title": "paris06_004IR", "photo_url": "http://www.panoramio.com/photo/112298", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/112298.jpg", "longitude": 2.343779, "latitude": 48.887746, "width": 500, "height": 500, "upload_date": "11 December 2006", "owner_id": 17599, "owner_name": "Dmitry Andreev", "owner_url": "http://www.panoramio.com/user/17599"} + , + {"photo_id": 525997, "photo_title": "Grand Canyon Desert View", "photo_url": "http://www.panoramio.com/photo/525997", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/525997.jpg", "longitude": -111.824341, "latitude": 36.043547, "width": 500, "height": 333, "upload_date": "22 January 2007", "owner_id": 85489, "owner_name": "Bruce MacIver", "owner_url": "http://www.panoramio.com/user/85489"} + , + {"photo_id": 2972849, "photo_title": "Donadea Forest", "photo_url": "http://www.panoramio.com/photo/2972849", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2972849.jpg", "longitude": -6.743374, "latitude": 53.346555, "width": 500, "height": 377, "upload_date": "27 June 2007", "owner_id": 137785, "owner_name": "W@Z", "owner_url": "http://www.panoramio.com/user/137785"} + , + {"photo_id": 1175992, "photo_title": "Mt. Roberts Tram, Juneau, Alaska", "photo_url": "http://www.panoramio.com/photo/1175992", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1175992.jpg", "longitude": -134.391643, "latitude": 58.294679, "width": 500, "height": 347, "upload_date": "05 March 2007", "owner_id": 52440, "owner_name": "Hank Waxman", "owner_url": "http://www.panoramio.com/user/52440"} + , + {"photo_id": 462521, "photo_title": "Fontaine de Trevi", "photo_url": "http://www.panoramio.com/photo/462521", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/462521.jpg", "longitude": 12.483280, "latitude": 41.901047, "width": 500, "height": 333, "upload_date": "17 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 848316, "photo_title": "Malyovitsa, Rila", "photo_url": "http://www.panoramio.com/photo/848316", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/848316.jpg", "longitude": 23.383627, "latitude": 42.201517, "width": 500, "height": 357, "upload_date": "17 February 2007", "owner_id": 16880, "owner_name": "evgenidinev.com", "owner_url": "http://www.panoramio.com/user/16880"} + , + {"photo_id": 459453, "photo_title": "bandaibashi3", "photo_url": "http://www.panoramio.com/photo/459453", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/459453.jpg", "longitude": 139.055586, "latitude": 37.920436, "width": 500, "height": 382, "upload_date": "16 January 2007", "owner_id": 86411, "owner_name": "中村脩-Osamu nakamura", "owner_url": "http://www.panoramio.com/user/86411"} + , + {"photo_id": 968639, "photo_title": "张永富 黄山风光06 Huangshan", "photo_url": "http://www.panoramio.com/photo/968639", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/968639.jpg", "longitude": 118.166199, "latitude": 30.105633, "width": 348, "height": 500, "upload_date": "23 February 2007", "owner_id": 203011, "owner_name": "SammyZhang", "owner_url": "http://www.panoramio.com/user/203011"} + , + {"photo_id": 97731, "photo_title": "Kaimondake", "photo_url": "http://www.panoramio.com/photo/97731", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/97731.jpg", "longitude": 130.652161, "latitude": 31.247443, "width": 500, "height": 212, "upload_date": "09 December 2006", "owner_id": 11781, "owner_name": "ANDRE GARDELLA", "owner_url": "http://www.panoramio.com/user/11781"} + , + {"photo_id": 2859205, "photo_title": "Lundy Lake Sunset", "photo_url": "http://www.panoramio.com/photo/2859205", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2859205.jpg", "longitude": -119.221230, "latitude": 38.031597, "width": 400, "height": 500, "upload_date": "21 June 2007", "owner_id": 376395, "owner_name": "JeffSullivan (www.MyPhotoGuides.com)", "owner_url": "http://www.panoramio.com/user/376395"} + , + {"photo_id": 309190, "photo_title": "Populonia, sunset", "photo_url": "http://www.panoramio.com/photo/309190", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/309190.jpg", "longitude": 10.490313, "latitude": 42.989581, "width": 308, "height": 500, "upload_date": "05 January 2007", "owner_id": 65478, "owner_name": "Gabriele Marabotti", "owner_url": "http://www.panoramio.com/user/65478"} + , + {"photo_id": 54982, "photo_title": "Baia dos Porcos", "photo_url": "http://www.panoramio.com/photo/54982", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/54982.jpg", "longitude": -32.443485, "latitude": -3.855177, "width": 500, "height": 333, "upload_date": "30 September 2006", "owner_id": 7562, "owner_name": "Marcelo E. Salgado", "owner_url": "http://www.panoramio.com/user/7562"} + , + {"photo_id": 58316, "photo_title": "800_Schafberg03", "photo_url": "http://www.panoramio.com/photo/58316", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/58316.jpg", "longitude": 13.429413, "latitude": 47.775445, "width": 500, "height": 316, "upload_date": "07 October 2006", "owner_id": 8060, "owner_name": "Norbert MAIER", "owner_url": "http://www.panoramio.com/user/8060"} + , + {"photo_id": 423887, "photo_title": "Dunes near Zagora", "photo_url": "http://www.panoramio.com/photo/423887", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/423887.jpg", "longitude": -5.872707, "latitude": 30.280713, "width": 500, "height": 333, "upload_date": "14 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 4136144, "photo_title": "Égi jel", "photo_url": "http://www.panoramio.com/photo/4136144", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4136144.jpg", "longitude": 17.564564, "latitude": 47.633181, "width": 500, "height": 376, "upload_date": "23 August 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 6620113, "photo_title": "Winterlandschaft - Winter Scenery - Emmental", "photo_url": "http://www.panoramio.com/photo/6620113", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6620113.jpg", "longitude": 7.787676, "latitude": 47.055856, "width": 500, "height": 374, "upload_date": "22 December 2007", "owner_id": 635422, "owner_name": "♫ Swissmay", "owner_url": "http://www.panoramio.com/user/635422"} + , + {"photo_id": 2702545, "photo_title": "Church at Oia, Santorini", "photo_url": "http://www.panoramio.com/photo/2702545", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2702545.jpg", "longitude": 25.376015, "latitude": 36.461330, "width": 375, "height": 500, "upload_date": "11 June 2007", "owner_id": 555551, "owner_name": "Marilyn Whiteley", "owner_url": "http://www.panoramio.com/user/555551"} + , + {"photo_id": 416472, "photo_title": "Ice Crystal Clouds", "photo_url": "http://www.panoramio.com/photo/416472", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/416472.jpg", "longitude": -105.650969, "latitude": 40.294126, "width": 500, "height": 374, "upload_date": "13 January 2007", "owner_id": 87752, "owner_name": "Richard Ryer", "owner_url": "http://www.panoramio.com/user/87752"} + , + {"photo_id": 6080988, "photo_title": "Zion Tree (HDR)", "photo_url": "http://www.panoramio.com/photo/6080988", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/6080988.jpg", "longitude": -112.946116, "latitude": 37.213331, "width": 500, "height": 333, "upload_date": "23 November 2007", "owner_id": 17488, "owner_name": "John Gillett", "owner_url": "http://www.panoramio.com/user/17488"} + , + {"photo_id": 2321382, "photo_title": "Old Wreck at Bannack", "photo_url": "http://www.panoramio.com/photo/2321382", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/2321382.jpg", "longitude": -112.997518, "latitude": 45.162614, "width": 500, "height": 375, "upload_date": "21 May 2007", "owner_id": 71099, "owner_name": "Eve in Montana", "owner_url": "http://www.panoramio.com/user/71099"} + , + {"photo_id": 122858, "photo_title": "Antelope Canyon - Page, Arizona", "photo_url": "http://www.panoramio.com/photo/122858", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/122858.jpg", "longitude": -111.399908, "latitude": 36.887447, "width": 332, "height": 500, "upload_date": "12 December 2006", "owner_id": 20332, "owner_name": "RJ", "owner_url": "http://www.panoramio.com/user/20332"} + , + {"photo_id": 4445933, "photo_title": "Tavi alkony", "photo_url": "http://www.panoramio.com/photo/4445933", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/4445933.jpg", "longitude": 17.465172, "latitude": 47.864486, "width": 500, "height": 350, "upload_date": "06 September 2007", "owner_id": 109117, "owner_name": "Busa Péter", "owner_url": "http://www.panoramio.com/user/109117"} + , + {"photo_id": 1238515, "photo_title": "EDEN", "photo_url": "http://www.panoramio.com/photo/1238515", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/1238515.jpg", "longitude": -83.677711, "latitude": 22.661542, "width": 500, "height": 345, "upload_date": "09 March 2007", "owner_id": 232099, "owner_name": "mabut", "owner_url": "http://www.panoramio.com/user/232099"} + , + {"photo_id": 398585, "photo_title": "Near Glittertind", "photo_url": "http://www.panoramio.com/photo/398585", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/398585.jpg", "longitude": 8.489170, "latitude": 61.621820, "width": 500, "height": 333, "upload_date": "12 January 2007", "owner_id": 78506, "owner_name": "Philippe Stoop", "owner_url": "http://www.panoramio.com/user/78506"} + , + {"photo_id": 10240311, "photo_title": "two planes", "photo_url": "http://www.panoramio.com/photo/10240311", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/10240311.jpg", "longitude": 20.306683, "latitude": 49.750107, "width": 332, "height": 500, "upload_date": "15 May 2008", "owner_id": 454219, "owner_name": "Rafal Ociepka", "owner_url": "http://www.panoramio.com/user/454219"} + , + {"photo_id": 7593894, "photo_title": "桂林名胜百景——遇龙河", "photo_url": "http://www.panoramio.com/photo/7593894", "photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/7593894.jpg", "longitude": 110.424957, "latitude": 24.781747, "width": 500, "height": 375, "upload_date": "04 February 2008", "owner_id": 161470, "owner_name": "John Su", "owner_url": "http://www.panoramio.com/user/161470"} + ]}; +} + diff --git a/markerclustererplus/markerclustererplus.d.ts b/markerclustererplus/markerclustererplus.d.ts new file mode 100644 index 000000000..24a2b2636 --- /dev/null +++ b/markerclustererplus/markerclustererplus.d.ts @@ -0,0 +1,834 @@ +// Type definitions for MarkerClustererPlus for Google Maps V3 2.1.1 +// Project: http://github.com/mahnunchik/markerclustererplus +// Definitions by: Mathias Rodriguez +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +/// + +/** + * @name ClusterIconStyle + * @class This class represents the object for values in the styles array passed + * to the {@link MarkerClusterer} constructor. The element in this array that is used to + * style the cluster icon is determined by calling the calculator function. + * + * @property {string} url The URL of the cluster icon image file. Required. + * @property {number} height The display height (in pixels) of the cluster icon. Required. + * @property {number} width The display width (in pixels) of the cluster icon. Required. + * @property {Array} [anchorText] The position (in pixels) from the center of the cluster icon to + * where the text label is to be centered and drawn. The format is [yoffset, xoffset] + * where yoffset increases as you go down from center and xoffset + * increases to the right of center. The default is [0, 0]. + * @property {Array} [anchorIcon] The anchor position (in pixels) of the cluster icon. This is the + * spot on the cluster icon that is to be aligned with the cluster position. The format is + * [yoffset, xoffset] where yoffset increases as you go down and + * xoffset increases to the right of the top-left corner of the icon. The default + * anchor position is the center of the cluster icon. + * @property {string} [textColor="black"] The color of the label text shown on the + * cluster icon. + * @property {number} [textSize=11] The size (in pixels) of the label text shown on the + * cluster icon. + * @property {string} [textDecoration="none"] The value of the CSS text-decoration + * property for the label text shown on the cluster icon. + * @property {string} [fontWeight="bold"] The value of the CSS font-weight + * property for the label text shown on the cluster icon. + * @property {string} [fontStyle="normal"] The value of the CSS font-style + * property for the label text shown on the cluster icon. + * @property {string} [fontFamily="Arial,sans-serif"] The value of the CSS font-family + * property for the label text shown on the cluster icon. + * @property {string} [backgroundPosition="0 0"] The position of the cluster icon image + * within the image defined by url. The format is "xpos ypos" + * (the same format as for the CSS background-position property). You must set + * this property appropriately when the image defined by url represents a sprite + * containing multiple images. Note that the position must be specified in px units. + */ + +declare class ClusterIconStyle { + url: string; + height: number; + width: number; + anchorText: number[]; + anchorIcon: number[]; + textColor: string; + textSize: number; + textDecoration: string; + fontWeight: string; + fontStyle: string; + fontFamily: string; + backgroundPosition: string; +} + +/** + * @name ClusterIconInfo + * @class This class is an object containing general information about a cluster icon. This is + * the object that a calculator function returns. + * + * @property {string} text The text of the label to be shown on the cluster icon. + * @property {number} index The index plus 1 of the element in the styles + * array to be used to style the cluster icon. + * @property {string} title The tooltip to display when the mouse moves over the cluster icon. + * If this value is undefined or "", title is set to the + * value of the title property passed to the MarkerClusterer. + */ + +declare class ClusterIconInfo extends google.maps.OverlayView { + text: string; + index: number; + title: string; + /** + * A cluster icon. + * + * @constructor + * @extends google.maps.OverlayView + * @param {Cluster} cluster The cluster with which the icon is to be associated. + * @param {Array} [styles] An array of {@link ClusterIconStyle} defining the cluster icons + * to use for various cluster sizes. + * @private + */ + constructor(cluster: Cluster, styles: ClusterIconStyle[]); + + /** + * Adds the icon to the DOM. + */ + onAdd(): void; + + /** + * Removes the icon from the DOM. + */ + onRemove(): void; + + /** + * Draws the icon. + */ + draw(): void; + + /** + * Hides the icon. + */ + hide(): void; + + /** + * Positions and shows the icon. + */ + show(): void; + + /** + * Sets the icon styles to the appropriate element in the styles array. + * + * @param {ClusterIconInfo} sums The icon label text and styles index. + */ + useStyle(sums: ClusterIconInfo[]): void; + + /** + * Sets the position at which to center the icon. + * + * @param {google.maps.LatLng} center The latlng to set as the center. + */ + setCenter(center: google.maps.LatLng): void; + + /** + * Creates the cssText style parameter based on the position of the icon. + * + * @param {google.maps.Point} pos The position of the icon. + * @return {string} The CSS style text. + */ + createCss(pos: google.maps.Point): string; + + /** + * Returns the position at which to place the DIV depending on the latlng. + * + * @param {google.maps.LatLng} latlng The position in latlng. + * @return {google.maps.Point} The position in pixels. + */ + getPosFromLatLng_(latLng: google.maps.LatLng): google.maps.Point; +} + +interface Cluster { + /** + * Creates a single cluster that manages a group of proximate markers. + * Used internally, do not call this constructor directly. + * @constructor + * @param {MarkerClusterer} mc The MarkerClusterer object with which this + * cluster is associated. + */ + new (mc: MarkerClusterer): Cluster; + + /** + * Returns the number of markers managed by the cluster. You can call this from + * a click, mouseover, or mouseout event handler + * for the MarkerClusterer object. + * + * @return {number} The number of markers in the cluster. + */ + getSize(): number; + + /** + * Returns the array of markers managed by the cluster. You can call this from + * a click, mouseover, or mouseout event handler + * for the MarkerClusterer object. + * + * @return {Array} The array of markers in the cluster. + */ + getMarkers(): google.maps.Marker[]; + + /** + * Returns the center of the cluster. You can call this from + * a click, mouseover, or mouseout event handler + * for the MarkerClusterer object. + * + * @return {google.maps.LatLng} The center of the cluster. + */ + getCenter(): google.maps.LatLng; + + /** + * Returns the map with which the cluster is associated. + * + * @return {google.maps.Map} The map. + * @ignore + */ + getMap(): google.maps.Map; + + /** + * Returns the MarkerClusterer object with which the cluster is associated. + * + * @return {MarkerClusterer} The associated marker clusterer. + * @ignore + */ + getMarkerClusterer(): MarkerClusterer; + + /** + * Returns the bounds of the cluster. + * + * @return {google.maps.LatLngBounds} the cluster bounds. + * @ignore + */ + getBounds(): google.maps.LatLngBounds; + + /** + * Removes the cluster from the map. + * + * @ignore + */ + remove(): void; + + /** + * Adds a marker to the cluster. + * + * @param {google.maps.Marker} marker The marker to be added. + * @return {boolean} True if the marker was added. + * @ignore + */ + addMarker(marker: google.maps.Marker): boolean; + + /** + * Determines if a marker lies within the cluster's bounds. + * + * @param {google.maps.Marker} marker The marker to check. + * @return {boolean} True if the marker lies in the bounds. + * @ignore + */ + isMarkerInClusterBounds(marker: google.maps.Marker): boolean; + + /** + * Calculates the extended bounds of the cluster with the grid. + */ + calculateBounds_(): void; + + /** + * Updates the cluster icon. + */ + updateIcon_(): void; + + /** + * Determines if a marker has already been added to the cluster. + * + * @param {google.maps.Marker} marker The marker to check. + * @return {boolean} True if the marker has already been added. + */ + isMarkerAlreadyAdded_(marker: google.maps.Marker): boolean; +} + +/** + * @name MarkerClustererOptions + * @class This class represents the optional parameter passed to + * the {@link MarkerClusterer} constructor. + * @property {number} [gridSize=60] The grid size of a cluster in pixels. The grid is a square. + * @property {number} [maxZoom=null] The maximum zoom level at which clustering is enabled or + * null if clustering is to be enabled at all zoom levels. + * @property {boolean} [zoomOnClick=true] Whether to zoom the map when a cluster marker is + * clicked. You may want to set this to false if you have installed a handler + * for the click event and it deals with zooming on its own. + * @property {boolean} [averageCenter=false] Whether the position of a cluster marker should be + * the average position of all markers in the cluster. If set to false, the + * cluster marker is positioned at the location of the first marker added to the cluster. + * @property {number} [minimumClusterSize=2] The minimum number of markers needed in a cluster + * before the markers are hidden and a cluster marker appears. + * @property {boolean} [ignoreHidden=false] Whether to ignore hidden markers in clusters. You + * may want to set this to true to ensure that hidden markers are not included + * in the marker count that appears on a cluster marker (this count is the value of the + * text property of the result returned by the default calculator). + * If set to true and you change the visibility of a marker being clustered, be + * sure to also call MarkerClusterer.repaint(). + * @property {string} [title=""] The tooltip to display when the mouse moves over a cluster + * marker. (Alternatively, you can use a custom calculator function to specify a + * different tooltip for each cluster marker.) + * @property {function} [calculator=MarkerClusterer.CALCULATOR] The function used to determine + * the text to be displayed on a cluster marker and the index indicating which style to use + * for the cluster marker. The input parameters for the function are (1) the array of markers + * represented by a cluster marker and (2) the number of cluster icon styles. It returns a + * {@link ClusterIconInfo} object. The default calculator returns a + * text property which is the number of markers in the cluster and an + * index property which is one higher than the lowest integer such that + * 10^i exceeds the number of markers in the cluster, or the size of the styles + * array, whichever is less. The styles array element used has an index of + * index minus 1. For example, the default calculator returns a + * text value of "125" and an index of 3 + * for a cluster icon representing 125 markers so the element used in the styles + * array is 2. A calculator may also return a title + * property that contains the text of the tooltip to be used for the cluster marker. If + * title is not defined, the tooltip is set to the value of the title + * property for the MarkerClusterer. + * @property {string} [clusterClass="cluster"] The name of the CSS class defining general styles + * for the cluster markers. Use this class to define CSS styles that are not set up by the code + * that processes the styles array. + * @property {Array} [styles] An array of {@link ClusterIconStyle} elements defining the styles + * of the cluster markers to be used. The element to be used to style a given cluster marker + * is determined by the function defined by the calculator property. + * The default is an array of {@link ClusterIconStyle} elements whose properties are derived + * from the values for imagePath, imageExtension, and + * imageSizes. + * @property {boolean} [enableRetinaIcons=false] Whether to allow the use of cluster icons that + * have sizes that are some multiple (typically double) of their actual display size. Icons such + * as these look better when viewed on high-resolution monitors such as Apple's Retina displays. + * Note: if this property is true, sprites cannot be used as cluster icons. + * @property {number} [batchSize=MarkerClusterer.BATCH_SIZE] Set this property to the + * number of markers to be processed in a single batch when using a browser other than + * Internet Explorer (for Internet Explorer, use the batchSizeIE property instead). + * @property {number} [batchSizeIE=MarkerClusterer.BATCH_SIZE_IE] When Internet Explorer is + * being used, markers are processed in several batches with a small delay inserted between + * each batch in an attempt to avoid Javascript timeout errors. Set this property to the + * number of markers to be processed in a single batch; select as high a number as you can + * without causing a timeout error in the browser. This number might need to be as low as 100 + * if 15,000 markers are being managed, for example. + * @property {string} [imagePath=MarkerClusterer.IMAGE_PATH] + * The full URL of the root name of the group of image files to use for cluster icons. + * The complete file name is of the form imagePathn.imageExtension + * where n is the image file number (1, 2, etc.). + * @property {string} [imageExtension=MarkerClusterer.IMAGE_EXTENSION] + * The extension name for the cluster icon image files (e.g., "png" or + * "jpg"). + * @property {Array} [imageSizes=MarkerClusterer.IMAGE_SIZES] + * An array of numbers containing the widths of the group of + * imagePathn.imageExtension image files. + * (The images are assumed to be square.) + **/ +interface MarkerClustererOptions { + gridSize: number; + maxZoom: number; + zoomOnClick: boolean; + averageCenter: boolean; + minimumClusterSize: number; + ignoreHidden: boolean; + title: string; + calculator(): Function; + clusterClass: string; + styles: ClusterIconStyle[]; + enableRetinaIcons: boolean; + batchSize: number; + batchSizeIE: number; + imagePath: string; + imageExtension: string; + imageSizes: number[]; +} + +interface MarkerClusterer extends google.maps.OverlayView { + /** + * Creates a MarkerClusterer object with the options specified in {@link MarkerClustererOptions}. + * @constructor + * @extends google.maps.OverlayView + * @param {google.maps.Map} map The Google map to attach to. + * @param {Array.} [opt_markers] The markers to be added to the cluster. + * @param {MarkerClustererOptions} [opt_options] The optional parameters. + */ + new (map: google.maps.Map, opt_markers: google.maps.Marker[], opt_options?: MarkerClustererOptions): MarkerClusterer; + + /** + * Implementation of the onAdd interface method. + * @ignore + */ + onAdd(): void; + + /** + * Implementation of the onRemove interface method. + * Removes map event listeners and all cluster icons from the DOM. + * All managed markers are also put back on the map. + * @ignore + */ + onRemove(): void; + + /** + * Implementation of the draw interface method. + * @ignore + */ + draw(): void; + + /** + * Sets up the styles object. + */ + setupStyles_(): void; + + /** + * Fits the map to the bounds of the markers managed by the clusterer. + */ + fitMapToMarkers(): void; + + /** + * Returns the value of the gridSize property. + * + * @return {number} The grid size. + */ + getGridSize(): number; + + /** + * Sets the value of the gridSize property. + * + * @param {number} gridSize The grid size. + */ + setGridSize(gridSize: number): void; + + /** + * Returns the value of the minimumClusterSize property. + * + * @return {number} The minimum cluster size. + */ + getMinimumClusterSize(): number; + + /** + * Sets the value of the minimumClusterSize property. + * + * @param {number} minimumClusterSize The minimum cluster size. + */ + setMinimumClusterSize(minimumClusterSize: number): void; + + /** + * Returns the value of the maxZoom property. + * + * @return {number} The maximum zoom level. + */ + getMaxZoom(): number; + + /** + * Sets the value of the maxZoom property. + * + * @param {number} maxZoom The maximum zoom level. + */ + setMaxZoom(maxZoom: number): void; + + /** + * Returns the value of the styles property. + * + * @return {Array} The array of styles defining the cluster markers to be used. + */ + getStyles(): ClusterIconStyle[]; + + /** + * Sets the value of the styles property. + * + * @param {Array.} styles The array of styles to use. + */ + setStyles(styles: ClusterIconStyle[]): void; + + /** + * Returns the value of the title property. + * + * @return {string} The content of the title text. + */ + getTitle(): string; + + /** + * Sets the value of the title property. + * + * @param {string} title The value of the title property. + */ + setTitle(title: string): void; + + /** + * Returns the value of the zoomOnClick property. + * + * @return {boolean} True if zoomOnClick property is set. + */ + getZoomOnClick(): boolean; + + /** + * Sets the value of the zoomOnClick property. + * + * @param {boolean} zoomOnClick The value of the zoomOnClick property. + */ + setZoomOnClick(zoomOnClick: boolean): void; + + /** + * Returns the value of the averageCenter property. + * + * @return {boolean} True if averageCenter property is set. + */ + getAverageCenter(): boolean; + + /** + * Sets the value of the averageCenter property. + * + * @param {boolean} averageCenter The value of the averageCenter property. + */ + setAverageCenter(averageCenter: boolean): void; + + /** + * Returns the value of the ignoreHidden property. + * + * @return {boolean} True if ignoreHidden property is set. + */ + getIgnoreHidden(): boolean; + + /** + * Sets the value of the ignoreHidden property. + * + * @param {boolean} ignoreHidden The value of the ignoreHidden property. + */ + setIgnoreHidden(ignoreHidden: boolean): void; + + /** + * Returns the value of the enableRetinaIcons property. + * + * @return {boolean} True if enableRetinaIcons property is set. + */ + getEnableRetinaIcons(): boolean; + + /** + * Sets the value of the enableRetinaIcons property. + * + * @param {boolean} enableRetinaIcons The value of the enableRetinaIcons property. + */ + setEnableRetinaIcons(enableRetinaIcons: boolean): void; + + /** + * Returns the value of the imageExtension property. + * + * @return {string} The value of the imageExtension property. + */ + getImageExtension(): string; + + /** + * Sets the value of the imageExtension property. + * + * @param {string} imageExtension The value of the imageExtension property. + */ + setImageExtension(imageExtension: string): void; + + /** + * Returns the value of the imagePath property. + * + * @return {string} The value of the imagePath property. + */ + getImagePath(): string; + + /** + * Sets the value of the imagePath property. + * + * @param {string} imagePath The value of the imagePath property. + */ + setImagePath(imagePath: string): void; + + /** + * Returns the value of the imageSizes property. + * + * @return {Array} The value of the imageSizes property. + */ + getImageSizes(): number[]; + + /** + * Sets the value of the imageSizes property. + * + * @param {Array} imageSizes The value of the imageSizes property. + */ + setImageSizes(imageSizes: number[]): void; + + /** + * Returns the value of the calculator property. + * + * @return {function} the value of the calculator property. + */ + getCalculator(): Function; + + /** + * Sets the value of the calculator property. + * + * @param {function(Array., number)} calculator The value + * of the calculator property. + */ + setCalculator(calculator: (marker: google.maps.Marker, value: number) => Function): void; + + /** + * Sets the value of the hideLabel property. + * + * @param {boolean} printable The value of the hideLabel property. + */ + setHideLabel(printable: boolean): void; + + /** + * Returns the value of the hideLabel property. + * + * @return {boolean} the value of the hideLabel property. + */ + getHideLabel(): boolean; + + /** + * Returns the value of the batchSizeIE property. + * + * @return {number} the value of the batchSizeIE property. + */ + getBatchSizeIE(): number; + + /** + * Sets the value of the batchSizeIE property. + * + * @param {number} batchSizeIE The value of the batchSizeIE property. + */ + setBatchSizeIE(batchSizeIE: number): void; + + /** + * Returns the value of the clusterClass property. + * + * @return {string} the value of the clusterClass property. + */ + getClusterClass(): string; + + /** + * Sets the value of the clusterClass property. + * + * @param {string} clusterClass The value of the clusterClass property. + */ + setClusterClass(clusterClass: string): void; + + /** + * Returns the array of markers managed by the clusterer. + * + * @return {Array} The array of markers managed by the clusterer. + */ + getMarkers(): google.maps.Marker[]; + + /** + * Returns the number of markers managed by the clusterer. + * + * @return {number} The number of markers. + */ + getTotalMarkers(): number; + + /** + * Returns the current array of clusters formed by the clusterer. + * + * @return {Array} The array of clusters formed by the clusterer. + */ + getClusters(): Cluster[]; + + /** + * Returns the number of clusters formed by the clusterer. + * + * @return {number} The number of clusters formed by the clusterer. + */ + getTotalClusters(): number; + + /** + * Adds a marker to the clusterer. The clusters are redrawn unless + * opt_nodraw is set to true. + * + * @param {google.maps.Marker} marker The marker to add. + * @param {boolean} [opt_nodraw] Set to true to prevent redrawing. + */ + addMarker(marker: google.maps.Marker, opt_nodraw: boolean): void; + + /** + * Adds an array of markers to the clusterer. The clusters are redrawn unless + * opt_nodraw is set to true. + * + * @param {Array.} markers The markers to add. + * @param {boolean} [opt_nodraw] Set to true to prevent redrawing. + */ + addMarkers(markers: google.maps.Marker[], opt_nodraw: boolean): void; + + /** + * Pushes a marker to the clusterer. + * + * @param {google.maps.Marker} marker The marker to add. + */ + pushMarkerTo_(marker: google.maps.Marker): void; + + /** + * Removes a marker from the cluster and map. The clusters are redrawn unless + * opt_nodraw is set to true. Returns true if the + * marker was removed from the clusterer. + * + * @param {google.maps.Marker} marker The marker to remove. + * @param {boolean} [opt_nodraw] Set to true to prevent redrawing. + * @param {boolean} [opt_noMapRemove] Set to true to prevent removal from map but still removing from cluster management + * @return {boolean} True if the marker was removed from the clusterer. + */ + removeMarker(marker: google.maps.Marker, opt_nodraw: boolean, noMapRemove: boolean): boolean; + + /** + * Removes an array of markers from the cluster and map. The clusters are redrawn unless + * opt_nodraw is set to true. Returns true if markers + * were removed from the clusterer. + * + * @param {Array.} markers The markers to remove. + * @param {boolean} [opt_nodraw] Set to true to prevent redrawing. + * @param {boolean} [opt_noMapRemove] Set to true to prevent removal from map but still removing from cluster management + * @return {boolean} True if markers were removed from the clusterer. + */ + removeMarkers(markers: google.maps.Marker[], opt_nodraw: boolean, opt_noMapRemove: boolean): boolean; + + /** + * Removes a marker and returns true if removed, false if not. + * + * @param {google.maps.Marker} marker The marker to remove + * @param {boolean} removeFromMap set to true to explicitly remove from map as well as cluster manangement + * @return {boolean} Whether the marker was removed or not + */ + removeMarker_(marker: google.maps.Marker, removeFromMap: boolean): boolean; + + /** + * Removes all clusters and markers from the map and also removes all markers + * managed by the clusterer. + */ + clearMarkers(): void; + + /** + * Recalculates and redraws all the marker clusters from scratch. + * Call this after changing any properties. + */ + repaint(): void; + + /** + * Returns the current bounds extended by the grid size. + * + * @param {google.maps.LatLngBounds} bounds The bounds to extend. + * @return {google.maps.LatLngBounds} The extended bounds. + * @ignore + */ + getExtendedBounds(bounds: google.maps.LatLngBounds): google.maps.LatLngBounds; + + /** + * Redraws all the clusters. + */ + redraw_(): void; + + /** + * Removes all clusters from the map. The markers are also removed from the map + * if opt_hide is set to true. + * + * @param {boolean} [opt_hide] Set to true to also remove the markers + * from the map. + */ + resetViewport_(opt_hide: boolean): void; + + /** + * Calculates the distance between two latlng locations in km. + * + * @param {google.maps.LatLng} p1 The first lat lng point. + * @param {google.maps.LatLng} p2 The second lat lng point. + * @return {number} The distance between the two points in km. + * @see http://www.movable-type.co.uk/scripts/latlong.html + */ + distanceBetweenPoints_(p1: google.maps.LatLng, p2: google.maps.LatLng): number; + + /** + * Determines if a marker is contained in a bounds. + * + * @param {google.maps.Marker} marker The marker to check. + * @param {google.maps.LatLngBounds} bounds The bounds to check against. + * @return {boolean} True if the marker is in the bounds. + */ + isMarkerInBounds_(marker: google.maps.Marker, bounds: google.maps.LatLngBounds): boolean; + + /** + * Adds a marker to a cluster, or creates a new cluster. + * + * @param {google.maps.Marker} marker The marker to add. + */ + addToClosestCluster_(marker: google.maps.Marker): void; + + /** + * Creates the clusters. This is done in batches to avoid timeout errors + * in some browsers when there is a huge number of markers. + * + * @param {number} iFirst The index of the first marker in the batch of + * markers to be added to clusters. + */ + createClusters_(iFirst: number): void; + + /** + * Extends an object's prototype by another's. + * + * @param {Object} obj1 The object to be extended. + * @param {Object} obj2 The object to extend with. + * @return {Object} The new extended object. + * @ignore + */ + extend(obj1: Object, obj2: Object): Object; + + /** + * The default function for determining the label text and style + * for a cluster icon. + * + * @param {Array.} markers The array of markers represented by the cluster. + * @param {number} numStyles The number of marker styles available. + * @return {ClusterIconInfo} The information resource for the cluster. + * @constant + * @ignore + */ + CALCULATOR(markers: google.maps.Marker[], numStyles: number): ClusterIconInfo; + + /** + * The number of markers to process in one batch. + * + * @type {number} + * @constant + */ + BATCH_SIZE: number; + + /** + * The number of markers to process in one batch (IE only). + * + * @type {number} + * @constant + */ + BATCH_SIZE_IE: number; + + /** + * The default root name for the marker cluster images. + * + * @type {string} + * @constant + */ + IMAGE_PATH: string; + + /** + * The default extension name for the marker cluster images. + * + * @type {string} + * @constant + */ + IMAGE_EXTENSION: string; + + /** + * The default array of sizes for the marker cluster images. + * + * @type {Array.} + * @constant + */ + IMAGE_SIZES: number[]; + +} + +declare var MarkerClusterer: MarkerClusterer; + +interface String { + trim(): string; +} From 0242bb8147de010b2d847175cec9edd9191fa570 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Date: Sun, 24 May 2015 19:39:37 -0300 Subject: [PATCH 060/137] defs + tests from examples --- hashids/hashids-test.ts | 19 +++++++++++++++++++ hashids/hashids.d.ts | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 hashids/hashids-test.ts create mode 100644 hashids/hashids.d.ts diff --git a/hashids/hashids-test.ts b/hashids/hashids-test.ts new file mode 100644 index 000000000..9e51c8b8a --- /dev/null +++ b/hashids/hashids-test.ts @@ -0,0 +1,19 @@ +/// + +/* require hashids */ +import Hashids = require("hashids"); + +/* creating class object */ +var hashids = new Hashids("this is my salt"); + +/* encoding several numbers into one id */ +var id = hashids.encode(1337, 5, 77, 12345678); +id = hashids.encode(1337); +id = hashids.encode(45, 434, 1313, 99); + +/* decoding that id */ +var numbers = hashids.decode(id); +numbers.length > 0 ? true : false; + +hashids = new Hashids("this is my salt", 0, "abcdefgh123456789"); +hashids = new Hashids("this is my salt", 8); diff --git a/hashids/hashids.d.ts b/hashids/hashids.d.ts new file mode 100644 index 000000000..9a98259b0 --- /dev/null +++ b/hashids/hashids.d.ts @@ -0,0 +1,36 @@ +// Type definitions for Hashids.js 1.x +// Project: https://github.com/ivanakimov/hashids.node.js +// Definitions by: Paulo Cesar +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module Hashids { + + export interface IHashids { + new(salt: string, minHashLength?: number, alphabet?: string): IHashids; + version: string; + minAlphabetLength: number; + sepDiv: number; + guardDiv: number; + errorAlphabetLength: string; + errorAlphabetSpace: string; + alphabet: string[]; + seps: string; + minHashLength: number; + salt: string; + decode(hash: string): number[]; + encode(arg: number): string; + encode(arg: number[]): string; + encode(...args: number[]): string; + encodeHex(str: string): string; + decodeHex(hash: string): string; + hash(input: number, alphabet: string): string; + unhash(input: string[], alphabet: string): number; + } +} + +declare module 'hashids' { + var hashids: Hashids.IHashids; + export = hashids; +} \ No newline at end of file From 550e5bfee2c882c2641967325c14ac935d0e6e68 Mon Sep 17 00:00:00 2001 From: Seulgi Kim Date: Fri, 22 May 2015 23:23:59 +0900 Subject: [PATCH 061/137] Add declaration for mpromise --- mpromise/mpromise-tests.ts | 134 +++++++++++++++++++++++++++++++++++++ mpromise/mpromise.d.ts | 42 ++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 mpromise/mpromise-tests.ts create mode 100644 mpromise/mpromise.d.ts diff --git a/mpromise/mpromise-tests.ts b/mpromise/mpromise-tests.ts new file mode 100644 index 000000000..cb09df475 --- /dev/null +++ b/mpromise/mpromise-tests.ts @@ -0,0 +1,134 @@ +/// +/// + +var assert = require('assert'); +import Promise = require('mpromise'); + +function ex1() { + var promise = new Promise; +} + +function ex2() { + var promise = new Promise (function(reason: string, ...args: number[]) { + return; + }); +} + +function ex3() { + var promise = new Promise(); + promise.onResolve(function(reason: string, ...args: number[]) { + return; + }); +} + +function fulfill() { + var promise = new Promise(); + promise.fulfill(1, 2, 3); +} + +function reject() { + var promise = new Promise(); + promise.reject('reason'); +} + +function onFulfill1() { + var promise = new Promise(); + promise.onFulfill(function (...args: number[]) { + assert.equal(3, args[0] + args[1]); + }); + promise.fulfill(1, 2); +} + +function onFulfill2() { + var promise = new Promise(); + promise.fulfill(" :D "); + promise.onFulfill(function (arg: string) { + console.log(arg); // logs " :D " + }); +} + +function onReject1() { + var promise = new Promise(); + promise.onReject(function (reason: string) { + assert.equal('sad', reason); + }); + promise.reject('sad'); +} + +function onReject2() { + var promise = new Promise(); + promise.reject(" :( "); + promise.onReject(function (reason: string) { + console.log(reason); // logs " :( " + }); +} + +function onResolve1() { + var promise = new Promise(); + promise.onResolve(function (err: R, ...args: number[]) { + console.log(args[0] + args[1]); // logs 3 + }); + promise.fulfill(1, 2); +} + +function onResolve2() { + // rejection + var promise = new Promise(); + promise.onResolve(function (err: Error) { + if (err) { + console.log(err.message); // logs "failed" + } + }); + promise.reject(new Error('failed')); +} + +function then() { + var promise = new Promise(); + + promise.then(function (arg: number) { + return arg + 1; + }).then(function (arg: number) { + throw new Error(arg + ' is an error!'); + }).then(null, function (err: Error) { + assert.ok(err instanceof Error); + assert.equal('2 is an error', err.message); + }); + promise.fulfill(1); +} + +function end1() { + var promise = new Promise(); + promise.then(function(){ throw new Error('shucks') }); + setTimeout(function () { + promise.fulfill(); + // error was caught and swallowed by the promise returned from + // p.then(). we either have to always register handlers on + // the returned promises or we can do the following... + }, 10); +} + +function end2() { + // this time we use .end() which prevents catching thrown errors + var promise = new Promise(); + setTimeout(function () { + promise.fulfill(); // throws "shucks" + }, 10); + return promise.then(function(){ throw new Error('shucks') }).end(); // <-- +} + +function chain() { + function makeMeAPromise(i: number) { + var p = new Promise(); + p.fulfill(i); + return p; + } + + var initialPromise = new Promise(); + var returnPromise = initialPromise; + for (var i=0; i<10; ++i) { + returnPromise = returnPromise.chain(makeMeAPromise(i)); + } + + initialPromise.fulfill(); + return returnPromise; +} diff --git a/mpromise/mpromise.d.ts b/mpromise/mpromise.d.ts new file mode 100644 index 000000000..ba6961362 --- /dev/null +++ b/mpromise/mpromise.d.ts @@ -0,0 +1,42 @@ +// Type definitions for mpromise 0.5.4 +// Project: https://github.com/aheckmann/mpromise +// Definitions by: Seulgi Kim +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "mpromise" { + interface IFulfillFunction { + (...args: F[]): void; + (arg: F): void; + } + interface IRejectFunction { + (err: R): void; + } + interface IResolveFunction { + (err: R, ...args: F[]): void; + (err: R, arg: F): void; + } + + class Promise { + constructor(fn?: IResolveFunction); + + static FAILURE: string; + static SUCCESS: string; + + fulfill(...args: F[]): Promise; + fulfill(arg: F): Promise; + reject(reason: R): Promise; + resolve(reason: R, ...args: F[]): Promise; + resolve(reason: R, arg: F): Promise; + + onFulfill(callback: IFulfillFunction): Promise; + onReject(callback: IRejectFunction): Promise; + onResolve(callback: IResolveFunction): Promise; + + then(onFulfilled: IFulfillFunction, onRejected?: IRejectFunction): Promise; + end(): void; + + chain(promise: Promise): Promise; + } + + export = Promise; +} From 1f0b864b9d63574481c8ab39c84ca8378a6dce9c Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Mon, 25 May 2015 00:17:41 -0300 Subject: [PATCH 062/137] Add definitions for the Piwik NodeJS tracker Piwik.org is a tracker similar to Google Analitics, but can run on your own server. These definitions are for the node api. --- piwik-tracker/piwik-tracker.d.ts | 91 ++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 piwik-tracker/piwik-tracker.d.ts diff --git a/piwik-tracker/piwik-tracker.d.ts b/piwik-tracker/piwik-tracker.d.ts new file mode 100644 index 000000000..a1c18b627 --- /dev/null +++ b/piwik-tracker/piwik-tracker.d.ts @@ -0,0 +1,91 @@ +// Type definitions for PiwikTracker v0.1.1 +// Project: http://piwik.org - https://www.npmjs.com/package/piwik-tracker +// Definitions by: Guilherme Bernal +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "piwik-tracker" { + + export = PiwikTracker; + + // refer to http://developer.piwik.org/api-reference/tracking-api + interface PiwikTrackOptions { + // Required parameters + url : string; + + // Recommended parameters + action_name? : string; + _id? : string; + rand? : string; + apiv? : number; + + // Optional User info + urlref? : string; + _cvar? : string; + _idvc? : string; + _viewts? : string; + _idts? : string; + _rcn? : string; + _rck? : string; + res? : string; + h? : number; + m? : number; + s? : number; + ua? : string; + lang? : string; + uid? : string; + cid? : string; + new_visit? : number; + + // Optional Action info + cvar? : string; + link? : string; + download? : string; + search? : string; + search_cat? : string; + search_count? : number; + idgoal? : number; + revenue? : number; + gt_ms? : number; + cs? : string; + + // Optional Event Tracking info + e_c? : string; + e_a? : string; + e_n? : string; + e_v? : string; + + // Optional Content Tracking info + c_n? : string; + c_p? : string; + c_t? : string; + c_i? : string; + + // Optional Ecommerce info + ec_id? : string; + ec_items? : string; + ec_st? : number; + ec_tx? : number; + ec_sh? : number; + ec_dt? : number; + _ects? : number; + + // Other parameters (require authentication via token_auth) + token_auth? : string; + cip? : string; + cdt? : string; + country? : string; + region? : string; + city? : string; + lat? : string; + long? : string; + + // Other parameters + send_image? : number; + } + + class PiwikTracker { + constructor(siteId : number, trackerUrl : string); + track(options : PiwikTrackOptions) : void; + } + +} From ca873b08a38c57559d4eebe949737710343dd177 Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Mon, 25 May 2015 00:23:31 -0300 Subject: [PATCH 063/137] piwik-tracker: Update project url --- piwik-tracker/piwik-tracker.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piwik-tracker/piwik-tracker.d.ts b/piwik-tracker/piwik-tracker.d.ts index a1c18b627..ddb1ae133 100644 --- a/piwik-tracker/piwik-tracker.d.ts +++ b/piwik-tracker/piwik-tracker.d.ts @@ -1,5 +1,5 @@ // Type definitions for PiwikTracker v0.1.1 -// Project: http://piwik.org - https://www.npmjs.com/package/piwik-tracker +// Project: https://www.npmjs.com/package/piwik-tracker // Definitions by: Guilherme Bernal // Definitions: https://github.com/borisyankov/DefinitelyTyped From 16c6bbf0c9771581b4a01ea7b0c13ee8ec283772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elis=C3=A9e?= Date: Mon, 25 May 2015 08:11:12 +0200 Subject: [PATCH 064/137] express: Request.host deprecated, use .hostname --- express/express.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/express/express.d.ts b/express/express.d.ts index 0a7aa0057..0bd42b82f 100644 --- a/express/express.d.ts +++ b/express/express.d.ts @@ -349,6 +349,11 @@ declare module "express" { /** * Parse the "Host" header field hostname. */ + hostname: string; + + /** + * @deprecated Use hostname instead. + */ host: string; /** From f68c7d8664642406b9f79bb182dca39e22da6acc Mon Sep 17 00:00:00 2001 From: Tysonzero Date: Mon, 25 May 2015 00:17:20 -0600 Subject: [PATCH 065/137] Rename inputmask function to mask --- maskedinput/maskedinput-tests.ts | 6 +++--- maskedinput/maskedinput.d.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/maskedinput/maskedinput-tests.ts b/maskedinput/maskedinput-tests.ts index ba9ff33e6..c50387104 100644 --- a/maskedinput/maskedinput-tests.ts +++ b/maskedinput/maskedinput-tests.ts @@ -6,7 +6,7 @@ /// /// -$("#test").inputmask("9:000"); -$("#test").inputmask("9:000", { numeric: true }); +$("#test").mask("9:000"); +$("#test").mask("9:000", { numeric: true }); -var alies = $.inputmask.defaults.aliases; \ No newline at end of file +var alies = $.mask.defaults.aliases; \ No newline at end of file diff --git a/maskedinput/maskedinput.d.ts b/maskedinput/maskedinput.d.ts index 2e918ed66..b099ba326 100644 --- a/maskedinput/maskedinput.d.ts +++ b/maskedinput/maskedinput.d.ts @@ -47,9 +47,9 @@ interface MaskedInputDefaults { } interface JQueryStatic { - inputmask: MaskedInputStatic; + mask: MaskedInputStatic; } interface JQuery { - inputmask(mask: string, options?: JQueryMaskedInputOptions): JQuery; + mask(mask: string, options?: JQueryMaskedInputOptions): JQuery; } \ No newline at end of file From 6a38eeb4bff7b88145b92b188b24a4fa41caeca3 Mon Sep 17 00:00:00 2001 From: Tysonzero Date: Mon, 25 May 2015 00:17:49 -0600 Subject: [PATCH 066/137] Add newlines at end of maskedinput files --- maskedinput/maskedinput-tests.ts | 2 +- maskedinput/maskedinput.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maskedinput/maskedinput-tests.ts b/maskedinput/maskedinput-tests.ts index c50387104..52d01db21 100644 --- a/maskedinput/maskedinput-tests.ts +++ b/maskedinput/maskedinput-tests.ts @@ -9,4 +9,4 @@ $("#test").mask("9:000"); $("#test").mask("9:000", { numeric: true }); -var alies = $.mask.defaults.aliases; \ No newline at end of file +var alies = $.mask.defaults.aliases; diff --git a/maskedinput/maskedinput.d.ts b/maskedinput/maskedinput.d.ts index b099ba326..cf30fe023 100644 --- a/maskedinput/maskedinput.d.ts +++ b/maskedinput/maskedinput.d.ts @@ -52,4 +52,4 @@ interface JQueryStatic { interface JQuery { mask(mask: string, options?: JQueryMaskedInputOptions): JQuery; -} \ No newline at end of file +} From 179b684deb12f0660ec06ac7d71211dd216c493d Mon Sep 17 00:00:00 2001 From: Ruslan Grabovoy Date: Mon, 25 May 2015 12:57:56 +0300 Subject: [PATCH 067/137] Make errback an optional argument (Squire.js) --- squirejs/squirejs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squirejs/squirejs.d.ts b/squirejs/squirejs.d.ts index 693ca7d90..a6ee7ec20 100644 --- a/squirejs/squirejs.d.ts +++ b/squirejs/squirejs.d.ts @@ -9,7 +9,7 @@ declare module 'Squire' { constructor(context: string); mock(name: string, mock: any): Squire; mock(mocks: {[name: string]: any}): Squire; - require(dependencies: string[], callback: Function, errback: Function): Squire; + require(dependencies: string[], callback: Function, errback?: Function): Squire; store(name: string | string[]): Squire; clean(): Squire; clean(name: string | string[]): Squire; From 4c960b46b3a841bccf7c26b3d575ea45cb97172f Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 24 Apr 2015 22:20:21 -0400 Subject: [PATCH 068/137] Move to uri namespace --- urijs/URI-tests.ts | 16 ++ urijs/URI.d.ts | 377 +++++++++++++++++++++++++-------------------- 2 files changed, 222 insertions(+), 171 deletions(-) create mode 100644 urijs/URI-tests.ts diff --git a/urijs/URI-tests.ts b/urijs/URI-tests.ts new file mode 100644 index 000000000..4ab69219e --- /dev/null +++ b/urijs/URI-tests.ts @@ -0,0 +1,16 @@ +/// + +new URI(); +new URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); +new URI({ + protocol: 'http', + username: 'user', + password: 'pass', + hostname: 'example.org', + port: '80', + path: '/foo/bar.html', + query: 'foo=bar&bar=baz', + fragment: 'frag' +}); + +var uri: uri.URI = $('a').uri(); diff --git a/urijs/URI.d.ts b/urijs/URI.d.ts index 448365762..2f40b1a46 100644 --- a/urijs/URI.d.ts +++ b/urijs/URI.d.ts @@ -1,186 +1,221 @@ // Type definitions for URI.js // Project: https://github.com/medialize/URI.js -// Definitions by: RodneyJT +// Definitions by: RodneyJT , Brian Surowiec // Definitions: https://github.com/borisyankov/DefinitelyTyped /// -interface URIOptions { - protocol?: string; - username?: string; - password?: string; - hostname?: string; - port?: string; - path?: string; - query?: string; - fragment?: string; -} +declare module uri { -declare class URI { - constructor(); - constructor(uri: string); - constructor(options: URIOptions); - clone(): URI; - href(): string; - href(url: string): void; - valueOf(): string; - scheme(): string; - protocol(): string; - scheme(protocol: string): URI; - protocol(protocol: string): URI; - username(): string; - username(uname: string): URI; - password(): string; - password(pw: string): URI; - port(): string; - port(port: string): URI; - hostname(): string; - hostname(hostname: string): URI; - host(): string; - host(host: string): URI; - userinfo(): string; - userinfo(userinfo: string): URI; - authority(): string; - authority(authority: string): URI; - domain(): string; - domain(domain: boolean): string; - domain(domain: string): URI; - subdomain(): string; - subdomain(subdomain: string): URI; - tld(): string; - tld(tld: boolean): string; - tld(tld: string): URI; - path(): string; - path(path: boolean): string; - path(path: string): URI; - pathname(): string; - pathname(path: boolean): string; - pathname(path: string): URI; - directory(): string; - directory(dir: boolean): string; - directory(dir: string): URI; - filename(): string; - filename(file: boolean): string; - filename(file: string): URI; - suffix(): string; - suffix(suffix: boolean): string; - suffix(suffix: string): URI; - segment(): string[]; - segment(segments: string[]): string; - segment(position: number): string; - segment(position: number, level: string): string; - segment(level: string): string; - search(): string; - search(qry: string): URI; - search(qry: boolean): any; - search(qry: Object): URI; - query(): string; - query(qry: string): URI; - query(qry: boolean): Object; - query(qry: Object): URI; - hash(): string; - hash(hash: string): URI; - fragment(): string; - fragment(fragment: string): URI; - resource(): string; - resource(resource: string): URI; - is(qry: string): boolean; - addSearch(qry: string): URI; - addSearch(qry: Object): URI; - addQuery(qry: string): URI; - addQuery(qry: Object): URI; - removeSearch(qry: string): URI; - removeSearch(qry: Object): URI; - removeQuery(qry: string): URI; - removeQuery(qry: Object): URI; - addFragment(fragment: string): URI; - //fragmentPrefix: string; - fragmentPrefix(prefix: string): URI; - normalize(): URI; - normalizeProtocol(): URI; - normalizeHostname(): URI; - normalizePort(): URI; - normalizePathname(): URI; - normalizePath(): URI; - normalizeSearch(): URI; - normalizeQuery(): URI; - normalizeHash(): URI; - normalizeFragment(): URI; - iso8859(): URI; - unicode(): URI; - readable(): string; - relativeTo(path: string): URI; - absoluteTo(path: string): URI; - equals(): boolean; - equals(url: string): boolean; - static parse(url: string): { - protocol: string; - username: string; - password: string; - hostname: string; - port: string; - path: string; - query: string; - fragment: string; - }; - static parseAuthority(url: string, parts: { + interface URI { + absoluteTo(path: string): URI; + addFragment(fragment: string): URI; + addQuery(qry: string): URI; + addQuery(qry: Object): URI; + addSearch(qry: string): URI; + addSearch(qry: Object): URI; + authority(): string; + authority(authority: string): URI; + + clone(): URI; + + directory(): string; + directory(dir: boolean): string; + directory(dir: string): URI; + domain(): string; + domain(domain: boolean): string; + domain(domain: string): URI; + + equals(): boolean; + equals(url: string): boolean; + + filename(): string; + filename(file: boolean): string; + filename(file: string): URI; + fragment(): string; + fragment(fragment: string): URI; + fragmentPrefix(prefix: string): URI; + + hash(): string; + hash(hash: string): URI; + host(): string; + host(host: string): URI; + hostname(): string; + hostname(hostname: string): URI; + href(): string; + href(url: string): void; + + is(qry: string): boolean; + iso8859(): URI; + + normalize(): URI; + normalizeFragment(): URI; + normalizeHash(): URI; + normalizeHostname(): URI; + normalizePath(): URI; + normalizePathname(): URI; + normalizePort(): URI; + normalizeProtocol(): URI; + normalizeQuery(): URI; + normalizeSearch(): URI; + + password(): string; + password(pw: string): URI; + path(): string; + path(path: boolean): string; + path(path: string): URI; + pathname(): string; + pathname(path: boolean): string; + pathname(path: string): URI; + port(): string; + port(port: string): URI; + protocol(): string; + protocol(protocol: string): URI; + + query(): string; + query(qry: string): URI; + query(qry: boolean): Object; + query(qry: Object): URI; + + readable(): string; + relativeTo(path: string): URI; + removeQuery(qry: string): URI; + removeQuery(qry: Object): URI; + removeSearch(qry: string): URI; + removeSearch(qry: Object): URI; + resource(): string; + resource(resource: string): URI; + + scheme(): string; + scheme(protocol: string): URI; + search(): string; + search(qry: string): URI; + search(qry: boolean): any; + search(qry: Object): URI; + segment(): string[]; + segment(segments: string[]): string; + segment(position: number): string; + segment(position: number, level: string): string; + segment(level: string): string; + subdomain(): string; + subdomain(subdomain: string): URI; + suffix(): string; + suffix(suffix: boolean): string; + suffix(suffix: string): URI; + + tld(): string; + tld(tld: boolean): string; + tld(tld: string): URI; + + unicode(): URI; + userinfo(): string; + userinfo(userinfo: string): URI; + username(): string; + username(uname: string): URI; + + valueOf(): string; + } + + interface URIOptions { + protocol?: string; username?: string; password?: string; hostname?: string; port?: string; - }): string; - static parseUserinfo(url: string, parts: { - username?: string; - password?: string; - }): string; - static parseHost(url: string, parts: { - hostname?: string; - port?: string; - }): string; - static parseQuery(url: string): Object; - static build(parts: { - protocol: string; - username: string; - password: string; - hostname: string; - port: string; - path: string; - query: string; - fragment: string; - }): string; - static buildAuthority(parts: { - username?: string; - password?: string; - hostname?: string; - port?: string; - }): string; - static buildUserinfo(parts: { - username?: string; - password?: string; - }): string; - static buildHost(parts: { - hostname?: string; - port?: string; - }): string; - static buildQuery(qry: Object): string; - static buildQuery(qry: Object, duplicates: boolean): string; - static encode(str: string): string; - static decode(str: string): string; - static encodeReserved(str: string): string; - static encodeQuery(qry: string): string; - static decodeQuery(qry: string): string; - static addQuery(data: Object, prop: string, value: string): Object; - static addQuery(data: Object, qryObj: Object): Object; - static removeQuery(data: Object, prop: string, value: string): Object; - static removeQuery(data: Object, props: string[]): Object; - static removeQuery(data: Object, props: Object): Object; - static commonPath(path1: string, path2: string): string; - static withinString(source: string, func: (url: string) => string): string; - static iso8859(): void; - static unicode(): void; - static expand(template: string, vals: Object): URI; + path?: string; + query?: string; + fragment?: string; + } + + interface URIStatic { + new (): URI; + new (value: string | URIOptions): URI; + + addQuery(data: Object, prop: string, value: string): Object; + addQuery(data: Object, qryObj: Object): Object; + + build(parts: { + protocol: string; + username: string; + password: string; + hostname: string; + port: string; + path: string; + query: string; + fragment: string; + }): string; + buildAuthority(parts: { + username?: string; + password?: string; + hostname?: string; + port?: string; + }): string; + buildHost(parts: { + hostname?: string; + port?: string; + }): string; + buildQuery(qry: Object): string; + buildQuery(qry: Object, duplicates: boolean): string; + buildUserinfo(parts: { + username?: string; + password?: string; + }): string; + + commonPath(path1: string, path2: string): string; + + decode(str: string): string; + decodeQuery(qry: string): string; + + encode(str: string): string; + encodeQuery(qry: string): string; + encodeReserved(str: string): string; + expand(template: string, vals: Object): URI; + + iso8859(): void; + + parse(url: string): { + protocol: string; + username: string; + password: string; + hostname: string; + port: string; + path: string; + query: string; + fragment: string; + }; + parseAuthority(url: string, parts: { + username?: string; + password?: string; + hostname?: string; + port?: string; + }): string; + parseHost(url: string, parts: { + hostname?: string; + port?: string; + }): string; + parseQuery(url: string): Object; + parseUserinfo(url: string, parts: { + username?: string; + password?: string; + }): string; + + removeQuery(data: Object, prop: string, value: string): Object; + removeQuery(data: Object, props: string[]): Object; + removeQuery(data: Object, props: Object): Object; + + unicode(): void; + + withinString(source: string, func: (url: string) => string): string; + } + } interface JQuery { - uri(): URI; + uri(): uri.URI; +} + +declare var URI: uri.URIStatic; + +declare module 'URI' { + export = URI; } From 74eeac855c6e93bc6a780700cc06ba0b5059ae0a Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 24 Apr 2015 22:21:50 -0400 Subject: [PATCH 069/137] Add support for URI() --- urijs/URI-tests.ts | 13 +++++++++++++ urijs/URI.d.ts | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/urijs/URI-tests.ts b/urijs/URI-tests.ts index 4ab69219e..75e999140 100644 --- a/urijs/URI-tests.ts +++ b/urijs/URI-tests.ts @@ -1,5 +1,18 @@ /// +URI(); +URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); +URI({ + protocol: 'http', + username: 'user', + password: 'pass', + hostname: 'example.org', + port: '80', + path: '/foo/bar.html', + query: 'foo=bar&bar=baz', + fragment: 'frag' +}); + new URI(); new URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); new URI({ diff --git a/urijs/URI.d.ts b/urijs/URI.d.ts index 2f40b1a46..b140df400 100644 --- a/urijs/URI.d.ts +++ b/urijs/URI.d.ts @@ -1,4 +1,4 @@ -// Type definitions for URI.js +// Type definitions for URI.js 1.15.1 // Project: https://github.com/medialize/URI.js // Definitions by: RodneyJT , Brian Surowiec // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -128,6 +128,9 @@ declare module uri { } interface URIStatic { + (): URI; + (value: string | URIOptions): URI; + new (): URI; new (value: string | URIOptions): URI; From e15a4e3df3674496cc08f17cb97b0b8ac9af65aa Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 24 Apr 2015 23:29:27 -0400 Subject: [PATCH 070/137] Add setQuery and setSearch methods --- urijs/URI-tests.ts | 5 +++++ urijs/URI.d.ts | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/urijs/URI-tests.ts b/urijs/URI-tests.ts index 75e999140..0c5efc8c7 100644 --- a/urijs/URI-tests.ts +++ b/urijs/URI-tests.ts @@ -26,4 +26,9 @@ new URI({ fragment: 'frag' }); +URI('').setQuery('foo', 'bar'); +URI('').setQuery({ foo: 'bar' }); +URI('').setSearch('foo', 'bar'); +URI('').setSearch({ foo: 'bar' }); + var uri: uri.URI = $('a').uri(); diff --git a/urijs/URI.d.ts b/urijs/URI.d.ts index b140df400..f745c6164 100644 --- a/urijs/URI.d.ts +++ b/urijs/URI.d.ts @@ -97,6 +97,10 @@ declare module uri { segment(position: number): string; segment(position: number, level: string): string; segment(level: string): string; + setQuery(key: string, value: string): URI; + setQuery(qry: Object): URI; + setSearch(key: string, value: string): URI; + setSearch(qry: Object): URI; subdomain(): string; subdomain(subdomain: string): URI; suffix(): string; From ab3cc6e0e0c362472527c174c2e7c1f6e21968c1 Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 24 Apr 2015 23:30:16 -0400 Subject: [PATCH 071/137] Add html element constructors --- urijs/URI-tests.ts | 2 ++ urijs/URI.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/urijs/URI-tests.ts b/urijs/URI-tests.ts index 0c5efc8c7..2ccd29d9c 100644 --- a/urijs/URI-tests.ts +++ b/urijs/URI-tests.ts @@ -12,6 +12,7 @@ URI({ query: 'foo=bar&bar=baz', fragment: 'frag' }); +URI(document.createElement('a')); new URI(); new URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); @@ -25,6 +26,7 @@ new URI({ query: 'foo=bar&bar=baz', fragment: 'frag' }); +new URI(document.createElement('a')); URI('').setQuery('foo', 'bar'); URI('').setQuery({ foo: 'bar' }); diff --git a/urijs/URI.d.ts b/urijs/URI.d.ts index f745c6164..b59dad6aa 100644 --- a/urijs/URI.d.ts +++ b/urijs/URI.d.ts @@ -133,10 +133,10 @@ declare module uri { interface URIStatic { (): URI; - (value: string | URIOptions): URI; + (value: string | URIOptions | HTMLElement): URI; new (): URI; - new (value: string | URIOptions): URI; + new (value: string | URIOptions | HTMLElement): URI; addQuery(data: Object, prop: string, value: string): Object; addQuery(data: Object, qryObj: Object): Object; From 6c7eba43d4560122032c8504450725645f38832a Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Mon, 25 May 2015 15:28:02 -0400 Subject: [PATCH 072/137] Rename files to match project name --- urijs/{URI-tests.ts => URIjs-tests.ts} | 2 +- urijs/{URI.d.ts => URIjs.d.ts} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename urijs/{URI-tests.ts => URIjs-tests.ts} (95%) rename urijs/{URI.d.ts => URIjs.d.ts} (100%) diff --git a/urijs/URI-tests.ts b/urijs/URIjs-tests.ts similarity index 95% rename from urijs/URI-tests.ts rename to urijs/URIjs-tests.ts index 2ccd29d9c..2dfd15618 100644 --- a/urijs/URI-tests.ts +++ b/urijs/URIjs-tests.ts @@ -1,4 +1,4 @@ -/// +/// URI(); URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); diff --git a/urijs/URI.d.ts b/urijs/URIjs.d.ts similarity index 100% rename from urijs/URI.d.ts rename to urijs/URIjs.d.ts From eed636e1e9b4a9de3d15c157f79e22fbafcb27ba Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Mon, 25 May 2015 21:45:59 -0300 Subject: [PATCH 073/137] piwik-tracker: Add test file --- piwik-tracker/piwik-tracker-tests.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 piwik-tracker/piwik-tracker-tests.ts diff --git a/piwik-tracker/piwik-tracker-tests.ts b/piwik-tracker/piwik-tracker-tests.ts new file mode 100644 index 000000000..f509fe57e --- /dev/null +++ b/piwik-tracker/piwik-tracker-tests.ts @@ -0,0 +1,28 @@ +/// +/// + +// Example code taken from https://www.npmjs.com/package/piwik-tracker + +var PiwikTracker = require('piwik-tracker'); + +// Initialize with your site ID and Piwik URL +var piwik = new PiwikTracker(1, 'http://mywebsite.com/piwik.php'); + +// Optional: Respond to tracking errors +piwik.on('error', function(err) { + console.log('error tracking request: ', err) +}) + +// Track a request URL: +// Either as a simple string … +piwik.track('http://example.com/track/this/url'); + +// … or provide further options: +piwik.track({ + url: 'http://example.com/track/this/url', + action_name: 'This will be shown in your dashboard', + ua: 'Node.js v0.10.24', + cvar: JSON.stringify({ + '1': ['custom variable name', 'custom variable value'] + }) +}); From 513a7049f9df45546d28291dea522c2fa7c4ffa9 Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Mon, 25 May 2015 21:50:59 -0300 Subject: [PATCH 074/137] piwik-tracker: PiwikTracker should inherit EventEmitter --- piwik-tracker/piwik-tracker.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piwik-tracker/piwik-tracker.d.ts b/piwik-tracker/piwik-tracker.d.ts index ddb1ae133..c40a834b0 100644 --- a/piwik-tracker/piwik-tracker.d.ts +++ b/piwik-tracker/piwik-tracker.d.ts @@ -83,7 +83,7 @@ declare module "piwik-tracker" { send_image? : number; } - class PiwikTracker { + class PiwikTracker extends EventEmitter { constructor(siteId : number, trackerUrl : string); track(options : PiwikTrackOptions) : void; } From abee08ec189f0ea50e16d4b82c37fdf16a799517 Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Mon, 25 May 2015 21:51:26 -0300 Subject: [PATCH 075/137] piwik-tracker-test: Fix parameter type (implicity any) --- piwik-tracker/piwik-tracker-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piwik-tracker/piwik-tracker-tests.ts b/piwik-tracker/piwik-tracker-tests.ts index f509fe57e..7d06d6bdc 100644 --- a/piwik-tracker/piwik-tracker-tests.ts +++ b/piwik-tracker/piwik-tracker-tests.ts @@ -9,7 +9,7 @@ var PiwikTracker = require('piwik-tracker'); var piwik = new PiwikTracker(1, 'http://mywebsite.com/piwik.php'); // Optional: Respond to tracking errors -piwik.on('error', function(err) { +piwik.on('error', function(err : Error) { console.log('error tracking request: ', err) }) From 3c378d7859679798d2b859e2087c095d93f6e2c9 Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Mon, 25 May 2015 21:53:01 -0300 Subject: [PATCH 076/137] piwik-tracker: Should refer node.d.ts --- piwik-tracker/piwik-tracker.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/piwik-tracker/piwik-tracker.d.ts b/piwik-tracker/piwik-tracker.d.ts index c40a834b0..498757002 100644 --- a/piwik-tracker/piwik-tracker.d.ts +++ b/piwik-tracker/piwik-tracker.d.ts @@ -3,6 +3,8 @@ // Definitions by: Guilherme Bernal // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// + declare module "piwik-tracker" { export = PiwikTracker; From 917e0a59a0240ccbd59c62edbd399e526993272f Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Mon, 25 May 2015 21:55:53 -0300 Subject: [PATCH 077/137] piwik-tracker: Properly import EventEmitter --- piwik-tracker/piwik-tracker.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/piwik-tracker/piwik-tracker.d.ts b/piwik-tracker/piwik-tracker.d.ts index 498757002..129b714ca 100644 --- a/piwik-tracker/piwik-tracker.d.ts +++ b/piwik-tracker/piwik-tracker.d.ts @@ -7,6 +7,8 @@ declare module "piwik-tracker" { + import events = require('events'); + export = PiwikTracker; // refer to http://developer.piwik.org/api-reference/tracking-api @@ -85,7 +87,7 @@ declare module "piwik-tracker" { send_image? : number; } - class PiwikTracker extends EventEmitter { + class PiwikTracker extends events.EventEmitter { constructor(siteId : number, trackerUrl : string); track(options : PiwikTrackOptions) : void; } From 3eb36c97b6a438a44709d7c06ad0f98abb63cc2c Mon Sep 17 00:00:00 2001 From: Frank Bille Date: Tue, 26 May 2015 16:04:25 +0200 Subject: [PATCH 078/137] Return Firebase as type from $ref This is what really happens in the source code for AngularFire 1.1.1 (and always has), for both AngularFireObject and AngularFireArray. See https://github.com/firebase/angularfire/blob/1aa81906cdfb3e35e7c31fc6dee8a4922b1470ae/src/FirebaseObject.js#L125 --- angularfire/angularfire.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angularfire/angularfire.d.ts b/angularfire/angularfire.d.ts index 46d95750c..04af445d9 100644 --- a/angularfire/angularfire.d.ts +++ b/angularfire/angularfire.d.ts @@ -33,7 +33,7 @@ interface AngularFireObject extends AngularFireSimpleObject { $loaded(resolve?: (x: AngularFireObject) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise; $loaded(resolve?: (x: AngularFireObject) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise; $loaded(resolve?: (x: AngularFireObject) => void, reject?: (err: any) => any): ng.IPromise; - $ref(): AngularFire; + $ref(): Firebase; $bindTo(scope: ng.IScope, varName: string): ng.IPromise; $watch(callback: Function, context?: any): Function; $destroy(): void; @@ -53,7 +53,7 @@ interface AngularFireArray extends Array { $loaded(resolve?: (x: AngularFireArray) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise; $loaded(resolve?: (x: AngularFireArray) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise; $loaded(resolve?: (x: AngularFireArray) => void, reject?: (err: any) => any): ng.IPromise; - $ref(): AngularFire; + $ref(): Firebase; $watch(cb: (event: string, key: string, prevChild: string) => void, context?: any): Function; $destroy(): void; } From b67ca7586142caf806555e3bc17ed3586fe22b04 Mon Sep 17 00:00:00 2001 From: Frank Bille Date: Tue, 26 May 2015 16:21:44 +0200 Subject: [PATCH 079/137] Fix tests to expect correct return type. Also stop using deprecated methods and use $firebase(Object|Array) directly instead. --- angularfire/angularfire-tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/angularfire/angularfire-tests.ts b/angularfire/angularfire-tests.ts index d636c88e6..c649301e3 100644 --- a/angularfire/angularfire-tests.ts +++ b/angularfire/angularfire-tests.ts @@ -46,7 +46,7 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi // AngularFireObject { - var obj = sync.$asObject(); + var obj = $FirebaseObject(ref); // $id if (obj.$id !== ref.name()) throw "error"; @@ -63,7 +63,7 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi }); // $ref() - if (obj.$ref() !== sync) throw "error"; + if (obj.$ref() !== ref) throw "error"; // $bindTo() obj.$bindTo($scope, "data").then(function () { @@ -92,10 +92,10 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi // AngularFireArray { - var list = sync.$asArray(); + var list = $FirebaseArray(ref); // $ref() - if (list.$ref() !== sync) throw "error"; + if (list.$ref() !== ref) throw "error"; // $add() list.$add({ foo: "foo value" }); From f35df7ab4ca0747450182d5da657d6eec486c363 Mon Sep 17 00:00:00 2001 From: Frank Bille Date: Tue, 26 May 2015 17:05:10 +0200 Subject: [PATCH 080/137] Added documentation from AngularFire Copied the jsdoc directly from https://github.com/firebase/angularfire/tree/master/src --- angularfire/angularfire.d.ts | 385 +++++++++++++++++++++++++++++++++++ 1 file changed, 385 insertions(+) diff --git a/angularfire/angularfire.d.ts b/angularfire/angularfire.d.ts index 46d95750c..9370b2c98 100644 --- a/angularfire/angularfire.d.ts +++ b/angularfire/angularfire.d.ts @@ -10,6 +10,9 @@ interface AngularFireService { (firebase: Firebase, config?: any): AngularFire; } +/** + * @deprecated. Not possible with AngularFire 1.0+ + */ interface AngularFire { $asArray(): AngularFireArray; $asObject(): AngularFireObject; @@ -24,37 +27,279 @@ interface AngularFire { $transaction(key:string, updateFn: (currentData: any) => any, applyLocally?: boolean): ng.IPromise; } +/** + * Creates and maintains a synchronized object, with 2-way bindings between Angular and Firebase. + */ interface AngularFireObject extends AngularFireSimpleObject { $id: string; $priority: number; $value: any; + + /** + * Removes all keys from the FirebaseObject and also removes + * the remote data from the server. + * + * @returns a promise which will resolve after the op completes + */ + $remove(): ng.IPromise; + /** + * Saves all data on the FirebaseObject back to Firebase. + * @returns a promise which will resolve after the save is completed. + */ $save(): ng.IPromise; + + /** + * The loaded method is invoked after the initial batch of data arrives from the server. + * When this resolves, all data which existed prior to calling $asObject() is now cached + * locally in the object. + * + * As a shortcut is also possible to pass resolve/reject methods directly into this + * method just as they would be passed to .then() + * + * @param {Function} resolve + * @param {Function} reject + * @returns a promise which resolves after initial data is downloaded from Firebase + */ $loaded(resolve?: (x: AngularFireObject) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise; + + /** + * The loaded method is invoked after the initial batch of data arrives from the server. + * When this resolves, all data which existed prior to calling $asObject() is now cached + * locally in the object. + * + * As a shortcut is also possible to pass resolve/reject methods directly into this + * method just as they would be passed to .then() + * + * @param {Function} resolve + * @param {Function} reject + * @returns a promise which resolves after initial data is downloaded from Firebase + */ $loaded(resolve?: (x: AngularFireObject) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise; + + /** + * The loaded method is invoked after the initial batch of data arrives from the server. + * When this resolves, all data which existed prior to calling $asObject() is now cached + * locally in the object. + * + * As a shortcut is also possible to pass resolve/reject methods directly into this + * method just as they would be passed to .then() + * + * @param {Function} resolve + * @param {Function} reject + * @returns a promise which resolves after initial data is downloaded from Firebase + */ $loaded(resolve?: (x: AngularFireObject) => void, reject?: (err: any) => any): ng.IPromise; + + /** + * @returns {Firebase} the original Firebase instance used to create this object. + */ $ref(): AngularFire; + + /** + * Creates a 3-way data sync between this object, the Firebase server, and a + * scope variable. This means that any changes made to the scope variable are + * pushed to Firebase, and vice versa. + * + * If scope emits a $destroy event, the binding is automatically severed. Otherwise, + * it is possible to unbind the scope variable by using the `unbind` function + * passed into the resolve method. + * + * Can only be bound to one scope variable at a time. If a second is attempted, + * the promise will be rejected with an error. + * + * @param {object} scope + * @param {string} varName + * @returns a promise which resolves to an unbind method after data is set in scope + */ $bindTo(scope: ng.IScope, varName: string): ng.IPromise; + + /** + * Listeners passed into this method are notified whenever a new change is received + * from the server. Each invocation is sent an object containing + * { type: 'value', key: 'my_firebase_id' } + * + * This method returns an unbind function that can be used to detach the listener. + * + * @param {Function} cb + * @param {Object} [context] + * @returns {Function} invoke to stop observing events + */ $watch(callback: Function, context?: any): Function; + + /** + * Informs $firebase to stop sending events and clears memory being used + * by this object (delete's its local content). + */ $destroy(): void; } interface AngularFireObjectService { + /** + * Creates a synchronized object with 2-way bindings between Angular and Firebase. + * + * @param {Firebase} ref + * @returns {FirebaseObject} + */ (firebase: Firebase): AngularFireObject; $extend(ChildClass: Object, methods?: Object): Object; } +/** + * Creates and maintains a synchronized list of data. This is a pseudo-read-only array. One should + * not call splice(), push(), pop(), et al directly on this array, but should instead use the + * $remove and $add methods. + * + * It is acceptable to .sort() this array, but it is important to use this in conjunction with + * $watch(), so that it will be re-sorted any time the server data changes. Examples of this are + * included in the $watch documentation. + */ interface AngularFireArray extends Array { + /** + * Create a new record with a unique ID and add it to the end of the array. + * This should be used instead of Array.prototype.push, since those changes will not be + * synchronized with the server. + * + * Any value, including a primitive, can be added in this way. Note that when the record + * is created, the primitive value would be stored in $value (records are always objects + * by default). + * + * Returns a future which is resolved when the data has successfully saved to the server. + * The resolve callback will be passed a Firebase ref representing the new data element. + * + * @param data + * @returns a promise resolved after data is added + */ $add(newData: any): ng.IPromise; + + /** + * Pass either an item in the array or the index of an item and it will be saved back + * to Firebase. While the array is read-only and its structure should not be changed, + * it is okay to modify properties on the objects it contains and then save those back + * individually. + * + * Returns a future which is resolved when the data has successfully saved to the server. + * The resolve callback will be passed a Firebase ref representing the saved element. + * If passed an invalid index or an object which is not a record in this array, + * the promise will be rejected. + * + * @param {int|object} indexOrItem + * @returns a promise resolved after data is saved + */ $save(recordOrIndex: any): ng.IPromise; + + /** + * Pass either an existing item in this array or the index of that item and it will + * be removed both locally and in Firebase. This should be used in place of + * Array.prototype.splice for removing items out of the array, as calling splice + * will not update the value on the server. + * + * Returns a future which is resolved when the data has successfully removed from the + * server. The resolve callback will be passed a Firebase ref representing the deleted + * element. If passed an invalid index or an object which is not a record in this array, + * the promise will be rejected. + * + * @param {int|object} indexOrItem + * @returns a promise which resolves after data is removed + */ $remove(recordOrIndex: any): ng.IPromise; + + /** + * Returns the record for a given Firebase key (record.$id). If the record is not found + * then returns null. + * + * @param {string} key + * @returns {Object|null} a record in this array + */ $getRecord(key: string): AngularFireSimpleObject; + + /** + * Given an item in this array or the index of an item in the array, this returns the + * Firebase key (record.$id) for that record. If passed an invalid key or an item which + * does not exist in this array, it will return null. + * + * @param {int|object} indexOrItem + * @returns {null|string} + */ $keyAt(recordOrIndex: any): string; + + /** + * The inverse of $keyAt, this method takes a Firebase key (record.$id) and returns the + * index in the array where that record is stored. If the record is not in the array, + * this method returns -1. + * + * @param {String} key + * @returns {int} -1 if not found + */ $indexFor(key: string): number; + + /** + * The loaded method is invoked after the initial batch of data arrives from the server. + * When this resolves, all data which existed prior to calling $asArray() is now cached + * locally in the array. + * + * As a shortcut is also possible to pass resolve/reject methods directly into this + * method just as they would be passed to .then() + * + * @param {Function} [resolve] + * @param {Function} [reject] + * @returns a promise + */ $loaded(resolve?: (x: AngularFireArray) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise; + + /** + * The loaded method is invoked after the initial batch of data arrives from the server. + * When this resolves, all data which existed prior to calling $asArray() is now cached + * locally in the array. + * + * As a shortcut is also possible to pass resolve/reject methods directly into this + * method just as they would be passed to .then() + * + * @param {Function} [resolve] + * @param {Function} [reject] + * @returns a promise + */ $loaded(resolve?: (x: AngularFireArray) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise; + + /** + * The loaded method is invoked after the initial batch of data arrives from the server. + * When this resolves, all data which existed prior to calling $asArray() is now cached + * locally in the array. + * + * As a shortcut is also possible to pass resolve/reject methods directly into this + * method just as they would be passed to .then() + * + * @param {Function} [resolve] + * @param {Function} [reject] + * @returns a promise + */ $loaded(resolve?: (x: AngularFireArray) => void, reject?: (err: any) => any): ng.IPromise; + + /** + * @returns {Firebase} the original Firebase ref used to create this object. + */ $ref(): AngularFire; + + /** + * Listeners passed into this method are notified whenever a new change (add, updated, + * move, remove) is received from the server. Each invocation is sent an object + * containing { type: 'child_added|child_updated|child_moved|child_removed', + * key: 'key_of_item_affected'} + * + * Additionally, added and moved events receive a prevChild parameter, containing the + * key of the item before this one in the array. + * + * This method returns a function which can be invoked to stop observing events. + * + * @param {Function} cb + * @param {Object} [context] + * @returns {Function} used to stop observing + */ $watch(cb: (event: string, key: string, prevChild: string) => void, context?: any): Function; + + /** + * Informs $firebase to stop sending events and clears memory being used + * by this array (delete's its local content). + */ $destroy(): void; } interface AngularFireArrayService { @@ -75,20 +320,160 @@ interface AngularFireAuthService { } interface AngularFireAuth { + /** + * Authenticates the Firebase reference with a custom authentication token. + * + * @param {string} authToken An authentication token or a Firebase Secret. A Firebase Secret + * should only be used for authenticating a server process and provides full read / write + * access to the entire Firebase. + * @param {Object} [options] An object containing optional client arguments, such as configuring + * session persistence. + * @return {Promise} A promise fulfilled with an object containing authentication data. + */ $authWithCustomToken(authToken: string, options?: Object): ng.IPromise; + + /** + * Authenticates the Firebase reference anonymously. + * + * @param {Object} [options] An object containing optional client arguments, such as configuring + * session persistence. + * @return {Promise} A promise fulfilled with an object containing authentication data. + */ $authAnonymously(options?: Object): ng.IPromise; + + /** + * Authenticates the Firebase reference with an email/password user. + * + * @param {Object} credentials An object containing email and password attributes corresponding + * to the user account. + * @param {Object} [options] An object containing optional client arguments, such as configuring + * session persistence. + * @return {Promise} A promise fulfilled with an object containing authentication data. + */ $authWithPassword(credentials: FirebaseCredentials, options?: Object): ng.IPromise; + + /** + * Authenticates the Firebase reference with the OAuth popup flow. + * + * @param {string} provider The unique string identifying the OAuth provider to authenticate + * with, e.g. google. + * @param {Object} [options] An object containing optional client arguments, such as configuring + * session persistence. + * @return {Promise} A promise fulfilled with an object containing authentication data. + */ $authWithOAuthPopup(provider: string, options?: Object): ng.IPromise; + + /** + * Authenticates the Firebase reference with the OAuth redirect flow. + * + * @param {string} provider The unique string identifying the OAuth provider to authenticate + * with, e.g. google. + * @param {Object} [options] An object containing optional client arguments, such as configuring + * session persistence. + * @return {Promise} A promise fulfilled with an object containing authentication data. + */ $authWithOAuthRedirect(provider: string, options?: Object): ng.IPromise; + + /** + * Authenticates the Firebase reference with an OAuth token. + * + * @param {string} provider The unique string identifying the OAuth provider to authenticate + * with, e.g. google. + * @param {string|Object} credentials Either a string, such as an OAuth 2.0 access token, or an + * Object of key / value pairs, such as a set of OAuth 1.0a credentials. + * @param {Object} [options] An object containing optional client arguments, such as configuring + * session persistence. + * @return {Promise} A promise fulfilled with an object containing authentication data. + */ $authWithOAuthToken(provider: string, credentials: Object|string, options?: Object): ng.IPromise; + + /** + * Synchronously retrieves the current authentication data. + * + * @return {Object} The client's authentication data. + */ $getAuth(): FirebaseAuthData; + + /** + * Asynchronously fires the provided callback with the current authentication data every time + * the authentication data changes. It also fires as soon as the authentication data is + * retrieved from the server. + * + * @param {function} callback A callback that fires when the client's authenticate state + * changes. If authenticated, the callback will be passed an object containing authentication + * data according to the provider used to authenticate. Otherwise, it will be passed null. + * @param {string} [context] If provided, this object will be used as this when calling your + * callback. + * @return {function} A function which can be used to deregister the provided callback. + */ $onAuth(callback: Function, context?: any): Function; + + /** + * Unauthenticates the Firebase reference. + */ $unauth(): void; + + /** + * Utility method which can be used in a route's resolve() method to grab the current + * authentication data. + * + * @returns {Promise} A promise fulfilled with the client's current authentication + * state, which will be null if the client is not authenticated. + */ $waitForAuth(): ng.IPromise; + + /** + * Utility method which can be used in a route's resolve() method to require that a route has + * a logged in client. + * + * @returns {Promise} A promise fulfilled with the client's current authentication + * state or rejected if the client is not authenticated. + */ $requireAuth(): ng.IPromise; + + /** + * Creates a new email/password user. Note that this function only creates the user, if you + * wish to log in as the newly created user, call $authWithPassword() after the promise for + * this method has been resolved. + * + * @param {Object} credentials An object containing the email and password of the user to create. + * @return {Promise} A promise fulfilled with the user object, which contains the + * uid of the created user. + */ $createUser(credentials: FirebaseCredentials): ng.IPromise; + + /** + * Removes an email/password user. + * + * @param {Object} credentials An object containing the email and password of the user to remove. + * @return {Promise<>} An empty promise fulfilled once the user is removed. + */ $removeUser(credentials: FirebaseCredentials): ng.IPromise; + + /** + * Changes the email for an email/password user. + * + * @param {Object} credentials An object containing the old email, new email, and password of + * the user whose email is to change. + * @return {Promise<>} An empty promise fulfilled once the email change is complete. + */ $changeEmail(credentials: FirebaseChangeEmailCredentials): ng.IPromise; + + /** + * Changes the password for an email/password user. + * + * @param {Object} credentials An object containing the email, old password, and new password of + * the user whose password is to change. + * @return {Promise<>} An empty promise fulfilled once the password change is complete. + */ $changePassword(credentials: FirebaseChangePasswordCredentials): ng.IPromise; + + /** + * Sends a password reset email to an email/password user. + * + * @param {Object} credentials An object containing the email of the user to send a reset + * password email to. + * @return {Promise<>} An empty promise fulfilled once the reset password email is sent. + */ $resetPassword(credentials: FirebaseResetPasswordCredentials): ng.IPromise; } From 767f577db3fb20d624ba635a00faf1f4210b7833 Mon Sep 17 00:00:00 2001 From: Neil Culver Date: Tue, 26 May 2015 16:51:50 +0100 Subject: [PATCH 081/137] Added overload for definition of a custom CSS class Bumped version number. Added to definitions by. Corrected return type of JQuery method. --- jquery.placeholder/jquery.placeholder-tests.ts | 4 ++++ jquery.placeholder/jquery.placeholder.d.ts | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/jquery.placeholder/jquery.placeholder-tests.ts b/jquery.placeholder/jquery.placeholder-tests.ts index 072c03721..b0e7629f3 100644 --- a/jquery.placeholder/jquery.placeholder-tests.ts +++ b/jquery.placeholder/jquery.placeholder-tests.ts @@ -2,3 +2,7 @@ /// $('input').placeholder(); + +// specify custom class +$('input').placeholder({ customClass: 'my-placeholder' }); + diff --git a/jquery.placeholder/jquery.placeholder.d.ts b/jquery.placeholder/jquery.placeholder.d.ts index b9af72494..d475adfce 100644 --- a/jquery.placeholder/jquery.placeholder.d.ts +++ b/jquery.placeholder/jquery.placeholder.d.ts @@ -1,13 +1,12 @@ -// Type definitions for jquery.placeholder.js 2.0.7 +// Type definitions for jquery.placeholder.js 2.1.1 // Project: https://github.com/mathiasbynens/jquery-placeholder -// Definitions by: Peter Gill +// Definitions by: Peter Gill , Neil Culver // Definitions: https://github.com/borisyankov/DefinitelyTyped /// interface JQuery { - - placeholder() : void; - + placeholder(options: { customClass: string }) : JQuery + placeholder() : JQuery } From 010acb155eb6db6baeaa4a08d713da80534a0573 Mon Sep 17 00:00:00 2001 From: Matt Brooks Date: Tue, 26 May 2015 16:51:49 +0100 Subject: [PATCH 082/137] Added new definition for Farbtastic jQuery plugin Added definition for Farbtastic jQuery color wheel plugin with accompanying tests file. --- farbtastic/farbtastic-tests.ts | 100 +++++++++++++++++++++++++++++++++ farbtastic/farbtastic.d.ts | 40 +++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 farbtastic/farbtastic-tests.ts create mode 100644 farbtastic/farbtastic.d.ts diff --git a/farbtastic/farbtastic-tests.ts b/farbtastic/farbtastic-tests.ts new file mode 100644 index 000000000..ac5eb4074 --- /dev/null +++ b/farbtastic/farbtastic-tests.ts @@ -0,0 +1,100 @@ +/// + +var callback = () => {}; +var domNode = document.createElement("div"); + +// Basic usage + +// Can add a ready() handler to the document which initializes the color picker and links it to the text field +$(document).ready(function() { + $("#colorpicker").farbtastic("#color"); +}); + +// Advanced Usage: jQuery Method + +// Create color pickers in the selected objects +$("#colorpicker").farbtastic(); + +// Optional callback using a callback function +$("#colorpicker").farbtastic(callback); +$("#colourpicker").farbtastic(function (color) { + console.log(typeof color === "string"); +}); + +// Optional callback using a DOM node +$("#colorpicker").farbtastic(domNode); + +// Optional callback using a jQuery object +$("#colorpicker").farbtastic($("#color")); + +// Optional callback using a jQuery selector +$("#colorpicker").farbtastic("#color"); + +// Advanced Usage: Object + +// Can invoke method for returning Farbtastic object instead of a jQuery object +$.farbtastic(domNode); +$.farbtastic($("#color")); +$.farbtastic("#color"); + +// Optional callback using a callback function +$.farbtastic(domNode, callback); +$.farbtastic($("#color"), callback); +$.farbtastic("#color", callback); + +// Optional callback using a DOM node +$.farbtastic(domNode, domNode); +$.farbtastic($("#color"), domNode); +$.farbtastic("#color", domNode); + +// Optional callback using a jQuery object +$.farbtastic(domNode, $("#color")); +$.farbtastic($("#color"), $("#color")); +$.farbtastic("#color", $("#color")); + +// Optional callback using a jQuery selector +$.farbtastic(domNode, "#color"); +$.farbtastic($("#color"), "#color"); +$.farbtastic("#color", "#color"); + +// Advanced Usage: Options +$("#colorpicker").farbtastic({ + callback: (color) => { + console.log(color); + } +}); +$.farbtastic(domNode, { + width: 500 +}); +$.farbtastic($("#color"), { + wheelWidth: 300 +}); +$.farbtastic("#color", {}); + +// Advanced Usage: Methods +$.farbtastic("#colorpicker").linkTo(callback); +$.farbtastic("#colorpicker").linkTo(domNode); +$.farbtastic("#colorpicker").linkTo("#color"); +$.farbtastic("#colorpicker").linkTo($("#color")); + +$.farbtastic("#colorpicker").setColor("#aabbcc"); +$.farbtastic("#colorpicker").setColor([0.1, 0.2, 0.3]); +$.farbtastic("#colorpicker").setHSL([0.1, 0.2, 0.3]); + +// Advanced Usage: Properties +$.farbtastic("#colorpicker").color === "#aabbcc"; +$.farbtastic("#colorpicker").hsl === [0.1, 0.2, 0.3]; +$.farbtastic("#colorpicker").linked === $("#colorpicker"); +$.farbtastic("#colorpicker").linked === callback; + +// Can chain jQuery methods +$("#colorpicker") + .farbtastic() + .addClass("color-picker"); + +// Can chain Farbtastic methods +$.farbtastic("#colorpicker") + .linkTo(domNode) + .setColor("#000000") + .setHSL([0, 0, 0]); + \ No newline at end of file diff --git a/farbtastic/farbtastic.d.ts b/farbtastic/farbtastic.d.ts new file mode 100644 index 000000000..30e93d6f6 --- /dev/null +++ b/farbtastic/farbtastic.d.ts @@ -0,0 +1,40 @@ +// Type definitions for Farbtastic: jQuery Color Wheel v2.0.0-alpha.1 +// Project: http://mattfarina.github.io/farbtastic/ +// Definitions by: Matt Brooks +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module JQueryFarbtastic { + type Placeholder = string | Element | JQuery; + type CallbackFunction = (color: string) => any; + type Callback = CallbackFunction | Placeholder; + + interface Options { + callback?: Callback; + width?: number; + wheelWidth?: number; + } + + interface Farbtastic { + linked: CallbackFunction | JQuery; + color: string; + hsl: number[]; + + linkTo(callback: Callback): Farbtastic; + setColor(color: string | number[]): Farbtastic; + setHSL(hsl: number[]): Farbtastic; + } +} + +interface JQueryStatic { + farbtastic(placeholder: JQueryFarbtastic.Placeholder, callback: JQueryFarbtastic.Callback): JQueryFarbtastic.Farbtastic; + farbtastic(placeholder: JQueryFarbtastic.Placeholder, options: JQueryFarbtastic.Options): JQueryFarbtastic.Farbtastic; + farbtastic(placeholder: JQueryFarbtastic.Placeholder): JQueryFarbtastic.Farbtastic; +} + +interface JQuery { + farbtastic(callback: JQueryFarbtastic.Callback): JQuery; + farbtastic(options: JQueryFarbtastic.Options): JQuery; + farbtastic(): JQuery; +} \ No newline at end of file From 9f902efd3550bb53e9072ca843881eac2a604e51 Mon Sep 17 00:00:00 2001 From: Sam Albert Date: Tue, 26 May 2015 13:31:01 -0400 Subject: [PATCH 083/137] Added _.get definition to lodash with updated test file. --- lodash/lodash-tests.ts | 2 ++ lodash/lodash.d.ts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 6a48e20c1..a96b0b6f3 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -922,6 +922,8 @@ result = _.methods(_); result = <_.LoDashArrayWrapper>_(_).functions(); result = <_.LoDashArrayWrapper>_(_).methods(); +result = _.get({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + result = _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); interface FirstSecond { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 602b05d31..4b96e01e5 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -5836,6 +5836,22 @@ declare module _ { methods(): _.LoDashArrayWrapper; } + //_.get + interface LoDashStatic { + /** + * Gets the property value at path of object. If the resolved + * value is undefined the defaultValue is used in its place. + * @param object The object to query. + * @param path The path of the property to get. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + **/ + get(object : Object, + path:string|string[], + defaultValue?:T + ): T; + } + //_.has interface LoDashStatic { /** From 244a4c42774617e240d6a3116cc20ecf476b7c82 Mon Sep 17 00:00:00 2001 From: Kamyar Nazeri Date: Tue, 26 May 2015 23:33:57 +0430 Subject: [PATCH 084/137] Add definitions for multiplexjs --- multiplexjs/multiplexjs-tests.ts | 2496 +++++++++++++++++++++++++++++ multiplexjs/multiplexjs.d.ts | 2551 ++++++++++++++++++++++++++++++ 2 files changed, 5047 insertions(+) create mode 100644 multiplexjs/multiplexjs-tests.ts create mode 100644 multiplexjs/multiplexjs.d.ts diff --git a/multiplexjs/multiplexjs-tests.ts b/multiplexjs/multiplexjs-tests.ts new file mode 100644 index 000000000..2b9d7e9e9 --- /dev/null +++ b/multiplexjs/multiplexjs-tests.ts @@ -0,0 +1,2496 @@ +/// +/// + + +module MxTests { + + "use strict"; + + import Enumerator = mx.Enumerator; + import Enumerable = mx.Enumerable; + import Comparer = mx.Comparer; + import EqualityComparer = mx.EqualityComparer; + import Collection = mx.Collection; + import List = mx.List; + import ReadOnlyCollection = mx.ReadOnlyCollection; + import Dictionary = mx.Dictionary; + import SortedList = mx.SortedList; + import HashSet = mx.HashSet; + import LinkedList = mx.LinkedList; + import Queue = mx.Queue; + import Stack = mx.Stack; + import Lookup = mx.Lookup; + import RuntimeComparer = mx.RuntimeComparer; + + + var Enumerator = mx.Enumerator, + Enumerable = mx.Enumerable, + Comparer = mx.Comparer, + EqualityComparer = mx.EqualityComparer, + Collection = mx.Collection, + List = mx.List, + ReadOnlyCollection = mx.ReadOnlyCollection, + KeyValuePair = mx.KeyValuePair, + Dictionary = mx.Dictionary, + SortedList = mx.SortedList, + HashSet = mx.HashSet, + LinkedList = mx.LinkedList, + LinkedListNode = mx.LinkedListNode, + Queue = mx.Queue, + Stack = mx.Stack; + + + + + + + /* Classes + ---------------------------------------------------------------------- */ + + interface SimpleObject { + name: string; + value: number; + } + + // class without equality-comparer + class SimpleClass { + }; + + + // class overriding '__hash__' and '__equals__' methods. + class SimpleClassWithComparer implements RuntimeComparer, SimpleObject { + + constructor(val: number) { + this.value = val; + this.name = val.toString(); + } + + public name: string; + public value: number; + + __hash__(): number { + return mx.hash(this.value, this.name); + } + + __equals__(obj: any) { + return obj instanceof SimpleClassWithComparer && obj.value === this.value && obj.name === this.name; + } + }; + + + + + + + /* Tests + ---------------------------------------------------------------------- */ + + module MultiplexTests { + + QUnit.module("Multiplex"); + + + QUnit.test("Multiplex Array", function (assert) { + + var _source = mx([1, 2, 3, 4]); + assert.ok(MxCount(_source) === 4, "Passed!"); + }); + + + QUnit.test("Multiplex String", function (assert) { + var _source = mx("Multiplex"); + assert.ok(MxCount(_source) === 9, "Passed!"); + }); + + + QUnit.test("Multiplex Object", function (assert) { + var _source = mx({ name: "mx", id: 1 }); + assert.ok(MxCount(_source) === 2, "Passed!"); + }); + + + QUnit.test("Multiplex Array-like", function (assert) { + var _source = mx(arguments); + assert.ok(MxCount(_source) === 1, "Passed!"); + }); + + + //QUnit.test("Multiplex Iterable", function (assert) { + // var _set = new Set(), + // _source = mx(_set); + + // _set.add(1); + // _set.add(2); + // _set.add(3); + // assert.ok(MxCount(_source) === 3, "Passed!"); + //}); + + + QUnit.test("Multiplex Custom Enumerator", function (assert) { + var _source = mx(>{ + getEnumerator: function (): Enumerator { + var count = 3, index = 0; + return { + current: undefined, + next: function () { + if (index++ < count) { + this.current = index; + return true; + } + else { + this.current = undefined; + return false; + } + } + }; + } + }); + assert.ok(MxCount(_source) === 3, "Passed!"); + }); + + + QUnit.test("Multiplex Generator", function (assert) { + try { + var _source = eval("mx(function* () { yield 1; yield 2; yield 3; })"); + assert.ok(MxCount(_source) === 3, "Passed!"); + } + catch (e) { assert.ok(true, "Generator not implemented by the browser"); } + }); + + + QUnit.test("Multiplex Legacy Generator", function (assert) { + var _source = mx(function () { + var count = 3, + index = 0; + + return new Enumerator(function (yielder) { + if (index++ < count) { + yielder(index); + } + }); + }); + assert.ok(MxCount(_source) === 3, "Passed!"); + }); + + + QUnit.test("mx.range", function (assert) { + var _source = mx.range(0, 4); + assert.deepEqual(_source.toArray(), [0, 1, 2, 3], "Passed!"); + }); + + + QUnit.test("mx.repeat", function (assert) { + var _source = mx.repeat(1, 4); + assert.deepEqual(_source.toArray(), [1, 1, 1, 1], "Passed!"); + }); + + + QUnit.test("mx.empty", function (assert) { + var _source = mx.empty(); + assert.ok(MxCount(_source) === 0, "Passed!"); + }); + + + QUnit.test("mx.is", function (assert) { + assert.ok(mx.is(mx.range(1, 10)), "Enumerable Passed!"); + assert.ok(mx.is([1]), "Array Passed!"); + assert.ok(mx.is("mx"), "String Passed!"); + //assert.ok(mx.is(new Set()), "Iterable Passed!"); + + assert.ok(mx.is({ + getEnumerator: function (): Enumerator { + var count = 3, index = 0; + return { + current: undefined, + next: function () { + if (index++ < count) { + this.current = index; + return true; + } + else { + this.current = undefined; + return false; + } + } + }; + } + }), "Custom Enumerator Passed!"); + + try { + assert.ok(mx.is(eval("mx(function* () { yield 1; yield 2; yield 3; })")), "Generator Passed!"); + } + catch (e) { assert.ok(true, "Generator not implemented by the browser"); } + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function MxCount(source: Enumerable): number { + var _e = source.getEnumerator(), + _i = 0; + + while (_e.next()) { + _i++; + } + + return _i; + } + } + + + module RuntimeTests { + + QUnit.module("Runtime"); + + + QUnit.test("hash", function (assert) { + + assert.ok(mx.hash(null) === 0, "hash null!"); + assert.ok(mx.hash(undefined) === 0, "hash undefined!"); + assert.ok(mx.hash(10) === mx.hash(10), "hash integer number!"); + assert.ok(mx.hash(10.5) === mx.hash(10.5), "hash float number!"); + assert.ok(mx.hash("string") === mx.hash("string"), "hash string!"); + assert.ok(mx.hash(true) === mx.hash(true), "hash boolean!"); + assert.ok(mx.hash(new Date(2015, 0, 1)) === mx.hash(new Date(2015, 0, 1)), "hash date!"); + assert.ok(mx.hash({ name: "A" }) === mx.hash({ name: "A" }), "hash object literal!"); + assert.ok(mx.hash(new SimpleClass()) !== mx.hash(new SimpleClass()), "hash class instance!"); + assert.ok(mx.hash(new SimpleClassWithComparer(10)) === mx.hash(new SimpleClassWithComparer(10)), "hash class instance overriding __hash__ method!"); + assert.ok(mx.hash(10, 10.5, "string", new Date(2015, 0, 1)) === mx.hash(10, 10.5, "string", new Date(2015, 0, 1)), "combine hash codes!"); + }); + + + QUnit.test("equals", function (assert) { + + assert.ok(mx.equals(null, null) === true, "equals null!"); + assert.ok(mx.equals(undefined, undefined) === true, "equals undefined!"); + assert.ok(mx.equals(10, 10), "equals integer number!"); + assert.ok(mx.equals(10.5, 10.5), "equals float number!"); + assert.ok(mx.equals("string", "string"), "equals string!"); + assert.ok(mx.equals(true, true), "equals boolean!"); + assert.ok(mx.equals(new Date(2015, 0, 1), new Date(2015, 0, 1)), "equals date!"); + assert.ok(mx.equals({ name: "A" }, { name: "A" }), "equals object literal!"); + assert.ok(mx.equals(new SimpleClass(), new SimpleClass()) === false, "equals class instance!"); + assert.ok(mx.equals(new SimpleClass(), new SimpleClass(), EqualityComparer.create((obj) => 0, (a, b) => true)), "equals class instance using comparer!"); + assert.ok(mx.equals(new SimpleClassWithComparer(10), new SimpleClassWithComparer(10)), "equals class instance overriding __equals__ method!"); + }); + + + QUnit.test("compare", function (assert) { + + assert.ok(mx.compare(1, null) === 1 && mx.compare(null, 1) === -1 && mx.compare(null, null) === 0, "compare null!"); + assert.ok(mx.compare(1, 0) === 1 && mx.compare(0, 1) === -1 && mx.compare(1, 1) === 0, "compare numbers!"); + assert.ok(mx.compare("B", "A") === 1 && mx.compare("A", "B") === -1 && mx.compare("A", "A") === 0, "compare string!"); + assert.ok(mx.compare(true, false) === 1 && mx.compare(false, true) === -1 && mx.compare(true, true) === 0, "compare bolean!"); + assert.ok(mx.compare(new Date(2015, 0, 2), new Date(2015, 0, 1)) === 1 && mx.compare(new Date(2015, 0, 1), new Date(2015, 0, 2)) === -1 && mx.compare(new Date(2015, 0, 1), new Date(2015, 0, 1)) === 0, "compare date!"); + assert.ok(mx.compare({ name: "A" }, { name: "B" }) === 0, "compare objects!"); + }); + + + QUnit.test("lambda", function (assert) { + + var _f1 = mx.runtime.lambda("t => t * t"), + _f2 = mx.runtime.lambda("(t, u) => t + u"), + _f3 = mx.runtime.lambda("(t, u, r) => t + u + r"), + _f4 = mx.runtime.lambda("(t, u) => {id:t, name:u}"); + + assert.ok(_f1(2) === 4, "square root lambda!"); + assert.ok(_f2(1, 2) === 3, "sum of 2 numbers lambda!"); + assert.ok(_f3(1, 2, 3) === 6, "sum of 3 numbers lambda!"); + assert.ok(_f4(1, "A").id === 1 && _f4(1, "A").name === "A", "object literal lambda!"); + }); + } + + + module LinqTests { + + QUnit.module("Linq"); + + + QUnit.test("aggregate", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).aggregate((a, b) => a + b) === 45, "Aggregate 10 numbers without seed!"); + assert.ok(mx(_arr).aggregate(10, (a, b) => a + b) === 55, "Aggregate 10 numbers with seed!"); + assert.ok(mx(_arr).aggregate(10, (a, b) => a + b, t => t * 2) === 110, "Aggregate 10 numbers with seed and result selector!"); + }); + + + QUnit.test("all", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).all(t => t < 100) === true, "First 10 numbers less than 100!"); + assert.ok(mx(_arr).all(t => t < 5) === false, "First 10 numbers less than 5!"); + }); + + + QUnit.test("any", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).any() === true, "First 10 numbers!"); + assert.ok(mx(_arr).any(t => t % 2 === 0) === true, "Any of the first 10 numbers is even!"); + assert.ok(mx(_arr).any(t => t > 10) === false, "Any of the first 10 numbers greater than 10!"); + }); + + + QUnit.test("average", function (assert) { + + assert.ok(mx(CreateNumberArray()).average() === 4.5, "Average of the first 10 numbers!"); + assert.throws(() => mx(CreateObjectLiteralArray()).average(), "throws an exception for average of non numeric values!"); + assert.throws(() => mx([]).average(), "throws an exception for average of empty collection!"); + }); + + + QUnit.test("concat", function (assert) { + var _s1 = [1, 2, 3], + _s2 = [3, 4], + _arr = CreateNumberArray(); + + assert.deepEqual(mx(_s1).concat(_s2).toArray(), [1, 2, 3, 3, 4], "Concat two array!"); + assert.ok(mx(_arr).concat(_arr).count() === 20, "Concat the first 10 numbers to itself!"); + }); + + + QUnit.test("contains", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateSimpleClassArray(), + _arr3 = CreateSimpleClassWithComparerArray(), + _arr4 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).contains(1) === true, "1 contains in the first 10 numbers!"); + assert.ok(mx(_arr1).contains(10) === false, "10 does not contains in the first 10 numbers!"); + + assert.ok(mx(_arr2).contains(new SimpleClass()) === false, "Class instance without equality-comparer!"); + assert.ok(mx(_arr2).contains(new SimpleClass(), { hash: () => 0, equals: () => true }) === true, "Class instance with equality-comparer!"); + + assert.ok(mx(_arr3).contains(new SimpleClassWithComparer(5)) === true, "Class instance overriding equality-comparer!"); + + assert.ok(mx(_arr4).contains({ name: "n5", inner: { index: 5, val: {} } }) === true, "Object literal without equality-comparer!"); + assert.ok(mx(_arr4).contains({ name: "n5", inner: null }, { + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }) === true, "Object literal with equality-comparer!"); + }); + + + QUnit.test("count", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).count() === 10, "Count of the first 10 numbers!"); + assert.ok(mx(_arr).count(t => t % 2 === 0) === 5, "Count of the first even 10 numbers!"); + }); + + + QUnit.test("defaultIfEmpty", function (assert) { + + var _arr = CreateNumberArray(); + + assert.deepEqual(mx([]).defaultIfEmpty(1).toArray(), [1], "Empty array devalut value!"); + assert.ok(mx(_arr).defaultIfEmpty(1).count() === 10, "Count of the first 10 numbers with defaultIfEmpty!"); + assert.ok(mx(_arr).where(t => t > 100).defaultIfEmpty(10).count() === 1, "Count of the first 10 numbers greater than 100 with defaultIfEmpty!"); + }); + + + QUnit.test("distinct", function (assert) { + + var _arr1 = CreateObjectLiteralArray(), + _arr2 = CreateComplexObjectLiteralArray(), + _arr3 = CreateNumberArray(), + _arr4 = CreateFloatNumberArray(), + _arr5 = CreateStringArray(), + _arr6 = CreateDateArray(), + _arr7 = CreateBooleanArray(), + _arr8 = CreateSimpleClassWithComparerArray(), + _arr9 = CreateSimpleClassArray(); + + assert.ok(mx(_arr1).distinct().count() === 1, "Array of 10 empty object literal!"); + assert.ok(mx(_arr2).distinct().count() === 10, "Array of 10 distinct complex object literal!"); + assert.ok(mx(_arr3).distinct().count() === 10, "Array of 10 distinct numbers!"); + assert.ok(mx(_arr4).distinct().count() === 10, "Array of 10 distinct float numbers!"); + assert.ok(mx(_arr5).distinct().count() === 10, "Array of 10 distinct strings!"); + assert.ok(mx(_arr6).distinct().count() === 10, "Array of 10 distinct date objects!"); + assert.ok(mx(_arr7).distinct().count() === 2, "Array of 10 boolean values!"); + assert.ok(mx(_arr8).distinct().count() === 10, "Array of 10 distinct class instances overriding equality-comparer!"); + assert.ok(mx(_arr9).distinct().count() === 10, "Array of 10 distinct class instances!"); + assert.ok(mx(_arr2).distinct({ + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }).count() === 10, "Array of 10 distinct complex object literal with equality-comparer!"); + }); + + + QUnit.test("except", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateObjectLiteralArray(), + _arr3 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).except(CreateNumberArray()).count() === 0, "Array of first 10 numbers except first 10 numbers!"); + assert.deepEqual(mx(_arr1).except([0, 1, 2, 3, 4]).toArray(), [5, 6, 7, 8, 9], "Array of first 10 numbers except first 5 numbers!"); + assert.ok(mx(_arr2).except([{}]).count() === 0, "Array of 10 empty object literal except an empty object literal!"); + assert.ok(mx(_arr3).except([{ name: "n5", inner: null }]).count() === 10, "Array of 10 distinct complex object literal without equality-comparer!"); + assert.ok(mx(_arr3).except([{ name: "n5", inner: null }], { + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }).count() === 9, "Array of 10 distinct complex object literal with equality-comparer!"); + }); + + + QUnit.test("elementAt", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).elementAt(0) === 0, "First element of the first 10 numbers!"); + assert.throws(() => mx(_arr).elementAt(100), "throws an exception for 100th element of the first 10 numbers!"); + }); + + + QUnit.test("first", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).first() === 0, "First element of the first 10 numbers!"); + assert.ok(mx(_arr).first(t => t > 5) === 6, "First element greater than 5 of the first 10 numbers!"); + assert.throws(() => mx([]).first(), "throws an exception getting first element of an empty collection!"); + assert.throws(() => mx(_arr).first(t => t > 100), "throws an exception getting first element greater than 100 of the first 10 numbers!"); + }); + + + QUnit.test("firstOrDefault", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).firstOrDefault() === 0, "First element of the first 10 numbers or default!"); + assert.ok(mx(_arr).firstOrDefault(t => t > 5) === 6, "First element greater than 5 of the first 10 numbers or default!"); + assert.ok(mx(_arr).firstOrDefault(t => t > 100) === null, "First element greater than 100 of the first 10 numbers or default!"); + assert.ok(mx(_arr).firstOrDefault(t => t > 100, 100) === 100, "First element greater than 100 of the first 10 numbers or 100 as default!"); + }); + + + QUnit.test("forEach", function (assert) { + + var _arr = CreateNumberArray(), + _sum = 0; + + mx(_arr).forEach(t => _sum += t); + assert.ok(_sum === 45, "ForEach operation on the first 10 numbers!"); + }); + + + QUnit.test("groupBy", function (assert) { + + var _arr1 = CreateObjectLiteralArray(), + _arr2 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).groupBy(t => t).count() === 1, "Group 10 distinct empty object literals!"); + assert.ok(mx(_arr2).groupBy(t => t.name).count() === 10, "Group 10 distinct complex object literals by name!"); + assert.ok(mx(_arr2).groupBy(t => t.name).first().key === "n0", "Group 10 distinct complex object literals by name, retrieve first key!"); + assert.ok(mx(_arr2).groupBy(t => t.name).first().count() === 1, "Group 10 distinct complex object literals by name, retrieve first group count!"); + }); + + + QUnit.test("groupJoin", function (assert) { + + var _arr1 = [{ name: "A", val: 1 }, { name: "B", val: 2 }, { name: "C", val: 3 }, { name: "D", val: 4 }], + _arr2 = [{ code: "A" }, { code: "A" }, { code: "B" }, { code: "B" }, { code: "C" }], + _result = mx(_arr1).groupJoin(_arr2, t => t.name, u => u.code, (t, u) => ({ item: t, group: u })); + + assert.ok(_result.count() === 4, "groupJoin 2 complex-object array, getting count"); + assert.ok(_result.first().item.name === "A", "groupJoin 2 complex-object array, getting item"); + assert.ok(_result.first().group.count() === 2, "groupJoin 2 complex-object array, getting group count"); + assert.ok(_result.last().group.count() === 0, "groupJoin 2 complex-object array, getting empty group count"); + }); + + + QUnit.test("intersect", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateObjectLiteralArray(), + _arr3 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).intersect(CreateNumberArray()).count() === 10, "Array of first 10 numbers intersect with first 10 numbers!"); + assert.deepEqual(mx(_arr1).intersect([2, 3, 4]).toArray(), [2, 3, 4], "Array of first 10 numbers intersect with 3 numbers!"); + assert.ok(mx(_arr2).intersect([{}]).count() === 10, "Array of 10 empty object literal intersect with an empty object literal!"); + assert.ok(mx(_arr3).intersect([{ name: "n5", inner: null }]).count() === 0, "Array of 10 distinct complex object literal without equality-comparer!"); + assert.ok(mx(_arr3).intersect([{ name: "n5", inner: null }], { + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }).count() === 1, "Array of 10 distinct complex object literal with equality-comparer!"); + }); + + + QUnit.test("join", function (assert) { + var _arr1 = [{ name: "A", val: 1 }, { name: "B", val: 2 }, { name: "C", val: 3 }, { name: "D", val: 4 }], + _arr2 = [{ code: "A" }, { code: "A" }, { code: "B" }, { code: "B" }, { code: "C" }], + _arr3 = CreateObjectLiteralArray(), + _result = mx(_arr1).join(_arr2, t => t.name, u => u.code, (t, u) => ({ item1: t, item2: u })); + + assert.ok(_result.count() === 5, "join 2 complex-object array, getting count"); + assert.ok(_result.first().item1.name === "A" && _result.first().item2.code === "A", "join 2 complex-object array, getting item"); + assert.ok(mx(_arr3).join(mx(CreateObjectLiteralArray()), t => t, u => u, (t, u) => t).count() === 100, "join 2 empty object-literal array"); + assert.ok(mx(mx.empty()).join(mx(_arr3), t => t, u => u, (t, u) => t).count() === 0, "join empty collection with an array"); + }); + + + QUnit.test("last", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).last() === 9, "Last element of the first 10 numbers!"); + assert.ok(mx(_arr).last(t => t < 5) === 4, "Last element less than 5 of the first 10 numbers!"); + assert.throws(() => mx([]).last(), "throws an exception getting last element of an empty collection!"); + assert.throws(() => mx(_arr).last(t => t > 100), "throws an exception getting first element greater than 100 of the first 10 numbers!"); + }); + + + QUnit.test("lastOrDefault", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).lastOrDefault() === 9, "Last element of the first 10 numbers or default!"); + assert.ok(mx(_arr).lastOrDefault(t => t < 5) === 4, "Last element greater than 5 of the first 10 numbers or default!"); + assert.ok(mx(_arr).lastOrDefault(t => t > 100) === null, "Last element greater than 100 of the first 10 numbers or default!"); + assert.ok(mx(_arr).lastOrDefault(t => t > 100, 100) === 100, "Last element greater than 100 of the first 10 numbers or 100 as default!"); + }); + + + QUnit.test("max", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateStringArray(), + _arr3 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).max() === 9, "Maximum of the first 10 numbers!"); + assert.ok(mx(_arr2).max() === "9_string", "Maximum of the 10 string array!"); + assert.ok(mx(_arr3).max(t => t.name) === "n9", "Maximum of a complex array by selector!"); + assert.throws(() => mx([]).max(), "throws an exception getting maximum of an empty collection!"); + }); + + + QUnit.test("min", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateStringArray(), + _arr3 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).min() === 0, "Minimum of the first 10 numbers!"); + assert.ok(mx(_arr2).min() === "0_string", "Minimum of the 10 string array!"); + assert.ok(mx(_arr3).min(t => t.name) === "n0", "Minimum of a complex array by selector!"); + assert.throws(() => mx([]).min(), "throws an exception getting minimum of an empty collection!"); + }); + + + QUnit.test("ofType", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).ofType(Number).count() === 10, "Cast array of numbers to number!"); + assert.ok(mx(_arr).ofType(String).count() === 0, "Cast array of numbers to string!"); + }); + + + QUnit.test("orderBy", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateComplexObjectLiteralArray(), + _arr3 = [{ name: "a", val: 1 }, { name: "a", val: 2 }, { name: "b", val: 1 }, { name: "c", val: 2 }], + _result = [{ name: "a", val: 1 }, { name: "b", val: 1 }, { name: "a", val: 2 }, { name: "c", val: 2 }] + + assert.deepEqual(mx(_arr1).orderBy(t => t).take(5).toArray(), [0, 1, 2, 3, 4], "Order array of numbers ascending!"); + assert.ok(mx(_arr2).orderBy(t => t.name).thenByDescending(t => t.inner.index).first().name === "n0", "Order array of complex object by 'name' ascending then by 'inner.index' descending !"); + assert.deepEqual(mx(_arr3).orderBy(t => t.val).thenBy(t => t.name).toArray(), _result, "Order and thenBy!"); + assert.ok(mx(_arr2).orderBy(t => t.name, { + hash: o => mx.hash(o), + equals: (a, b) => a === b + }).first().name === "n0", "Order array of complex object ascending with comparer!"); + }); + + + QUnit.test("orderByDescending", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateComplexObjectLiteralArray(), + _arr3 = [{ name: "a", val: 1 }, { name: "a", val: 2 }, { name: "b", val: 1 }, { name: "c", val: 2 }], + _result = [{ name: "a", val: 2 }, { name: "c", val: 2 }, { name: "a", val: 1 }, { name: "b", val: 1 }]; + + assert.deepEqual(mx(_arr1).orderByDescending(t => t).take(5).toArray(), [9, 8, 7, 6, 5], "Order array of numbers descending!"); + assert.ok(mx(_arr2).orderByDescending(t => t.name).thenByDescending(t => t.inner.index).first().name === "n9", "Order array of complex object by 'name' descending then by 'inner.index' descending !"); + assert.deepEqual(mx(_arr3).orderByDescending(t => t.val).thenBy(t => t.name).toArray(), _result, "Order descending and thenBy!"); + assert.ok(mx(_arr2).orderByDescending(t => t.name, { + hash: o => mx.hash(o), + equals: (a, b) => a === b + }).first().name === "n9", "Order array of complex object descending with comparer!"); + }); + + + QUnit.test("reverse", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateStringArray(); + + assert.deepEqual(mx(_arr1).reverse().take(5).toArray(), [9, 8, 7, 6, 5], "Reverse array of first 10 numbers!"); + assert.ok(mx(_arr2).reverse().first() === "9_string", "Reverse array of strings!"); + }); + + + QUnit.test("sequenceEqual", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).sequenceEqual(mx(CreateNumberArray())), "sequenceEqual on array of numbers!"); + assert.ok(mx([1, 2, 3]).sequenceEqual(mx([1, 2])) === false, "sequenceEqual on inharmonic arrays of numbers!"); + assert.ok(mx([{ name: "a" }]).sequenceEqual(mx([{ name: "a", val: 1 }]), { + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }), "sequenceEqual on arrays of objects with comparer!"); + }); + + + QUnit.test("select", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).select(t => t + 100).first() === 100, "select first 10 numbers plus 100!"); + assert.ok(mx(_arr).select((t, i) => i).last() === 9, "select index while enumerating 10 numbers!"); + }); + + + QUnit.test("selectMany", function (assert) { + + var _arr = [{ name: "A", values: [1, 2, 3, 4] }, { name: "B", values: [5, 6, 7, 8] }]; + + assert.ok(mx(_arr).selectMany(t => t.values).count() === 8, "selectMany on complex objects!"); + assert.deepEqual(mx(_arr).selectMany(t => t.values, (t, u) => ({ name: t.name, value: u })).first(), { name: "A", value: 1 }, "selectMany on complex objects with result selector!"); + }); + + + QUnit.test("single", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx([1]).single() === 1, "Single element of a single array!"); + assert.ok(mx(_arr).single(t => t === 1) === 1, "Single element equal to 1 of the first 10 numbers!"); + assert.throws(() => mx([]).single(), "throws an exception getting single element of an empty collection!"); + assert.throws(() => mx(_arr).single(), "throws an exception getting single element of an collection containing more than one element!"); + assert.throws(() => mx(_arr).single(t => t > 100), "throws an exception getting single element greater than 100 of the first 10 numbers!"); + assert.throws(() => mx(_arr).single(t => t < 10), "throws an exception getting single element less than 10 of the first 10 numbers!"); + }); + + + QUnit.test("singleOrDefault", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx([1]).singleOrDefault() === 1, "Single element of a single array or default!"); + assert.ok(mx([]).singleOrDefault() === null, "Single element of an empty array or default!"); + assert.ok(mx(_arr).singleOrDefault(t => t === 1) === 1, "Single element equal to 1 of the first 10 numbers or default!"); + assert.ok(mx(_arr).singleOrDefault(t => t === 100, 100) === 100, "Single element of an empty array or default!"); + assert.throws(() => mx(_arr).singleOrDefault(), "throws an exception getting single element of an collection containing more than one element!"); + assert.throws(() => mx(_arr).singleOrDefault(t => t < 10), "throws an exception getting single element less than 10 of the first 10 numbers!"); + }); + + + QUnit.test("skip", function (assert) { + + var _arr = CreateNumberArray(); + + assert.deepEqual(mx(_arr).skip(5).toArray(), [5, 6, 7, 8, 9], "Skip 5 element of a the first 10 numbers!"); + assert.deepEqual(mx(_arr).where(t => t % 2 === 0).skip(3).toArray(), [6, 8], "Skip 3 element of a the first 10 even numbers!"); + assert.ok(mx(_arr).skip(0).count() === 10, "Skip no items!"); + assert.ok(mx(_arr).skip(100).count() === 0, "Skip more than count of the collection!"); + }); + + + QUnit.test("skipWhile", function (assert) { + + var _arr = CreateNumberArray(); + + assert.deepEqual(mx(_arr).skipWhile(t => t < 5).toArray(), [5, 6, 7, 8, 9], "Skip while elements are less than 5 from the first 10 even numbers!"); + assert.ok(mx(_arr).skipWhile(t => t > 5).count() === 10, "Skip while elements are greater than 5 from the first 10 even numbers!"); + }); + + + QUnit.test("sum", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).sum() === 45, "Sum of the first 10 numbers!"); + assert.ok(mx(_arr).sum(t => t * 2) === 90, "Sum of the first 10 numbers multiply by 2!"); + assert.throws(() => mx(CreateObjectLiteralArray()).sum(), "throws an exception getting sum of non numeric elements!"); + assert.throws(() => mx(CreateComplexObjectLiteralArray()).sum(t => t.name), "throws an exception getting sum of non numeric properties!"); + }); + + + QUnit.test("take", function (assert) { + + var _arr = CreateNumberArray(); + + assert.deepEqual(mx(_arr).take(5).toArray(), [0, 1, 2, 3, 4], "Take 5 element of a the first 10 numbers!"); + assert.deepEqual(mx(_arr).where(t => t % 2 === 0).take(3).toArray(), [0, 2, 4], "Take 3 element of a the first 10 even numbers!"); + assert.ok(mx(_arr).take(0).count() === 0, "Take no items!"); + assert.ok(mx(_arr).take(100).count() === 10, "Take more than count of the collection!"); + }); + + + QUnit.test("takeWhile", function (assert) { + + var _arr = CreateNumberArray(); + + assert.deepEqual(mx(_arr).takeWhile(t => t < 5).toArray(), [0, 1, 2, 3, 4], "Take while elements are less than 5 from the first 10 even numbers!"); + assert.ok(mx(_arr).takeWhile(t => t > 5).count() === 0, "Take while elements are greater than 5 from the first 10 even numbers!"); + }); + + + QUnit.test("toArray", function (assert) { + + var _arr = CreateNumberArray(); + + assert.deepEqual(mx(_arr).where(t => t < 5).toArray(), [0, 1, 2, 3, 4], "Elements less than 5 from the first 10 even numbers!"); + }); + + + QUnit.test("toDictionary", function (assert) { + + var _arr = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr).toDictionary(t => t.name).count() === 10, "toDictionary key-selector!"); + assert.ok(mx(_arr).toDictionary(t => t.name, t => t.inner.index).first().value === 0, "toDictionary key-selector & element-selector!"); + assert.ok(mx(_arr).toDictionary(t => t, { + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }).first().key.name === "n0", "toDictionary key-selector & comparer!"); + + assert.ok(mx(_arr).toDictionary(t => t, t => t.inner.index, { + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }).first().value === 0, "toDictionary key-selector, element-selector & comparer!"); + + assert.throws(() => mx([1, 1, 2]).toDictionary(t => t), "throws an exception with duplicate keys!"); + }); + + + QUnit.test("toList", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).toList().count() === 10, "toList first 10 numbers!"); + assert.ok(mx(_arr).toList()[1] === 1, "toList indexer first 10 numbers!"); + }); + + + QUnit.test("toLookup", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).toLookup(t => t).count() === 10, "toLookup first 10 numbers!"); + assert.ok(mx(_arr1).toLookup(t => t).get(1).count() === 1, "toLookup indexer first 10 numbers!"); + + assert.ok(mx(_arr2).toLookup(t => t, { + hash: o => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }).first().first().name === "n0", "toLookup with key-selector and comparer!"); + + assert.ok(mx(_arr2).toLookup(t => t, t => t.name, { + hash: (o) => mx.hash(o.name), + equals: (a, b) => a.name === b.name + }).first().first() === "n0", "toLookup with key-selector, element-selector and comparer!"); + }); + + + QUnit.test("union", function (assert) { + + var _arr = CreateNumberArray(); + + assert.ok(mx(_arr).union(CreateNumberArray()).count() === 10, "Union first 10 numbers with itself!"); + assert.deepEqual(mx([1, 2]).union(mx([2, 3])).toArray(), [1, 2, 3], "Union two arrays!"); + }); + + + QUnit.test("where", function (assert) { + + var _arr1 = CreateNumberArray(), + _arr2 = CreateComplexObjectLiteralArray(); + + assert.ok(mx(_arr1).where(t => t < 5).count() === 5, "Filter first 10 numbers less than 10!"); + assert.ok(mx(_arr2).where(t => t.inner.index < 5).count() === 5, "Filter complex object by value!"); + assert.deepEqual(mx(_arr1).where(t => t <= 1).toArray(), [0, 1], "Deep equal check!"); + }); + + + QUnit.test("zip", function (assert) { + + assert.ok(mx([1, 2]).zip([3, 4], (t, u) => t + u).first() === 4, "Zip two numeric array!"); + assert.ok(mx([1, 2]).zip([3], (t, u) => t + u).count() === 1, "Zip two inharmonic numeric array!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateObjectLiteralArray(): Object[] { + return mx.range(0, 10).select(t => ({})).toArray(); + } + + function CreateComplexObjectLiteralArray(): { name: string; inner: { index: number; val: Object } }[] { + return mx.range(0, 10).select(t => ({ + name: "n" + t, + inner: { + index: t, + val: {} + } + })).toArray(); + } + + function CreateSimpleClassArray(): SimpleClass[] { + return mx.range(0, 10).select(t => new SimpleClass()).toArray(); + } + + function CreateSimpleClassWithComparerArray(): SimpleClassWithComparer[] { + return mx.range(0, 10).select(t => new SimpleClassWithComparer(t)).toArray(); + } + + function CreateNumberArray(): number[] { + return mx.range(0, 10).toArray(); + } + + function CreateFloatNumberArray(): number[] { + return mx.range(0, 10).select(t => t + 0.1).toArray(); + } + + function CreateStringArray(): string[] { + return mx.range(0, 10).select(t => t + "_string").toArray(); + } + + function CreateDateArray(): Date[] { + return mx.range(0, 10).select(t => new Date(new Date().getTime() + t)).toArray(); + } + + function CreateBooleanArray(): boolean[] { + return mx.range(0, 10).select(t => t % 2 === 0).toArray(); + } + } + + + module CollectionTests { + + QUnit.module("Collection"); + + + QUnit.test("constructor", function (assert) { + + assert.ok(CreateCollection().count() === 5, "initialize a Collection using specified collection!"); + }); + + + QUnit.test("count", function (assert) { + + var _col = CreateCollection(); + assert.ok(_col.count() === 5, "collection containing count!"); + assert.throws(() => new Collection().count(), "throws an error getting count of an empty collection."); + }); + + + QUnit.test("copyTo", function (assert) { + + var _col = CreateCollection(), + _arr = new Array(_col.count()); + + _col.copyTo(_arr, 0); + + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "Collection copy to an array!"); + assert.throws(() => _col.copyTo([], 0), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("collection enumerable", function (assert) { + + var _col = CreateCollection(); + assert.deepEqual(_col.select(t => t * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a collection!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateCollection(): Collection { + return new Collection(mx.range(1, 5)); + } + } + + + module ListTests { + + QUnit.module("List"); + + + QUnit.test("constructor", function (assert) { + assert.ok(new List().count() === 0, "an empty list!"); + assert.ok(new List(10).count() === 10, "an empty list with initial capacity!"); + assert.ok(new List(1, 2, 3, 4, 5).count() === 5, "list initializer!"); + assert.ok(new List(mx.range(0, 10)).count() === 10, "list from an Enumerable!"); + }); + + + QUnit.test("indexer", function (assert) { + + var _list = CreateList(); + + assert.ok(_list[0] === 1, "indexer get!"); + + _list[0] = 0; + assert.ok(_list[0] === 0 && _list.first() === 0, "indexer set!"); + }); + + + QUnit.test("add", function (assert) { + + var _list = new List(); + + _list.add(1); + assert.ok(_list[0] === 1, "add!"); + assert.ok(_list.count() === 1, "add count!"); + }); + + + QUnit.test("addRange", function (assert) { + + var _list = new List(); + + _list.addRange(mx.range(0, 10)); + assert.ok(_list.count() === 10, "add range of numbers!"); + }); + + + QUnit.test("asReadOnly", function (assert) { + + var _rlist = new List(mx.range(0, 10)).asReadOnly(); + + assert.ok(_rlist.count() === 10, "readOnlyCollection count!"); + assert.ok(_rlist[0] === 0, "readOnlyCollection get!"); + }); + + + QUnit.test("binarySearch", function (assert) { + + var _list1 = new List(mx.range(0, 100)), + _list2 = new List<{ index: number }>(mx.range(0, 100).select(t => ({ index: t }))); + + assert.ok(_list1.binarySearch(50) === 50, "binary-search to find an item!"); + assert.ok(_list1.binarySearch(100) < 0, "binary-search item not found!"); + + assert.ok(_list2.binarySearch({ index: 50 }, { compare: (a, b) => a.index - b.index }) === 50, "binary-search find an item with comparer!"); + assert.ok(_list2.binarySearch({ index: 80 }, 50, 40, { compare: (a, b) => a.index - b.index }) === 80, "binary-search find an item with index, count and comparer!"); + }); + + + QUnit.test("clear", function (assert) { + + var _list = CreateList(); + + _list.clear(); + assert.ok(_list.count() === 0, "Clear list!"); + }); + + + QUnit.test("contains", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.contains(3) === true, "list contains!"); + assert.ok(_list.contains(6) === false, "list not containing!"); + }); + + + QUnit.test("copyTo", function (assert) { + + var _list = CreateList(), + _arr = new Array(_list.count()); + + _list.copyTo(_arr, 0); + + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "list copyTo an array!"); + }); + + + QUnit.test("exists", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.exists(t => t % 2 === 0), "an even number exists in a list of the first 5 number!"); + assert.ok(_list.exists(t => t > 5) === false, "6 exists in a list of the first 5 number!"); + }); + + + QUnit.test("find", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.find(t => t % 2 === 0) === 2, "find an even number in a list of the first 5 number!"); + assert.ok(_list.find(t => t > 5) === null, "find a number greater than 5 in a list of the first 5 number!"); + }); + + + QUnit.test("findIndex", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.findIndex(t => t % 2 === 0) === 1, "find index of an even numbers in a list of the first 5 number!"); + assert.ok(_list.findIndex(2, t => t % 2 === 0) === 3, "find index of an even numbers in a list of the first 5 number, starting from 2!"); + assert.ok(_list.findIndex(2, 1, t => t % 2 === 0) === -1, "find index of an even numbers in a list of the first 5 number, starting from 3, for 1 attempt!"); + }); + + + QUnit.test("findLast", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.findLast(t => t % 2 === 0) === 4, "find last even number in a list of the first 5 number!"); + assert.ok(_list.findLast(t => t > 5) === null, "find last number greater than 5 in a list of the first 5 number!"); + }); + + + QUnit.test("findLastIndex", function (assert) { + + var _list = new List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); + + assert.ok(_list.findLastIndex(t => t % 2 === 0) === 8, "find last index of an even numbers in a list of the first 10 number!"); + assert.ok(_list.findLastIndex(5, t => t % 2 === 0) === 4, "find last index of an even numbers in a list of the first 10 number, starting from 5!"); + assert.ok(_list.findLastIndex(5, 1, t => t % 2 === 0) === -1, "find last index of an even numbers in a list of the first 10 number, starting from 5, for 1 attempt!"); + }); + + + QUnit.test("forEach", function (assert) { + + var _list = CreateList(), + _count = 0; + + _list.forEach(t => _count += t); + + assert.ok(_count === 15, "forEach to get sum of a the items in a list!"); + }); + + + QUnit.test("get", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.get(1) === 2, "get item at index 1 from a list of 5 numbers!"); + assert.throws(() => _list.get(10), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("getRange", function (assert) { + + var _list = CreateList(); + + assert.deepEqual(_list.getRange(0, 3).toArray(), [1, 2, 3], "get range of first 3 items of a list of first 5 numbers!"); + assert.throws(() => _list.getRange(0, 10), "throws an error getting first 10 items from a list of 5 numbers!"); + }); + + + QUnit.test("indexOf", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.indexOf(3) === 2, "get index of 3 in a list of first 5 numbers!"); + assert.ok(_list.indexOf(10) === -1, "get index of 10 in a list of first 5 numbers!"); + assert.ok(_list.indexOf(3, 4) === -1, "get index of 3 in a list of first 5 numbers, starting from index 4!"); + }); + + + QUnit.test("insert", function (assert) { + + var _list = CreateList(); + + _list.insert(3, 0); + + assert.ok(_list.count() === 6, "insert an item in a list of 5 numbers, get count!"); + assert.ok(_list[3] === 0, "insert an item in a list of 5 numbers, get item!"); + assert.throws(() => _list.insert(10, 0), "throws an error inserting in 10th index of a list of 5 numbers!"); + }); + + + QUnit.test("insertRange", function (assert) { + + var _list = CreateList(); + + _list.insertRange(3, mx.range(0, 3)); + + assert.ok(_list.count() === 8, "insert range of items in a list of 5 numbers, get count!"); + assert.ok(_list[3] === 0 && _list[4] === 1 && _list[5] === 2, "insert range of items in a list of 5 numbers, get items!"); + assert.throws(() => _list.insertRange(10, mx.range(0, 3)), "throws an error inserting range of items in 10th index of a list of 5 numbers!"); + }); + + + QUnit.test("lastIndexOf", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.lastIndexOf(3) === 2, "get last index of 3 in a list of first 5 numbers!"); + assert.ok(_list.lastIndexOf(10) === -1, "get last index of 10 in a list of first 5 numbers!"); + assert.ok(_list.lastIndexOf(3, 1) === -1, "get last index of 3 in a list of first 5 numbers, starting from index 1!"); + }); + + + QUnit.test("remove", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.remove(2) === true && _list.count() === 4, "remove an item from a list, get count!"); + assert.ok(_list.remove(10) === false && _list.count() === 4, "remove an item which does not exist in a list, get count!"); + }); + + + QUnit.test("removeAll", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.removeAll(t => t % 2 === 0) === 2 && _list.count() === 3, "remove all even numbers from a list of first 5 numbers, get count!"); + assert.ok(_list.removeAll(t => t % 2 === 0) === 0 && _list.count() === 3, "remove all even numbers from a list of first 3 odd numbers, get count!"); + }); + + + QUnit.test("removeAt", function (assert) { + + var _list = CreateList(); + + _list.removeAt(2); + + assert.ok(_list[2] === 4 && _list.count() === 4, "remove item from 2nd index of a list of first 5 numbers, get count!"); + assert.throws(() => _list.removeAt(10), "throws an error removing item from 10th index of a list of first 5 numbers!"); + }); + + + QUnit.test("removeRange", function (assert) { + + var _list = CreateList(); + + _list.removeRange(1, 3); + + assert.ok(_list[0] === 1 && _list[1] === 5 && _list.count() === 2, "remove range of 3 items, starting from 1st index from a list of first 5 numbers, get count!"); + assert.throws(() => _list.removeRange(10, 10), "throws an error removing a range of items starting from 10th index of a list of first 5 numbers!"); + }); + + + QUnit.test("reverse", function (assert) { + + var _arr = [1, 2, 3, 4, 5], + _list1 = new List(_arr), + _list2 = new List(_arr); + + _list1.reverse(); + _list2.reverse(0, 3); + + assert.deepEqual(_list1.toArray(), [5, 4, 3, 2, 1], "reverse list of 5 first numbers!"); + assert.deepEqual(_list2.toArray(), [3, 2, 1, 4, 5], "reverse first 3 items of a list of 5 first numbers!"); + }); + + + QUnit.test("set", function (assert) { + + var _list = CreateList(); + + _list.set(1, 0); + + assert.ok(_list[1] === 0, "set value at index 1 of a list!"); + assert.throws(() => _list.set(10, 1), "throws an error setting item at index 10 from a list of 5 numbers!"); + }); + + + QUnit.test("sort", function (assert) { + + var _arr = [7, 1, 8, 3, 2, 0, 9, 6, 4, 5], + _list1 = new List(_arr), + _list2 = new List(_arr), + _list3 = new List(_arr), + _list4 = new List(_arr), + _sorter = (a: number, b: number) => a - b; + + _list1.sort(); + _list2.sort(_sorter); + _list3.sort({ compare: _sorter }); + _list4.sort(0, 5, { compare: _sorter }); + + assert.deepEqual(_list1.toArray(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "sort list of first 10 numbers!"); + assert.deepEqual(_list2.toArray(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "sort list of first 10 numbers with a comparison function!"); + assert.deepEqual(_list3.toArray(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "sort list of first 10 numbers with a comparer!"); + assert.deepEqual(_list4.toArray(), [1, 2, 3, 7, 8, 0, 9, 6, 4, 5], "sort 5 first items of list of first 10 numbers with a comparer!"); + }); + + + QUnit.test("toArray", function (assert) { + + var _list = CreateList(); + + assert.deepEqual(_list.toArray(), [1, 2, 3, 4, 5], "converts a list of numbers to an array!"); + }); + + + QUnit.test("trueForAll", function (assert) { + + var _list = CreateList(); + + assert.ok(_list.trueForAll(t => t < 10) === true, "checks whether all items in a list of 5 first numbers are less than 10!"); + assert.ok(_list.trueForAll(t => t < 3) === false, "checks whether all items in a list of 5 first numbers are less than 3!"); + }); + + + QUnit.test("list enumerable", function (assert) { + + var _list = CreateList(); + + assert.deepEqual(_list.select(t => t * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a list!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateList(): List { + return new List(1, 2, 3, 4, 5); + } + } + + + module ReadOnlyCollectionTests { + + QUnit.module("ReadOnlyCollection"); + + + QUnit.test("constructor", function (assert) { + assert.ok(CreateReadOnlyCollection().count() === 5, "initialize a ReadOnlyCollection!"); + assert.throws(() => new ReadOnlyCollection(null), "throws an exception creating an ampty ReadOnlyCollection!"); + }); + + + QUnit.test("indexer", function (assert) { + + var _col = CreateReadOnlyCollection(); + + assert.ok(_col[0] === 1, "indexer get!"); + assert.ok(function () { + try { _col[0] = 0; } + catch (e) { } + return _col[0] === 1; + }, "indexer set!"); + + assert.ok(function () { + try { _col[10] = 0; } + catch (e) { } + return _col[10] === undefined; + }, "out of range indexer set!"); + }); + + + QUnit.test("get", function (assert) { + + var _col = CreateReadOnlyCollection(); + + assert.ok(_col.get(1) === 2, "get item at index 1 from a collection of 5 numbers!"); + assert.throws(() => _col.get(10), "throws error getting item at index 10 from a collection of 5 numbers!"); + }); + + + QUnit.test("contains", function (assert) { + + var _col = CreateReadOnlyCollection(); + + assert.ok(_col.contains(3) === true, "collection contains!"); + assert.ok(_col.contains(6) === false, "collection not containing!"); + }); + + + QUnit.test("copyTo", function (assert) { + + var _col = CreateReadOnlyCollection(), + _arr = new Array(_col.count()); + + _col.copyTo(_arr, 0); + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "collection copyTo an array!"); + assert.throws(() => _col.copyTo([], 0), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("indexOf", function (assert) { + + var _col = CreateReadOnlyCollection(); + + assert.ok(_col.indexOf(3) === 2, "get index of 3 in a collection of first 5 numbers!"); + assert.ok(_col.indexOf(10) === -1, "get index of 10 in a collection of first 5 numbers!"); + }); + + + QUnit.test("collection enumerable", function (assert) { + + var _col = CreateReadOnlyCollection(); + + assert.deepEqual(_col.select(t => t * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a collection!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateReadOnlyCollection(): ReadOnlyCollection { + return new ReadOnlyCollection(new List(1, 2, 3, 4, 5)); + } + } + + + module SortedListTests { + + QUnit.module("SortedList"); + + + QUnit.test("constructor", function (assert) { + + var _comparer = Comparer.create((a: number, b: number) => a - b), + _dic = CreateDictionary(), + _s1 = new SortedList(), + _s2 = new SortedList(5), + _s3 = new SortedList(_dic), + _s4 = new SortedList(_comparer), + _s5 = new SortedList(5, _comparer), + _s6 = new SortedList(_dic, _comparer); + + + assert.ok(_s1.count() === 0 && _s1.capacity() === 0, "initialize a SortedList!"); + assert.ok(_s2.count() === 0 && _s2.capacity() === 5, "initialize a SortedList using initial capacity!"); + assert.ok(_s3.count() === 5 && _s3.capacity() === 5, "initialize a SortedList using specified dictionary!"); + assert.ok(_s4.count() === 0 && _s4.capacity() === 0, "initialize a SortedList using specified comparer!"); + assert.ok(_s5.count() === 0 && _s5.capacity() === 5, "initialize a SortedList using using initial capacity and comparer!"); + assert.ok(_s6.count() === 5 && _s6.capacity() === 5, "initialize a SortedList using specified dictionary and comparer!"); + }); + + + QUnit.test("add", function (assert) { + + assert.ok(CreateSortedList().count() == 5, "sorted-list add!"); + assert.throws(() => CreateSortedList().add(1, "AA"), "throws an error adding existing key to the list!"); + }); + + + QUnit.test("get", function (assert) { + + var _list = CreateSortedList(); + + assert.ok(_list.get(1) === "A", "sorted-list get!"); + assert.throws(() => _list.get(10), "throws an error getting invalid key!"); + }); + + + QUnit.test("capacity", function (assert) { + + var _list = CreateSortedList(); + + assert.ok(_list.capacity() > 0, "get sorted-list capacity!"); + + _list.capacity(10); + assert.ok(_list.capacity() === 10, "set sorted-list capacity!"); + }); + + + QUnit.test("clear", function (assert) { + + var _list = CreateSortedList(); + + _list.clear(); + assert.ok(_list.count() === 0 && _list.capacity() === 0, "clear sorted-list!"); + }); + + + QUnit.test("comparer", function (assert) { + + var _comparer = CreateSortedList().comparer(); + + assert.ok(_comparer.compare(5, 1) > 0 && _comparer.compare(1, 5) < 0 && _comparer.compare(1, 1) === 0, "sorted-list comparer!"); + }); + + + QUnit.test("containsKey", function (assert) { + + var _list1 = CreateSortedList(), + _list2 = new SortedList<{ id: number; name: string }, number>({ compare: (a, b) => a.name.localeCompare(b.name) }); + + assert.ok(_list1.containsKey(1) === true, "sorted-list contains key!"); + assert.ok(_list1.containsKey(10) === false, "sorted-list does not contain key!"); + + + _list2.add({ id: 2, name: "B" }, 2); + _list2.add({ id: 5, name: "E" }, 5); + _list2.add({ id: 4, name: "D" }, 4); + _list2.add({ id: 3, name: "C" }, 3); + _list2.add({ id: 1, name: "A" }, 1); + + assert.ok(_list2.containsKey({ id: 3, name: "C" }), "sorted-list contains key using specified comparer"); + }); + + + QUnit.test("containsValue", function (assert) { + + var _list = CreateSortedList(); + + assert.ok(_list.containsValue("A") === true, "sorted-list contains value!"); + assert.ok(_list.containsValue("Z") === false, "sorted-list does not contain value!"); + }); + + + QUnit.test("keys", function (assert) { + + var _list = CreateSortedList(); + + assert.deepEqual(_list.keys().toArray(), [1, 2, 3, 4, 5], "sorted-list keys!"); + assert.deepEqual(new SortedList().keys().toArray(), [], "empty sorted-list keys!"); + }); + + + QUnit.test("values", function (assert) { + + var _list = CreateSortedList(); + + assert.deepEqual(_list.values().toArray(), ["A", "B", "C", "D", "E"], "sorted-list values!"); + assert.deepEqual(new SortedList().values().toArray(), [], "empty sorted-list values!"); + }); + + + QUnit.test("indexOfKey", function (assert) { + + var _list = CreateSortedList(); + + assert.ok(_list.indexOfKey(1) === 0, "sorted-list index of key!"); + assert.ok(_list.indexOfKey(10) < 0, "sorted-list index of invalid key!"); + }); + + + QUnit.test("indexOfValue", function (assert) { + + var _list = CreateSortedList(); + + assert.ok(_list.indexOfValue("A") === 0, "sorted-list index of value!"); + assert.ok(_list.indexOfValue("Z") < 0, "sorted-list index of invalid value!"); + }); + + + QUnit.test("remove", function (assert) { + + var _list = CreateSortedList(); + + assert.ok(_list.remove(1) === true && _list.count() === 4 && _list.indexOfKey(1) < 0, "sorted-list remove key!"); + assert.ok(_list.remove(1) === false && _list.count() === 4, "sorted-list remove invalid key!"); + }); + + + QUnit.test("removeAt", function (assert) { + + var _list = CreateSortedList(); + + _list.removeAt(0); + assert.ok(_list.count() === 4 && _list.indexOfKey(1) < 0, "sorted-list remove at index!"); + assert.throws(() => _list.removeAt(10), "throws an error removing item at invalid index"); + }); + + + QUnit.test("set", function (assert) { + + var _list = CreateSortedList(); + + _list.set(1, "AA"); + assert.ok(_list.count() === 5 && _list.get(1) === "AA", "sorted-list set exisiting key's value!"); + + _list.set(6, "F"); + assert.ok(_list.count() === 6 && _list.get(6) === "F", "sorted-list set new key and value!"); + }); + + + QUnit.test("tryGetValue", function (assert) { + + var _list = CreateSortedList(); + + assert.ok(function () { + var value: string; + var res = _list.tryGetValue(1, val => value = val); + + return res && value === "A"; + + }, "sorted-list tryGetValue, exisiting key!"); + + + assert.ok(function () { + var value: string; + var res = _list.tryGetValue(10, val => value = val); + + return res === false; + + }, "sorted-list tryGetValue, invalid key!"); + }); + + + QUnit.test("sorted-list enumerable", function (assert) { + + var _list = CreateSortedList(); + + assert.deepEqual(_list.select(t => t.key * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a sorted-list!"); + assert.deepEqual(_list.where(t => t.key > 2).select(t => t.value).toArray(), ["C", "D", "E"], "where-select-toArray over a sorted-list!"); + }); + + + QUnit.test("evaluate sorting", function (assert) { + + var _list1 = CreateSortedList(), + _list2 = new SortedList<{ id: number; name: string }, number>({ compare: (a, b) => a.name.localeCompare(b.name) }); + + _list1.remove(5); + _list1.add(6, "F"); + _list1.remove(4); + _list1.add(7, "G"); + _list1.remove(3); + _list1.add(8, "H"); + _list1.remove(2); + _list1.add(9, "I"); + _list1.remove(1); + _list1.add(10, "J"); + + assert.deepEqual(_list1.keys().toArray(), [6, 7, 8, 9, 10], "evaluate sorted keys after multiple add/remove"); + assert.deepEqual(_list1.values().toArray(), ["F", "G", "H", "I", "J"], "evaluate sorted values after multiple add/remove"); + + + + _list2.add({ id: 2, name: "B" }, 2); + _list2.add({ id: 5, name: "E" }, 5); + _list2.add({ id: 4, name: "D" }, 4); + _list2.add({ id: 3, name: "C" }, 3); + _list2.add({ id: 1, name: "A" }, 1); + + assert.deepEqual(_list2.keys().select(t => t.id).toArray(), [1, 2, 3, 4, 5], "evaluate sorted keys after multiple add/remove using specified comparer!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateDictionary(): Dictionary { + var _dic = new Dictionary(); + _dic.add(1, "A"); + _dic.add(2, "B"); + _dic.add(3, "C"); + _dic.add(4, "D"); + _dic.add(5, "E"); + + return _dic; + } + + function CreateSortedList(): SortedList { + var _list = new SortedList(); + _list.add(5, "E"); + _list.add(3, "C"); + _list.add(2, "B"); + _list.add(4, "D"); + _list.add(1, "A"); + + return _list; + } + } + + + module DictionaryTests { + + QUnit.module("Dictionary"); + + + QUnit.test("constructor", function (assert) { + + var _comparer = EqualityComparer.create(o => mx.hash(o), (a, b) => a === b), + _d1 = new Dictionary(), + _d2 = new Dictionary(CreateDictionary()), + _d3 = new Dictionary(_comparer), + _d4 = new Dictionary(5), + _d5 = new Dictionary(5, _comparer), + _d6 = new Dictionary(CreateDictionary(), _comparer); + + + assert.ok(_d1.count() === 0, "initialize a Dictionary!"); + assert.ok(_d2.count() === 5, "initialize a Dictionary using specified dictionary!"); + assert.ok(_d3.count() === 0, "initialize a Dictionary using specified comparer!"); + assert.ok(_d4.count() === 0, "initialize a Dictionary using initial capacity!"); + assert.ok(_d5.count() === 0, "initialize a Dictionary using using initial capacity and comparer!"); + assert.ok(_d6.count() === 5, "initialize a Dictionary using specified dictionary and comparer!"); + }); + + + QUnit.test("add", function (assert) { + var _dic = new Dictionary(); + _dic.add(1, "A"); + + assert.ok(_dic.count() === 1, "ditionary add"); + assert.throws(() => _dic.add(1, "B"), "throws an error adding duplicate key"); + }); + + + QUnit.test("clear", function (assert) { + var _dic = CreateDictionary(); + _dic.clear(); + + assert.ok(_dic.count() === 0, "ditionary clear!"); + }); + + + QUnit.test("containsKey", function (assert) { + + var _dic = CreateDictionary(); + + assert.ok(_dic.containsKey(1) === true, "dictionary contains key!"); + assert.ok(_dic.containsKey(10) === false, "dictionary does not contain key!"); + }); + + + QUnit.test("containsValue", function (assert) { + + var _dic = CreateDictionary(); + + assert.ok(_dic.containsValue("A") === true, "dictionary contains value!"); + assert.ok(_dic.containsValue("Z") === false, "dictionary does not contain value!"); + }); + + + QUnit.test("copyTo", function (assert) { + + var _dic = CreateDictionary(), + _arr = new Array(_dic.count()); + + _dic.copyTo(_arr, 0); + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "dictionary copy to an array!"); + assert.throws(() => _dic.copyTo([], 0), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("keys", function (assert) { + + var _dic = CreateDictionary(); + + assert.deepEqual(_dic.keys().toArray(), [1, 2, 3, 4, 5], "dictionary keys!"); + assert.deepEqual(new Dictionary().keys().toArray(), [], "empty dictionary keys!"); + }); + + + QUnit.test("values", function (assert) { + + var _dic = CreateDictionary(); + + assert.deepEqual(_dic.values().toArray(), ["A", "B", "C", "D", "E"], "dictionary values!"); + assert.deepEqual(new Dictionary().values().toArray(), [], "empty dictionary values!"); + }); + + + QUnit.test("get", function (assert) { + + var _dic = CreateDictionary(); + + assert.ok(_dic.get(1) === "A", "dictionary get value!"); + assert.throws(() => _dic.get(10), "throws an error getting non existing key!"); + }); + + + QUnit.test("set", function (assert) { + + var _dic = CreateDictionary(); + + _dic.set(1, "AA"); + assert.ok(_dic.get(1) === "AA", "dictionary set value!"); + + _dic.set(6, "F"); + assert.ok(_dic.count() === 6 && _dic.get(6) === "F", "dictionary set new key and value!"); + }); + + + QUnit.test("tryGetValue", function (assert) { + + var _dic = CreateDictionary(); + + assert.ok(function () { + var value: string; + var res = _dic.tryGetValue(1, val => value = val); + + return res && value === "A"; + + }, "dictionary tryGetValue, exisiting key!"); + + + assert.ok(function () { + var value: string; + var res = _dic.tryGetValue(10, val => value = val); + + return res === false; + + }, "dictionary tryGetValue, invalid key!"); + }); + + + QUnit.test("remove", function (assert) { + + var _dic = CreateDictionary(); + + assert.ok(_dic.remove(1) === true && _dic.count() === 4, "dictionary remove key!"); + assert.ok(_dic.remove(10) === false && _dic.count() === 4, "dictionary remove non existing key!"); + }); + + + QUnit.test("key-value pair", function (assert) { + + var _pair1 = new KeyValuePair(1, "A"), + _pair2 = new KeyValuePair(1, "A"); + + assert.ok(_pair1.key === 1 && _pair1.value === "A", "KeyValuePair get key/value!"); + assert.throws(() => _pair1.key = 2, "throws an error trysing to set KeyValuePair key!"); + assert.throws(() => _pair1.value = "B", "throws an error trysing to set KeyValuePair value!"); + assert.ok(mx.hash(_pair1) === mx.hash(_pair2), "KeyValuePair get hash code!"); + assert.ok(mx.equals(_pair1, _pair2), "KeyValuePair equality check!"); + }); + + + QUnit.test("dictionary enumerable", function (assert) { + + var _dic = CreateDictionary(); + + assert.deepEqual(_dic.select(t => t.key).toArray(), [1, 2, 3, 4, 5], "dictionary select keys, to array!"); + assert.deepEqual(_dic.select(t => t.value).toArray(), ["A", "B", "C", "D", "E"], "dictionary select values, to array!"); + assert.ok(_dic.toArray()[0].key === 1 && _dic.toArray()[0].value === "A", "dictionary select key-value items!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateDictionary(): Dictionary { + var _dic = new Dictionary(); + _dic.add(1, "A"); + _dic.add(2, "B"); + _dic.add(3, "C"); + _dic.add(4, "D"); + _dic.add(5, "E"); + + return _dic; + } + } + + + module HashSetTests { + + QUnit.module("Hashset"); + + + QUnit.test("constructor", function (assert) { + + assert.ok(new HashSet().count() === 0, "initialize an empty HashSet!"); + assert.ok(new HashSet(mx.range(1, 5)).count() === 5, "initialize a HashSet using specified collection!"); + assert.ok(new HashSet(mx.EqualityComparer.defaultComparer).count() === 0, "initialize a HashSet using specified equality comparer!"); + assert.ok(CreateObjectHashSet().count() === 2, "initialize a HashSet using specified collection and equality comparer!"); + }); + + + QUnit.test("add", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(); + + assert.ok(_hash1.add(6) === true, "add item to a HashSet of numbers!"); + assert.ok(_hash1.add(1) === false, "add existing item to a HashSet of numbers!"); + assert.ok(_hash2.add({ name: "C", value: 5 }) === true, "add item to a HashSet of objects!"); + assert.ok(_hash2.add({ name: "A", value: 5 }) === false, "add an existing item to a HashSet of objects!"); + }); + + + QUnit.test("clear", function (assert) { + + var _hash = CreateNumericHashSet(); + + _hash.clear(); + assert.ok(_hash.count() === 0, "clear a HashSet!"); + }); + + + QUnit.test("contains", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(); + + assert.ok(_hash1.contains(1) === true, "HashSet of numbers contains an item!"); + assert.ok(_hash1.contains(6) === false, "HashSet of numbers does not contain an item!"); + assert.ok(_hash2.contains({ name: "A", value: 5 }) === true, "HashSet of objects contains an item!"); + assert.ok(_hash2.contains({ name: "C", value: 5 }) === false, "HashSet of objects does not contain an item!"); + }); + + + QUnit.test("copyTo", function (assert) { + + var _hash = CreateNumericHashSet(), + _arr = new Array(_hash.count()); + + _hash.copyTo(_arr, 0); + + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "HashSet copy to an array!"); + assert.throws(() => _hash.copyTo([], 0), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("comparer", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(); + + assert.ok(_hash1.comparer() === mx.EqualityComparer.defaultComparer, "HashSet default comparer!"); + assert.ok(_hash2.comparer().equals({ name: "A", value: 1 }, { name: "A", value: 2 }), "HashSet custom comparer!"); + }); + + + QUnit.test("remove", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(); + + assert.ok(_hash1.remove(1) === true, "HashSet of numbers remove an item!"); + assert.ok(_hash1.remove(1) === false, "HashSet of numbers remove non existing item!"); + assert.ok(_hash2.remove({ name: "A", value: 1 }) === true, "HashSet of objects remove an item!"); + assert.ok(_hash2.remove({ name: "A", value: 1 }) === false, "HashSet of objects remove non existing item!"); + }); + + + QUnit.test("removeWhere", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(); + + assert.ok(_hash1.removeWhere(t => t < 3) === 2, "HashSet of numbers remove with predicate, get number of items removed!"); + assert.ok(_hash1.removeWhere(t => t < 3) === 0, "HashSet of numbers remove with invalid predicate, get number of items removed!"); + assert.ok(_hash1.count() === 3, "HashSet of numbers remove with predicate, get count!"); + + assert.ok(_hash2.removeWhere(t => t.value < 3) === 1, "HashSet of objects remove with predicate, get number of items removed!"); + assert.ok(_hash2.removeWhere(t => t.value < 3) === 0, "HashSet of objects remove with invalid predicate, get number of items removed!"); + assert.ok(_hash2.count() === 1, "HashSet of objects remove with predicate, get count!"); + }); + + + QUnit.test("exceptWith", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(), + _hash3 = CreateNumericHashSet(); + + _hash1.exceptWith([1, 2, 3]); + _hash2.exceptWith([{ name: "A", value: 0 }]); + _hash3.exceptWith(CreateNumericHashSet()); + + assert.ok(_hash1.count() === 2 && _hash1.contains(1) === false, "HashSet of numbers except a collection, get count!"); + assert.ok(_hash2.count() === 1 && _hash2.contains({ name: "A", value: 0 }) === false, "HashSet of objects except a collection, get count!"); + assert.ok(_hash3.count() === 0, "HashSet of numbers except an equal set, get count!"); + }); + + + QUnit.test("intersectWith", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(), + _hash3 = CreateNumericHashSet(); + + _hash1.intersectWith([1, 2, 3]); + _hash2.intersectWith([{ name: "A", value: 0 }]); + _hash3.intersectWith(CreateNumericHashSet()); + + assert.ok(_hash1.count() === 3 && _hash1.contains(1) === true, "HashSet of numbers intersect with a collection, get count!"); + assert.ok(_hash2.count() === 1 && _hash2.contains({ name: "A", value: 0 }) === true, "HashSet of objects intersect with a collection, get count!"); + assert.ok(_hash3.count() === 5, "HashSet of numbers intersect with an equal set, get count!"); + }); + + + QUnit.test("isProperSubsetOf", function (assert) { + + var _hash = CreateNumericHashSet(); + + assert.ok(new HashSet().isProperSubsetOf([1, 2, 3]) === true, "an empty set is a proper subset of any other collection!"); + assert.ok(new HashSet().isProperSubsetOf([]) === false, "an empty set is not a proper subset of another empty collection!"); + assert.ok(_hash.isProperSubsetOf([1, 2, 3, 4]) === false, "a hash set is not a proper subset of another collection when count is greater than the number of elements in other!"); + assert.ok(_hash.isProperSubsetOf([1, 2, 3, 4, 5]) === false, "a hash set is not a proper subset of another collection when count is equal to the number of elements in other!"); + assert.ok(_hash.isProperSubsetOf([1, 2, 3, 4, 5, 6]) === true, "hash set proper subset!"); + }); + + + QUnit.test("isProperSupersetOf", function (assert) { + + var _hash = CreateNumericHashSet(); + + assert.ok(new HashSet().isProperSupersetOf([1, 2, 3]) === false, "an empty set is a not superset of any other collection!"); + assert.ok(new HashSet().isProperSupersetOf([]) === false, "an empty set is not a proper superset of another empty collection!"); + assert.ok(_hash.isProperSupersetOf([1, 2, 3, 4, 5, 6]) === false, "a hash set is not a proper superset of another collection when count is less than the number of elements in other!"); + assert.ok(_hash.isProperSupersetOf([1, 2, 3, 4, 5]) === false, "a hash set is not a proper superset of another collection when count is equal to the number of elements in other!"); + assert.ok(_hash.isProperSupersetOf([1, 2, 3]) === true, "hash set proper superset!"); + }); + + + QUnit.test("isSubsetOf", function (assert) { + + var _hash = CreateNumericHashSet(); + + assert.ok(new HashSet().isSubsetOf([1, 2, 3]) === true, "an empty set is a subset of any other collection!"); + assert.ok(new HashSet().isSubsetOf([]) === true, "an empty set is a subset of another empty collection!"); + assert.ok(_hash.isSubsetOf([1, 2, 3, 4]) === false, "a hash set is not a subset of another collection when count is greater than the number of elements in other!"); + assert.ok(_hash.isSubsetOf([1, 2, 3, 4, 5]) === true, "a hash set is a proper subset of another collection when count is equal to the number of elements in other!"); + assert.ok(_hash.isSubsetOf([1, 2, 3, 4, 5, 6]) === true, "hash set subset!"); + }); + + + QUnit.test("isSupersetOf", function (assert) { + + var _hash = CreateNumericHashSet(); + + assert.ok(new HashSet().isSupersetOf([1, 2, 3]) === false, "an empty set is a not superset of any other collection!"); + assert.ok(new HashSet().isSupersetOf([]) === true, "an empty set is superset of another empty collection!"); + assert.ok(_hash.isSupersetOf([1, 2, 3, 4, 5, 6]) === false, "a hash set is not a superset of another collection when count is less than the number of elements in other!"); + assert.ok(_hash.isSupersetOf([1, 2, 3, 4, 5]) === true, "a hash set is a proper superset of another collection when count is equal to the number of elements in other!"); + assert.ok(_hash.isSupersetOf([1, 2, 3]) === true, "hash set superset!"); + }); + + + QUnit.test("overlaps", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(); + + assert.ok(_hash1.overlaps([1, 2, 3]) === true, "HashSet of numbers overlaps with another collection!"); + assert.ok(_hash2.overlaps([{ name: "A", value: 0 }]) === true, "HashSet of objects overlaps with another collection!"); + assert.ok(new HashSet().overlaps([1, 2, 3]) === false, "an empty HashSet does not overlap with another collection!"); + }); + + + QUnit.test("setEquals", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateNumericHashSet(); + + assert.ok(_hash1.setEquals(_hash2) === true, "HashSet of numbers equals with another HashSet!"); + assert.ok(_hash1.setEquals([1, 2, 3, 4, 5]) === true, "HashSet of numbers equals with another collection!"); + assert.ok(new HashSet().setEquals([]) === true, "an empty HashSet equals with an empty collection!"); + assert.ok(new HashSet().setEquals([1, 2, 3]) === false, "an empty HashSet does not equals with another collection!"); + }); + + + QUnit.test("symmetricExceptWith", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(), + _hash3 = CreateNumericHashSet(); + + _hash1.symmetricExceptWith([2, 3, 4]); + _hash2.symmetricExceptWith([{ name: "A", value: 0 }]); + _hash3.exceptWith(CreateNumericHashSet()); + + assert.ok(_hash1.count() === 2, "HashSet of numbers symmetric except another collection, get count!"); + assert.ok(_hash1.contains(1) === true && _hash1.contains(5) === true, "HashSet of numbers symmetric except another collection, check contains!"); + assert.ok(_hash2.count() === 1, "HashSet of objects symmetric except another collection, get count!"); + assert.ok(_hash2.contains({ name: "A", value: 0 }) === false && _hash2.contains({ name: "B", value: 0 }) === true, "HashSet of objects symmetric except another collection, check contains!"); + assert.ok(_hash3.count() === 0, "HashSet of numbers symmetric except an equal set, get count!"); + }); + + + QUnit.test("unionWith", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(), + _hash3 = CreateNumericHashSet(); + + _hash1.unionWith([5, 6, 7, 8]); + _hash2.unionWith([{ name: "A", value: 5 }, { name: "B", value: 6 }, { name: "C", value: 7 }, { name: "D", value: 8 }]); + _hash3.unionWith(CreateNumericHashSet()); + + assert.ok(_hash1.count() === 8, "HashSet of numbers union with another collection, get count!"); + assert.ok(_hash1.contains(1) === true && _hash1.contains(8) === true, "HashSet of numbers union with another collection, check contains!"); + assert.ok(_hash2.count() === 4, "HashSet of objects union with another collection, get count!"); + assert.ok(_hash2.contains({ name: "A", value: 0 }) === true && _hash2.contains({ name: "D", value: 0 }) === true, "HashSet of objects union with another collection, check contains!"); + assert.ok(_hash3.count() === 5, "HashSet of numbers union with an equal set, get count!"); + }); + + + QUnit.test("set enumerable", function (assert) { + + var _hash1 = CreateNumericHashSet(), + _hash2 = CreateObjectHashSet(); + + assert.deepEqual(_hash1.select(t => t * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a HashSet of numbers!"); + assert.deepEqual(_hash2.select(t => t.value * 2).where(t => t > 5).toArray(), [6], "select-where-toArray over a HashSet of objects!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateNumericHashSet(): HashSet { + return new HashSet(mx.range(1, 5)); + } + + function CreateObjectHashSet(): HashSet { + + var _items: SimpleObject[] = [{ name: "A", value: 1 }, { name: "A", value: 2 }, { name: "B", value: 3 }, { name: "B", value: 4 }], + _comparer = EqualityComparer.create(obj => mx.hash(obj.name), (a, b) => a.name === b.name); + + return new HashSet(_items, _comparer); + } + } + + + module LinkedListTests { + + QUnit.module("LinkedList"); + + + QUnit.test("constructor", function (assert) { + + assert.ok(new LinkedList().count() === 0, "initialize an empty LinkedList!"); + assert.ok(CreateLinkedList().count() === 5, "initialize a LinkedList using specified collection!"); + }); + + + QUnit.test("add", function (assert) { + + var _list = CreateLinkedList(); + + _list.add(6); + assert.ok(_list.count() === 6, "add an item to a LinkedList!"); + }); + + + QUnit.test("clear", function (assert) { + + var _list = CreateLinkedList(); + + _list.clear(); + assert.ok(_list.count() === 0, "clear a LinkedList!"); + }); + + + QUnit.test("contains", function (assert) { + + var _list = CreateLinkedList(); + + assert.ok(_list.contains(1) && _list.contains(5), "LinkedList contains an item!"); + assert.ok(_list.contains(10) === false, "LinkedList does not contains an item!"); + }); + + + QUnit.test("copyTo", function (assert) { + + var _list = CreateLinkedList(), + _arr = new Array(_list.count()); + + _list.copyTo(_arr, 0); + + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "LinkedList copy to an array!"); + assert.throws(() => _list.copyTo([], 0), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("getFirst", function (assert) { + + var _list = CreateLinkedList(); + + assert.ok(_list.getFirst().value() === 1, "LinkedList first item!"); + assert.ok(new LinkedList().getFirst() === null, "empty LinkedList first item!"); + }); + + + QUnit.test("getLast", function (assert) { + + var _list = CreateLinkedList(); + + assert.ok(_list.getLast().value() === 5, "LinkedList last item!"); + assert.ok(new LinkedList().getLast() === null, "empty LinkedList last item!"); + }); + + + QUnit.test("addAfter", function (assert) { + + var _list = CreateLinkedList(), + _first = _list.getFirst(), + _node = new LinkedListNode(6); + + _list.addAfter(_first, _node); + _list.addAfter(_first, 7); + + assert.ok(_list.count() === 7, "LinkedList add after item, get count!"); + assert.ok(_list.contains(6) && _list.contains(7), "LinkedList add after item, check contains!"); + }); + + + QUnit.test("addBefore", function (assert) { + + var _list = CreateLinkedList(), + _last = _list.getLast(), + _node = new LinkedListNode(6); + + _list.addBefore(_last, _node); + _list.addBefore(_last, 7); + + assert.ok(_list.count() === 7, "LinkedList add before item, get count!"); + assert.ok(_list.contains(6) && _list.contains(7), "LinkedList add before item, check contains!"); + }); + + + QUnit.test("addFirst", function (assert) { + + var _list = CreateLinkedList(), + _node = new LinkedListNode(0); + + _list.addFirst(_node); + _list.addFirst(-1); + + assert.ok(_list.count() === 7, "LinkedList add first, get count!"); + assert.ok(_list.contains(0) && _list.contains(-1), "LinkedList add first, check contains!"); + assert.ok(_list.getFirst().value() === -1, "LinkedList add first, get first!"); + }); + + + QUnit.test("addLast", function (assert) { + + var _list = CreateLinkedList(), + _node = new LinkedListNode(6); + + _list.addLast(_node); + _list.addLast(7); + + assert.ok(_list.count() === 7, "LinkedList add last, get count!"); + assert.ok(_list.contains(6) && _list.contains(7), "LinkedList add last, check contains!"); + assert.ok(_list.getLast().value() === 7, "LinkedList add last, get last!"); + }); + + + QUnit.test("find", function (assert) { + + var _list = CreateLinkedList(); + + assert.ok(_list.find(4).value() === 4, "LinkedList find an item!"); + assert.ok(_list.find(10) === null, "LinkedList does not find an item!"); + }); + + + QUnit.test("findLast", function (assert) { + + var _list = CreateLinkedList(), + _node = new LinkedListNode(1); + + _list.addLast(_node); + + assert.ok(_list.findLast(1) === _node, "LinkedList find last!"); + assert.ok(_list.findLast(10) === null, "LinkedList does not find last item!"); + }); + + + QUnit.test("remove", function (assert) { + + var _list = CreateLinkedList(), + _last = _list.getLast(); + + assert.ok(_list.remove(1) === true, "LinkedList remove an item!"); + assert.ok(_list.remove(1) === false, "LinkedList remove non existing item!"); + assert.ok(_list.remove(_last) === true, "LinkedList remove a node!"); + assert.throws(() => _list.remove(_last), "throws an error when removing non existing or invalid node!"); + assert.ok(_list.count() === 3, "LinkedList remove, get count!"); + }); + + + QUnit.test("removeFirst", function (assert) { + + var _list = CreateLinkedList(); + + _list.removeFirst(); + + assert.ok(_list.count() === 4 && _list.contains(1) === false, "LinkedList remove first node!"); + assert.throws(() => new LinkedList().removeFirst(), "throws an error removing from an empty linked list!"); + }); + + + QUnit.test("removeLast", function (assert) { + + var _list = CreateLinkedList(); + + _list.removeLast(); + + assert.ok(_list.count() === 4 && _list.contains(5) === false, "LinkedList remove last node!"); + assert.throws(() => new LinkedList().removeLast(), "throws an error removing from an empty linked list!"); + }); + + + QUnit.test("linked-list enumerable", function (assert) { + + var _list = CreateLinkedList(); + assert.deepEqual(_list.select(t => t * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a linked-list!"); + }); + + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateLinkedList(): LinkedList { + return new LinkedList(mx.range(1, 5)); + } + } + + + module QueueTests { + + QUnit.module("Queue"); + + + QUnit.test("constructor", function (assert) { + + assert.ok(new Queue().count() === 0, "initialize an empty Queue!"); + assert.ok(CreateQueue().count() === 5, "initialize a Queue using specified collection!"); + }); + + + QUnit.test("clear", function (assert) { + + var _queue = CreateQueue(); + + _queue.clear(); + assert.ok(_queue.count() === 0, "clears a Queue!"); + }); + + + QUnit.test("contains", function (assert) { + + var _queue = CreateQueue(); + + assert.ok(_queue.contains(1) === true, "queue containing an item!"); + assert.ok(_queue.contains(10) === false, "queue does not contain an item!"); + }); + + + QUnit.test("copyTo", function (assert) { + + var _queue = CreateQueue(), + _arr = new Array(_queue.count()); + + _queue.copyTo(_arr, 0); + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "queue copy to an array!"); + assert.throws(() => _queue.copyTo([], 0), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("dequeue", function (assert) { + + var _queue = CreateQueue(); + + assert.ok(_queue.dequeue() === 1, "queue dequeue an item!"); + + _queue.clear(); + assert.throws(() => _queue.dequeue(), "throws an error dequeue from empty queue!"); + }); + + + QUnit.test("enqueue", function (assert) { + + var _queue = CreateQueue(); + + _queue.enqueue(6); + assert.ok(_queue.count() === 6 && _queue.peek() === 1, "queue dequeue an item!"); + }); + + + QUnit.test("peek", function (assert) { + + var _queue = CreateQueue(); + + assert.ok(_queue.peek() === 1, "queue peek an item!"); + + _queue.clear(); + assert.throws(() => _queue.peek(), "throws an error peek from empty queue!"); + }); + + + QUnit.test("toArray", function (assert) { + + var _queue = CreateQueue(); + + assert.deepEqual(_queue.toArray(), [1, 2, 3, 4, 5], "queue to array!"); + }); + + + QUnit.test("queue enumerable", function (assert) { + + var _queue = CreateQueue(); + + assert.deepEqual(_queue.select(t => t * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a queue!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateQueue(): Queue { + return new Queue(mx.range(1, 5)); + } + } + + + module StackTests { + + QUnit.module("Stack"); + + + QUnit.test("constructor", function (assert) { + + assert.ok(new Stack().count() === 0, "initialize an empty Stack!"); + assert.ok(CreateStack().count() === 5, "initialize a Stack using specified collection!"); + }); + + + QUnit.test("clear", function (assert) { + + var _stack = CreateStack(); + + _stack.clear(); + assert.ok(_stack.count() === 0, "clears a Stack!"); + }); + + + QUnit.test("contains", function (assert) { + + var _stack = CreateStack(); + + assert.ok(_stack.contains(1) === true, "stack containing an item!"); + assert.ok(_stack.contains(10) === false, "stack does not contain an item!"); + }); + + + QUnit.test("copyTo", function (assert) { + + var _stack = CreateStack(), + _arr = new Array(_stack.count()); + + _stack.copyTo(_arr, 0); + assert.deepEqual(_arr, [1, 2, 3, 4, 5], "stack copy to an array!"); + assert.throws(() => _stack.copyTo([], 0), "throws an error when the number of elements is greater than the number of elements that the destination array can contain!"); + }); + + + QUnit.test("peek", function (assert) { + + var _stack = CreateStack(); + + assert.ok(_stack.peek() === 5, "stack peek an item!"); + + _stack.clear(); + assert.throws(() => _stack.peek(), "throws an error peek from empty stack!"); + }); + + + QUnit.test("pop", function (assert) { + + var _stack = CreateStack(); + + assert.ok(_stack.pop() === 5, "stack pop an item!"); + + _stack.clear(); + assert.throws(() => _stack.pop(), "throws an error pop from empty stack!"); + }); + + + QUnit.test("push", function (assert) { + + var _stack = CreateStack(); + + _stack.push(6); + assert.ok(_stack.count() === 6 && _stack.peek() === 6, "stack push an item!"); + }); + + + QUnit.test("toArray", function (assert) { + + var _stack = CreateStack(); + + assert.deepEqual(_stack.toArray(), [1, 2, 3, 4, 5], "stack to array!"); + }); + + + QUnit.test("stack enumerable", function (assert) { + + var _stack = CreateStack(); + + assert.deepEqual(_stack.select(t => t * 2).where(t => t > 5).toArray(), [6, 8, 10], "select-where-toArray over a stack!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateStack(): Stack { + return new Stack(mx.range(1, 5)); + } + } + + + module LookupTests { + + QUnit.module("Lookup"); + + + QUnit.test("contains", function (assert) { + + var _lookup = CreateLookup(); + + assert.ok(_lookup.contains(1) === true, "lookup contains an item!"); + assert.ok(_lookup.contains(10) === false, "lookup does not an item!"); + }); + + + QUnit.test("count", function (assert) { + + var _lookup = CreateLookup(); + + assert.ok(_lookup.count() === 4, "lookup count!"); + }); + + + QUnit.test("get", function (assert) { + + var _lookup = CreateLookup(); + + assert.ok(_lookup.get(1).count() === 2, "lookup get an item!"); + assert.ok(_lookup.get(10).count() === 0, "lookup get non existing item!"); + }); + + + QUnit.test("lookup enumerable", function (assert) { + + var _lookup = CreateLookup(); + + assert.deepEqual(_lookup.select(t => t.key).toArray(), [1, 2, 3, 4], "lookup select keys, to array!"); + assert.deepEqual(_lookup.selectMany(t => t).toArray(), [1, 1, 2, 3, 3, 4, 4, 4], "lookup select all items, to array!"); + assert.deepEqual(_lookup.select(t => t.count()).toArray(), [2, 1, 2, 3], "lookup select items count!"); + }); + + + + /* Factory methods + ---------------------------------------------------------------------- */ + + function CreateLookup(): Lookup { + return mx([1, 1, 2, 3, 3, 4, 4, 4]).toLookup(t => t); + } + } +} \ No newline at end of file diff --git a/multiplexjs/multiplexjs.d.ts b/multiplexjs/multiplexjs.d.ts new file mode 100644 index 000000000..dc39fe6b6 --- /dev/null +++ b/multiplexjs/multiplexjs.d.ts @@ -0,0 +1,2551 @@ +// Type definitions for Multiplex.js 0.9 +// Project: http://github.com/multiplex/multiplex.js +// Definitions by: Kamyar Nazeri +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + + +declare var multiplex: multiplex.MultiplexStatic; + + +// Support AMD require +declare module 'multiplex' { + export = multiplex; +} + + +// Collapse multiplex into mx +import mx = multiplex; + + +// ES6 compatibility +interface Array extends multiplex.Iterable { } +interface String extends multiplex.Iterable { } + + + +declare module multiplex { + + /** + * ES6 Iterable + */ + interface Iterable { + "@@iterator"(): Iterator + } + interface Iterator { + next(): IteratorResult; + return?(value?: any): IteratorResult; + throw?(e?: any): IteratorResult; + } + interface IteratorResult { + done: boolean; + value?: T; + } + + + + /** + * Supports a simple iteration over a collection. + */ + interface Enumerator { + + /** + * Advances the enumerator to the next element of the collection. + */ + next(): boolean; + + /** + * Gets the element in the collection at the current position of the enumerator. + */ + current: T; + } + interface EnumeratorConstructor { + new (generator: (yielder: (value: T) => T) => any): Enumerator; + } + + + + /** + * Exposes the enumerator, which supports a simple iteration over a collection of a specified type. + * Enumerable uses ES6 Iteration protocol. + */ + interface Enumerable extends Iterable { + + /** + * Returns an enumerator that iterates through the collection. + */ + getEnumerator(): Enumerator; + } + interface EnumerableConstructor { + + /** + * Exposes the enumerator, which supports an iteration over the specified Enumerable object. + * @param obj An Iterable object. eg. Enumerable, Array, String, Set, Map, Iterable & Generators + */ + new (obj: Iterable): Enumerable; + + + /** + * Defines an enumerator, which supports an iteration over the specified Generator function. + * @param factory An Enumerator factory function. + */ + new (factory: () => Enumerator): Enumerable; + + /** + * Defines an enumerator, which supports an iteration over the items of the specified Array-like object. + * An Array-like object is an object which has the "length" property and indexed properties access, eg. jQuery + * @param obj An Array-like object. + */ + new (obj: ArrayLike): Enumerable; + + /** + * Defines an enumerator, which supports an iteration over the arguments local variable available within all functions. + * @param obj arguments local variable available within all functions. + */ + new (obj: IArguments): Enumerable; + + /** + * Defines an enumerator, which supports an iteration over the properties of the specified object. + * @param obj A regular Object. + */ + new (obj: Object): Enumerable>; + + + + + /** + * Returns an empty Enumerable. + */ + empty(): Enumerable; + + /** + * Detects if an object is Enumerable. + * @param obj An object to check its Enumerability. + */ + is(obj: any): boolean; + + /** + * Generates a sequence of integral numbers within a specified range. + * @param start The value of the first integer in the sequence. + * @param count The number of sequential integers to generate. + */ + range(start: number, count: number): Enumerable; + + /** + * Generates a sequence that contains one repeated value. + * @param element The value to be repeated. + * @param count The number of times to repeat the value in the generated sequence. + */ + repeat(element: T, count: number): Enumerable; + } + + + + /** + * Defines a method that a type implements to compare two objects. + */ + interface Comparer { + /** + * Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + * returns An integer that indicates the relative values of x and y, as shown in the following table: + * Less than zero x is less than y. + * Zero x equals y. + * Greater than zero x is greater than y.. + * @param x The first object to compare. + * @param y The second object to compare. + */ + compare(x: T, y: T): number; + } + interface ComparerConstructor { + + /** + * Returns a default sort order comparer for the type specified by the generic argument. + */ + defaultComparer: Comparer; + + /** + * Creates a comparer by using the specified comparison. + * @param comparison The comparison to use. + */ + create(comparison: (x: T, y: T) => number): Comparer; + } + + + + /** + * Provides a base class for implementations of the EqualityComparer. + */ + interface EqualityComparer { + + /** + * Determines whether the specified objects are equal. + * @param x The first object of type Object to compare. + * @param y The second object of type Object to compare. + */ + equals(x: T, y: T): boolean; + + + /** + * Returns a hash code for the specified object. + * @param obj The Object for which a hash code is to be returned. + */ + hash(obj: T): number + } + interface EqualityComparerConstructor { + + /** + * Gets a default equality comparer for the type specified by the generic argument. + */ + defaultComparer: EqualityComparer; + + + /** + * Creates an EqualityComparer by using the specified equality and hashCodeProvider. + * @param hashCodeProvider The hashCodeProvider to use for a hash code is to be returned. + * @param equality The equality function. + */ + create(hashCodeProvider: (obj: T) => number, equality: (x: T, y: T) => boolean): EqualityComparer; + } + + + + /** + * Initializes a new instance of the abstract Collection class. + */ + interface Collection extends Enumerable { + + /** + * Gets the number of elements contained in the Collection. + */ + count(): number; + + + /** + * Copies the Collection to an existing one-dimensional Array, starting at the specified array index. + * @param array The one-dimensional Array that is the destination of the elements copied from Dictionary keys. + * @param arrayIndex The zero-based index in array at which copying begins. + */ + copyTo(array: T[], arrayIndex: number): void + } + interface CollectionConstructor { + + /** + * Initializes a new instance of the Collection class that is empty. + */ + new (): Collection + + + /** + * Initializes a new instance of the Collection class that is wrapper around the specified Enumerable. + * @param value The Iterable to wrap. + */ + new (value: Iterable): Collection + } + + + + /** + * Initializes a new instance of the abstract Collection class. + */ + interface ReadOnlyCollection extends Collection { + + /** + * Gets the element at the specified index. + * @param index The zero-based index of the element to get. + */ + [index: number]: T; + + + /** + * Gets the element at the specified index. + * @param index The zero-based index of the element to get. + */ + get(index: number): T + + + /** + * Determines whether the ReadOnlyCollection contains a specific value. + * @param item The object to locate in the ReadOnlyCollection. + */ + contains(item: T): boolean + + + /** + * Searches for the specified object and returns the zero-based index of the first occurrence within the entire ReadOnlyCollection. + * @param item The object to locate in the ReadOnlyCollection. + */ + indexOf(item: T): number + } + interface ReadOnlyCollectionConstructor { + + /** + * Initializes a new instance of the ReadOnlyCollection class that is a read-only wrapper around the specified list. + * @param list The list to wrap. + */ + new (list: List): ReadOnlyCollection + } + + + + /** + * Represents a strongly typed list of objects that can be accessed by index. + */ + interface List extends Collection { + + /** + * Gets the element at the specified index. + * @param index The zero-based index of the element to get. + */ + [index: number]: T; + + + /** + * Adds an object to the end of the List. + * @param item The object to be added to the end of the List. + */ + add(item: T): void + + + /** + * Adds the elements of the specified collection to the end of the List. + * @param collection The collection whose elements should be added to the end of the List. + */ + addRange(collection: Iterable): void + + + /** + * Returns a read-only wrapper for the current list. + */ + asReadOnly(): ReadOnlyCollection + + + /** + * Searches the entire sorted List for an element using the default comparer and returns the zero-based index of the element. + * Returns The zero-based index of item in the sorted List, if item is found; otherwise, a negative number + * that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, + * the bitwise complement of List.count(). + * @param item The object to locate. The value can be null for reference types. + */ + binarySearch(item: T): number + + + /** + * Searches the entire sorted List for an element using the specified comparer and returns the zero-based index of the element. + * returns The zero-based index of item in the sorted List, if item is found; otherwise, a negative number + * that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, + * the bitwise complement of List.count(). + * @param item The object to locate. The value can be null for reference types. + * @param comparer The Comparer implementation to use when comparing elements. + */ + binarySearch(item: T, comparer: Comparer): number + + + /** + * Searches a range of elements in the sorted List for an element using the specified comparer and returns the zero-based index of the element. + * returns The zero-based index of item in the sorted List, if item is found; otherwise, a negative number + * that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, + * the bitwise complement of List.count(). + * @param item The object to locate. The value can be null for reference types. + * @param index The zero-based starting index of the range to search. + * @param count The length of the range to search. + * @param comparer The Comparer implementation to use when comparing elements. + */ + binarySearch(item: T, index: number, count: number, comparer: Comparer): number + + + /** + * Removes all items from the List. + */ + clear(): void + + + /** + * Determines whether the List contains elements that match the conditions defined by the specified predicate. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + exists(match: (item: T) => boolean): boolean + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire List. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + find(match: (item: T) => boolean): T + + + /** + * Retrieves all the elements that match the conditions defined by the specified predicate. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findAll(match: (item: T) => boolean): List + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, + * and returns the zero-based index of the first occurrence within the entire List, if found; otherwise, –1. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findIndex(match: (item: T) => boolean): number + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, + * and returns the zero-based index of the first occurrence within the range of elements + * in the List that extends from the specified index to the last element, if found; otherwise, –1. + * @param startIndex The zero-based starting index of the search. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findIndex(startIndex: number, match: (item: T) => boolean): number + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, + * and returns the zero-based index of the first occurrence within the range of elements + * in the List that starts at the specified index and contains the specified number of elements, if found; otherwise, –1. + * @param startIndex The zero-based starting index of the search. + * @param count The number of elements in the section to search. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findIndex(startIndex: number, count: number, match: (item: T) => boolean): number + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, + * and returns the last occurrence within the entire List. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findLast(match: (item: T) => boolean): T + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, + * and returns the zero-based index of the last occurrence within the entire List, if found; otherwise, –1. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findLastIndex(match: (item: T) => boolean): number + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, + * and returns the zero-based index of the last occurrence within the range of elements + * in the List that extends from the first element to the specified index, if found; otherwise, –1. + * @param startIndex The zero-based starting index of the search. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findLastIndex(startIndex: number, match: (item: T) => boolean): number + + + /** + * Searches for an element that matches the conditions defined by the specified predicate, + * and returns the zero-based index of the last occurrence within the range of elements + * in the List that contains the specified number of elements and ends at the specified index, if found; otherwise, –1. + * @param startIndex The zero-based starting index of the search. + * @param count The number of elements in the section to search. + * @param match The predicate function that defines the conditions of the elements to search for. + */ + findLastIndex(startIndex: number, count: number, match: (item: T) => boolean): number + + + /** + * Performs the specified action on each element of the List. + * @param action The action function to perform on each element of the List. + */ + forEach(action: (item: T) => void): void + + + /** + * Gets the element at the specified index. + * @param index The zero-based index of the element to get. + */ + get(index: number): T + + + /** + * Creates a shallow copy of a range of elements in the source List. + * @param index The zero-based List index at which the range starts. + * @param count The number of elements in the range. + */ + getRange(index: number, count: number): List + + + /** + * Searches for the specified object and returns the zero-based index of the first occurrence within the entire List, if found; otherwise, –1. + * @param item The object to locate in the List. + */ + indexOf(item: T): number + + + /** + * Searches for the specified object and returns the zero-based index of the first occurrence within + * the range of elements in the List that extends from the specified index to the last element, if found; otherwise, –1. + * @param item The object to locate in the List. + * @param index The zero-based starting index of the search. 0 (zero) is valid in an empty list. + */ + indexOf(item: T, index: number): number + + + /** + * Inserts an element into the List at the specified index. + * @param index The zero-based index at which item should be inserted. + * @param item The object to insert. The value can be null for reference types. + */ + insert(index: number, item: T): void + + + /** + * Inserts the elements of a collection into the List at the specified index. + * @param index The zero-based index at which item should be inserted. + * @param collection The collection whose elements should be inserted into the List. + */ + insertRange(index: number, collection: Iterable): void + + + /** + * Gets an Array wrapper around the List. + */ + items(): T[] + + + /** + * Searches for the specified object and returns the zero-based index of the last occurrence within the entire List, if found; otherwise, –1. + * @param item The object to locate in the List. + */ + lastIndexOf(item: T): number + + + /** + * Searches for the specified object and returns the zero-based index of the last occurrence + * within the range of elements in the List that extends from the specified index to the last element if found; otherwise, –1. + * @param item The object to locate in the List. + * @param index The zero-based starting index of the search. 0 (zero) is valid in an empty list. + */ + lastIndexOf(item: T, index: number): number + + + /** + * Removes the first occurrence of a specific object from the List. + * @param item The object to remove from the List. + */ + remove(item: T): boolean + + + /** + * Removes all the elements that match the conditions defined by the specified predicate. + * @param match The predicate function that defines the conditions of the elements to remove. + */ + removeAll(match: (item: T) => boolean): number + + + /** + * Removes the element at the specified index of the List. + * @param index The zero-based index of the element to remove. + */ + removeAt(index: number): void + + + /** + * Removes a range of elements from the List. + * @param index The zero-based index of the element to remove. + * @param count The number of elements to remove. + */ + removeRange(index: number, count: number): void + + + /** + * Reverses the order of the elements in the entire List + */ + reverse(): any + + + /** + * Reverses the order of the elements in the entire List + * @param index The zero-based starting index of the range to reverse. + * @param count The number of elements in the range to reverse. + */ + reverse(index: number, count: number): void + + + /** + * Sets the element at the specified index. + * @param index The zero-based index of the element to set. + * @param item The object to be added at the specified index. + */ + set(index: number, value: T): void + + + /** + * Sorts the elements in the entire List using the default comparer. + */ + sort(): void + + + /** + * Sorts the elements in the entire List using the specified Comparison. + * @param comparison The comparison function to use when comparing elements. + */ + sort(comparison: (x: T, y: T) => number): void + + + /** + * Sorts the elements in the entire List using the specified comparer. + * @param comparer The Comparer implementation to use when comparing elements. + */ + sort(comparer: Comparer): void + + + /** + * Sorts the elements in a range of elements in List using the specified comparer. + * @param index The zero-based starting index of the range to sort. + * @param count The length of the range to sort. + * @param comparer The Comparer implementation to use when comparing elements. + */ + sort(index: number, count: number, comparer: Comparer): void + + + /** + * Copies the elements of the List to a new array. + */ + toArray(): T[] + + + /** + * Determines whether every element in the List matches the conditions defined by the specified predicate. + * @param match The Predicate function that defines the conditions to check against the elements. + */ + trueForAll(match: (item: T) => boolean): boolean + } + interface ListConstructor { + + /** + * Initializes a new instance of the List class that is empty. + */ + new (): List + + + /** + * Initializes a new instance of the List class that is empty and has the specified initial capacity. + * @param capacity The number of elements that the new list can initially store. + */ + new (capacity: number): List + + + /** + * Initializes a new instance of the List class that contains elements copied from the specified arguments + * @param args Arbitrary number of arguments to copy to the new list. + */ + new (...args: T[]): List + + + /** + * Initializes a new instance of the List class that contains elements copied from the specified collection + * and has sufficient capacity to accommodate the number of elements copied. + * @param collection The collection whose elements are copied to the new list. + */ + new (collection: Iterable): List + } + + + + /** + * Represents a collection of key/value pairs that are sorted by key based on the associated Comparer implementation. + */ + interface SortedList extends Collection> { + + /** + * Adds an element with the specified key and value into the SortedList. + * @param key The key of the element to add. + * @param value The value of the element to add. The value can be null for reference types. + */ + add(key: TKey, value: TValue): void + + + /** + * Gets the value associated with the specified key. + * @param key The key whose value to get. + */ + get(key: TKey): TValue + + + /** + * Gets or sets the number of elements that the SortedList can contain. + * @param value The number of elements that the SortedList can contain. + */ + capacity(value?: number): number + + + /** + * Removes all elements from the SortedList. + */ + clear(): void + + + /** + * Gets the Comparer for the sorted list. + */ + comparer(): Comparer + + + /** + * Determines whether the SortedList contains a specific key. + * @param key The key to locate in the SortedList. + */ + containsKey(key: TKey): boolean + + + /** + * Determines whether the SortedList contains a specific value. + * @param value The value to locate in the SortedList. + */ + containsValue(value: TValue): boolean + + + /** + * Gets a collection containing the keys in the SortedList, in sorted order. + */ + keys(): Collection + + + /** + * Gets a collection containing the values in the SortedLis. + */ + values(): Collection + + + /** + * Searches for the specified key and returns the zero-based index within the entire SortedList. + * @param key The key to locate in the SortedList. + */ + indexOfKey(key: TKey): number + + + /** + * Searches for the specified value and returns the zero-based index of the first occurrence within the entire SortedList. + * @param value The value to locate in the SortedList. + */ + indexOfValue(value: TValue): number + + + /** + * Removes the element with the specified key from the SortedList. + * Returns true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original SortedList. + * @param key The key of the element to remove. + */ + remove(key: TKey): boolean + + + /** + * Removes the element at the specified index of the SortedList. + * @param index The zero-based index of the element to remove. + */ + removeAt(index: number): void + + + /** + * Sets the value associated with the specified key. + * @param key The key whose value to get or set. + * @param value The value associated with the specified key. + */ + set(key: TKey, value: TValue): void + + + /** + * Sets the capacity to the actual number of elements in the SortedList, if that number is less than 90 percent of current capacity. + */ + trimExcess(): void + + + /** + * Gets the value associated with the specified key. + * @param key The key whose value to get. + * @param callback When this method returns, callback method is called with the value + * associated with the specified key, if the key is found; otherwise, null for the type of the value parameter. + */ + tryGetValue(key: TKey, callback: (value: TValue) => void): boolean + } + interface SortedListConstructor { + + /** + * Initializes a new instance of the SortedList class that is empty, + * has the default initial capacity, and uses the default Comparer. + */ + new (): SortedList + + + /** + * Initializes a new instance of the SortedList class that contains elements copied from the specified Dictionary, + * has sufficient capacity to accommodate the number of elements copied, and uses the default Comparer. + * @param dictionary The Dictionary whose elements are copied to the new SortedList. + */ + new (dictionary: Dictionary): SortedList + + + /** + * Initializes a new instance of the SortedList class that is empty, + * has the default initial capacity, and uses the specified Comparer. + * @param comparer The Comparer implementation to use when comparing keys.-or-null to use the default Comparer for the type of the key. + */ + new (comparer: Comparer): SortedList + + + /** + * Initializes a new instance of the SortedList class that is empty, + * has the specified initial capacity, and uses the default Comparer. + * @param capacity The initial number of elements that the SortedList can contain. + */ + new (capacity: number): SortedList + + + /** + * Initializes a new instance of the SortedList class that contains elements copied from the specified Dictionary, + * has sufficient capacity to accommodate the number of elements copied, and uses the specified Comparer. + * @param dictionary The Dictionary whose elements are copied to the new SortedList. + * @param comparer The Comparer implementation to use when comparing keys.-or-null to use the default Comparer for the type of the key. + */ + new (dictionary: Dictionary, comparer: Comparer): SortedList + + + /** + * Initializes a new instance of the SortedList class that is empty, + * has the specified initial capacity, and uses the specified Comparer. + * @param capacity The initial number of elements that the SortedList can contain. + * @param comparer The Comparer implementation to use when comparing keys.-or-null to use the default Comparer for the type of the key. + */ + new (capacity: number, comparer: Comparer): SortedList + } + + + + /** + * Defines a key/value pair that can be set or retrieved. + */ + interface KeyValuePair { + + /** + * Gets the key in the key/value pair. + */ + key: TKey; + + + /** + * Gets the value in the key/value pair. + */ + value: TValue; + } + interface KeyValuePairConstructor { + + /** + * Initializes a new instance of the KeyValuePair with the specified key and value. + * @param key The object defined in each key/value pair. + * @param value The definition associated with key. + */ + new (key: TKey, value: TValue): KeyValuePair + } + + + + /** + * Represents a collection of keys and values. + */ + interface Dictionary extends Collection> { + + /** + * Adds an element with the provided key and value to the Dictionary. + * @param key The object to use as the key of the element to add. + * @param value The object to use as the value of the element to add. + */ + add(key: TKey, value: TValue): void + + + /** + * Removes all keys and values from the Dictionary. + */ + clear(): void + + + /** + * Determines whether the Dictionary contains the specified key. + * @param key The key to locate in the Dictionary. + */ + containsKey(key: TKey): boolean + + + /** + * Determines whether the Dictionary contains a specific value. + * @param value The value to locate in the Dictionary. + */ + containsValue(value: TValue): boolean + + + /** + * Copies the Dictionary keys to an existing one-dimensional Array, starting at the specified array index. + * @param array The one-dimensional Array that is the destination of the elements copied from Dictionary keys. + * @param arrayIndex The zero-based index in array at which copying begins. + */ + copyTo(array: TKey[], arrayIndex: number): void + copyTo(array: KeyValuePair[], arrayIndex: number): void + + + /** + * Gets a Collection containing the keys of the Dictionary. + */ + keys(): Collection + + + /** + * Gets a Collection containing the values in the Dictionary. + */ + values(): Collection + + + /** + * Gets element with the specified key. + * @param key The key of the element to get. + */ + get(key: TKey): TValue + + + /** + * Sets the element with the specified key. + * @param key The key of the element to set. + * @param value The object to use as the value of the element to set. + */ + set(key: TKey, value: TValue): void + + + /** + * Gets the value associated with the specified key. + * @param key The key whose value to get. + * @param callback When this method returns, callback method is called with the value + * associated with the specified key, if the key is found; otherwise, null for the type of the value parameter. + */ + tryGetValue(key: TKey, callback: (value: TValue) => void): boolean + + + /** + * Removes the element with the specified key from the Dictionary. + * @param key The key of the element to remove. + */ + remove(key: TKey): boolean + } + interface DictionaryConstructor { + + /** + * Initializes a new instance of the Dictionary class that is empty, + */ + new (): Dictionary + + + /** + * Initializes a new instance of the Dictionary class that contains elements copied + * from the specified Dictionary and uses the default equality comparer for the key type. + * @param dictionary The Dictionary whose elements are copied to the new Dictionary. + */ + new (dictionary: Dictionary): Dictionary + + + /** + * Initializes a new instance of the Dictionary class that is empty, and uses the specified EqualityComparer. + * @param comparer The EqualityComparer implementation to use when comparing keys. + */ + new (comparer: EqualityComparer): Dictionary + + + /** + * Initializes a new instance of the Dictionary class that is empty, has the specified initial capacity, and uses the default equality comparer for the key type. + * @param capacity The initial number of elements that the Dictionary can contain. + */ + new (capacity: number): Dictionary + + + /** + * Initializes a new instance of the Dictionary that is empty, has the specified initial capacity, and uses the specified EqualityComparer. + * @param capacity The initial number of elements that the Dictionary can contain. + * @param comparer The EqualityComparer implementation to use when comparing keys. + */ + new (capacity: number, comparer: EqualityComparer): Dictionary + + + /** + * Initializes a new instance of the Dictionary class that contains elements copied + * from the specified Dictionary and uses the specified EqualityComparer. + * @param dictionary The Dictionary whose elements are copied to the new Dictionary. + * @param comparer The EqualityComparer implementation to use when comparing keys. + */ + new (dictionary: Dictionary, comparer: EqualityComparer): Dictionary + } + + + + /** + * Represents a set of values. + */ + interface HashSet extends Collection { + + /** + * Adds an element to the current set. + * @param item The element to add to the set. + */ + add(item: T): boolean + + + /** + * Removes all elements from a HashSet object. + */ + clear(): void + + + /** + * Copies the elements of a HashSet object to an array. + * @param array The one-dimensional array that is the destination of the elements copied from the HashSet object. + */ + copyTo(array: T[]): void + + + /** + * Copies the elements of a HashSet object to an array. starting at the specified array index. + * @param array The one-dimensional array that is the destination of the elements copied from the HashSet object. + * @param arrayIndex The zero-based index in array at which copying begins. + */ + copyTo(array: T[], arrayIndex: number): void + + + /** + * Copies the elements of a HashSet object to an array. + * @param array The one-dimensional array that is the destination of the elements copied from the HashSet object. + * @param arrayIndex The zero-based index in array at which copying begins. + * @param count The number of elements to copy to array. + */ + copyTo(array: T[], arrayIndex: number, count: number): void + + + /** + * Gets the EqualityComparer object that is used to determine equality for the values in the set. + */ + comparer(): EqualityComparer + + + /** + * Removes the specified element from a HashSet object. + * @param item The element to remove. + */ + remove(item: T): boolean + + + /** + * Removes all elements that match the conditions defined by the specified predicate from a HashSet collection. + * @param match The predicate function that defines the conditions of the elements to remove. + */ + removeWhere(match: (item: T) => boolean): number + + + /** + * Removes all elements in the specified collection from the current set. + * @param other The collection of items to remove from the set. + */ + exceptWith(other: Iterable): void + + + /** + * Modifies the current set so that it contains only elements that are also in a specified collection. + * @param other The collection to compare to the current set. + */ + intersectWith(other: Iterable): void + + + /** + * Determines whether the current set is a proper (strict) subset of a specified collection. + * @param other The collection to compare to the current set. + */ + isProperSubsetOf(other: Iterable): boolean + + + /** + * Determines whether the current set is a proper (strict) superset of a specified collection. + * @param other The collection to compare to the current set. + */ + isProperSupersetOf(other: Iterable): boolean + + + /** + * Determines whether a set is a subset of a specified collection. + * @param other The collection to compare to the current set. + */ + isSubsetOf(other: Iterable): boolean + + + /** + * Determines whether the current set is a superset of a specified collection. + * @param other The collection to compare to the current set. + */ + isSupersetOf(other: Iterable): boolean + + + /** + * Determines whether the current set overlaps with the specified collection. + * @param other The collection to compare to the current set. + */ + overlaps(other: Iterable): boolean + + + /** + * Determines whether the current set and the specified collection contain the same elements. + * @param other The collection to compare to the current set. + */ + setEquals(other: Iterable): boolean + + + /** + * Modifies the current set so that it contains only elements that are present + * either in the current set or in the specified collection, but not both. + * @param other The collection to compare to the current set. + */ + symmetricExceptWith(other: Iterable): void + + + /** + * Modifies the current set so that it contains all elements that are present + * in either the current set or the specified collection. + * @param other The collection to compare to the current set. + */ + unionWith(other: Iterable): void + + } + interface HashSetConstructor { + + /** + * Initializes a new instance of the HashSet class that is empty and uses the default equality comparer for the set type. + */ + new (): HashSet + + + /** + * Initializes a new instance of the HashSet class that uses the default equality comparer for the set type, + * and contains elements copied from the specified collection. + * @param collection The collection whose elements are copied to the new set. + */ + new (collection: Iterable): HashSet + + + /** + * Initializes a new instance of the HashSet class that is empty and uses the specified equality comparer for the set type. + * @param comparer The EqualityComparer implementation to use when comparing values in the set. + */ + new (comparer: EqualityComparer): HashSet + + + /** + * Initializes a new instance of the HashSet class that uses the specified equality comparer for the set type, + * contains elements copied from the specified collection, and uses the specified equality comparer for the set type. + * @param collection The collection whose elements are copied to the new set. + * @param comparer The EqualityComparer implementation to use when comparing values in the set. + */ + new (collection: Iterable, comparer: EqualityComparer): HashSet + } + + + + /** + * Represents a node in a LinkedList. + */ + interface LinkedListNode { + + /** + * Gets the value contained in the node. + */ + value(): T + + + /** + * Gets the LinkedList that the LinkedListNode belongs to. + */ + list(): LinkedList + + + /** + * Gets the next node in the LinkedList. + */ + next(): LinkedListNode + + + /** + * Gets the previous node in the LinkedList. + */ + previous(): LinkedListNode + } + interface LinkedListNodeConstructor { + + /** + * Initializes a new instance of the LinkedListNode class, containing the specified value. + * @param value The value to contain in the LinkedListNode + */ + new (value: T): LinkedListNode + } + + + + /** + * Represents a doubly linked list. + */ + interface LinkedList extends Collection { + + /** + * Adds an item to the LinkedList. + * @param item The object to add to the LinkedList. + */ + add(item: T): void + + + /** + * Removes all nodes from the LinkedList. + */ + clear(): void + + + /** + * Determines whether a value is in the LinkedList. + * @param value The value to locate in the LinkedList. The value can be null for reference types. + */ + contains(item: T): boolean + + + /** + * Gets the first node of the LinkedList. + */ + getFirst(): LinkedListNode + + + /** + * Gets the last node of the LinkedList. + */ + getLast(): LinkedListNode + + + /** + * Adds the specified new node after the specified existing node in the LinkedList and returns the new LinkedListNode. + * @param node The LinkedListNode after which to insert newNode. + * @param newNode The new LinkedListNode to add to the LinkedList. + */ + addAfter(node: LinkedListNode, newNode: LinkedListNode): LinkedListNode + + + /** + * Adds the specified new node after the specified existing node in the LinkedList. + * returns The new LinkedListNode containing value. + * @param node The LinkedListNode after which to insert newNode. + * @param value The value to add to the LinkedList. + */ + addAfter(node: LinkedListNode, value: T): LinkedListNode + + + /** + * Adds the specified new node before the specified existing node in the LinkedList. + * returns The new LinkedListNode. + * @param node The LinkedListNode before which to insert newNode. + * @param newNode The new LinkedListNode to add to the LinkedList. + */ + addBefore(node: LinkedListNode, newNode: LinkedListNode): LinkedListNode + + + /** + * Adds the specified new node before the specified existing node in the LinkedList. + * returns The new LinkedListNode containing value. + * @param node The LinkedListNode before which to insert newNode. + * @param value The value to add to the LinkedList. + */ + addBefore(node: LinkedListNode, value: T): LinkedListNode + + + /** + * Adds the specified new node at the start of the LinkedList. + * returns The new LinkedListNode. + * @param node The new LinkedListNode to add at the start of the LinkedList. + */ + addFirst(node: LinkedListNode): LinkedListNode + + + /** + * Adds the specified new node at the start of the LinkedList. + * returns The new LinkedListNode containing value. + * @param value The value to add at the start of the LinkedList. + */ + addFirst(value: T): LinkedListNode + + + /** + * Adds the specified new node at the end of the LinkedList. + * returns The new LinkedListNode. + * @param node The new LinkedListNode to add at the end of the LinkedList. + */ + addLast(node: LinkedListNode): LinkedListNode + + + /** + * Adds the specified new node at the end of the LinkedList. + * returns The new LinkedListNode containing value. + * @param value The value to add at the end of the LinkedList. + */ + addLast(value: T): LinkedListNode + + + /** + * Finds the first node that contains the specified value. + * @param value The value to locate in the LinkedList. + */ + find(value: T): LinkedListNode + + + /** + * Finds the last node that contains the specified value. + * @param value The value to locate in the LinkedList. + */ + findLast(value: T): LinkedListNode + + /** + * Removes the node at the start of the LinkedList. + * returns true if the node is successfully removed; otherwise, false. + * This method also returns false if value was not found in the original LinkedList. + * @param node + */ + remove(node: LinkedListNode): boolean + + + /** + * Removes the first occurrence of the specified value from the LinkedList. + * returns true if the element containing value is successfully removed; otherwise, false. + * This method also returns false if value was not found in the original LinkedList. + * @param value The value to remove from the LinkedList. + */ + remove(value: T): boolean + + + /** + * Removes the node at the start of the LinkedList. + */ + removeFirst(): void + + + /** + * Removes the node at the end of the LinkedList. + */ + removeLast(): void + } + interface LinkedListConstructor { + + /** + * Initializes a new instance of the LinkedList class that is empty. + */ + new (): LinkedList + + + /** + * Initializes a new instance of the LinkedList class that contains elements copied from the specified Enumerable. + * @param collection The collection to copy elements from. + */ + new (collection: Iterable): LinkedList + } + + + + /** + * Represents a first-in, first-out collection of objects. + */ + interface Queue extends Collection { + + /** + * Removes all objects from the Queue. + */ + clear(): void + + + /** + * Determines whether an element is in the Queue. + * @param item The object to locate in the Queue. + */ + contains(item: T): boolean + + + /** + * Removes and returns the object at the beginning of the Queue. + */ + dequeue(): T + + /** + * Adds an object to the end of the Queue. + * @param item The object to add to the Queue. + */ + enqueue(item: T): void + + + /** + * Returns the object at the beginning of the Queue without removing it. + */ + peek(): T + + + /** + * Copies the Queue to a new array. + */ + toArray(): T[] + } + interface QueueConstructor { + + /** + * Initializes a new instance of the Queue class that is empty. + */ + new (): Queue + + + /** + * Initializes a new instance of the Queue class that contains elements copied from the specified collection. + * @param collection The collection to copy elements from. + */ + new (collection: Iterable): Queue + } + + + + /** + * Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type. + */ + interface Stack extends Collection { + + /** + * Removes all objects from the Stack. + */ + clear(): void + + + /** + * Determines whether an element is in the Stack. + * @param item The object to locate in the Stack. + */ + contains(item: T): boolean + + + /** + * Returns the object at the top of the Stack without removing it. + */ + peek(): T + + + /** + * Removes and returns the object at the top of the Stack. + */ + pop(): T + + + /** + * Inserts an object at the top of the Stack. + * @param item The object to push onto the Stack. + */ + push(item: T): void + + + /** + * Copies the Stack to a new array. + */ + toArray(): T[] + } + interface StackConstructor { + + /** + * Initializes a new instance of the Stack class that is empty. + */ + new (): Stack + + + /** + * Initializes a new instance of the Stack class that contains elements copied from the specified collection. + * @param collection The collection to copy elements from. + */ + new (collection: Iterable): Stack + } + + + + /** + * Defines a data structures that map keys to Enumerable sequences of values. + */ + interface Lookup extends Collection> { + + /** + * Determines whether a specified key exists in the Lookup. + * @param key The key to search for in the Lookup. + */ + contains(key: TKey): boolean + contains(item: Grouping): boolean + + + + /** + * Gets the value associated with the specified key. + * @param key The key of the element to add. + */ + get(key: TKey): Enumerable + } + + + + /** + * Represents a collection of objects that have a common key. + */ + interface Grouping extends Collection { + + /** + * Gets the key of the Grouping. + */ + key: TKey + } + + + + /** + * Exposes the enumerator, which supports a simple iteration over a collection of a specified type. + */ + interface OrderedEnumerable extends Enumerable { + + /** + * Performs a subsequent ordering on the elements of an OrderedEnumerable according to a key. + * @param keySelector The selector used to extract the key for each element. + * @param comparer The Comparer used to compare keys for placement in the returned sequence. + * @param descending true to sort the elements in descending order; false to sort the elements in ascending order. + */ + createOrderedEnumerable(keySelector: (item: TElement) => TKey, comparer: Comparer, descending: boolean): OrderedEnumerable + + + /** + * Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. + * Returns an OrderedEnumerable whose elements are sorted in descending order according to a key. + * @param keySelector A function to extract a key from each element. + */ + thenBy(keySelector: (item: TElement) => TKey): OrderedEnumerable + + + /** + * Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer. + * Returns an OrderedEnumerable whose elements are sorted according to a key. + * @param keySelector A function to extract a key from each element. + * @param comparer A Comparer to compare keys. + */ + thenBy(keySelector: (item: TElement) => TKey, comparer: Comparer): OrderedEnumerable + + + /** + * Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. + * Returns an OrderedEnumerable whose elements are sorted in descending order according to a key. + * @param keySelector A function to extract a key from each element. + */ + thenByDescending(keySelector: (item: TElement) => TKey): OrderedEnumerable + + + /** + * Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. + * Returns an OrderedEnumerable whose elements are sorted in descending order according to a key. + * @param keySelector A function to extract a key from each element. + * @param comparer A Comparer to compare keys. + */ + thenByDescending(keySelector: (item: TElement) => TKey, comparer: Comparer): OrderedEnumerable + } + + + + /** + * Defines Enumerable extention methods applied on Enumerable + */ + interface Enumerable { + + + /** + * Applies an accumulator function over a sequence. + * Returns the final accumulator value. + * @param func An accumulator function to be invoked on each element. + */ + aggregate(func: (accumulate: T, item: T) => T): T + + + /** + * Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value. + * Returns the final accumulator value. + * @param seed The initial accumulator value. + * @param func An accumulator function to be invoked on each element. + */ + aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, item: T) => TAccumulate): TAccumulate + + + /** + * Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, + * and the specified function is used to select the result value. + * Returns the final accumulator value. + * @param seed The initial accumulator value. + * @param func An accumulator function to be invoked on each element. + * @param resultSelector A function to transform the final accumulator value into the result value. + */ + aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, item: T) => TAccumulate, resultSelector: (accumulate: TAccumulate) => TResult): TResult; + + + /** + * Determines whether all elements of a sequence satisfy a condition. + * Returns true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false. + * @param predicate A function to test each element for a condition. + */ + all(predicate: (item: T) => boolean): boolean + + + /** + * Determines whether a sequence contains any elements. + * Returns true if the source sequence contains any elements; otherwise, false. + */ + any(): boolean + + + /** + * Determines whether any element of a sequence satisfies a condition. + * Returns true if any elements in the source sequence pass the test in the specified predicate; otherwise, false. + * @param predicate A function to test each element for a condition. + */ + any(predicate: (item: T) => boolean): boolean + + + /** + * Returns the input typed as Enumerable. + */ + asEnumerable(): Enumerable + + + /** + * Computes the average of a sequence of numeric values. + */ + average(): number + + + /** + * Computes the average of a sequence of numeric values that are obtained by invoking a transform function on each element of the input sequence. + * @param selector A transform function to apply to each element. + */ + average(selector: (item: number) => number): number + + + /** + * Concatenates two sequences. + * @param second The sequence to concatenate to the first sequence. + */ + concat(second: Iterable): Enumerable + + + /** + * Determines whether a sequence contains a specified element by using the default equality comparer. + * @param value The value to locate in the sequence. + */ + contains(value: T): boolean + + + /** + * Returns the last element of a sequence that satisfies a specified condition. + * @param value The value to locate in the sequence. + * @param comparer An equality comparer to compare values. + */ + contains(value: T, comparer: EqualityComparer): boolean + + + /** + * Returns the number of elements in a sequence. + */ + count(): number + + + /** + * Returns a number that represents how many elements in the specified sequence satisfy a condition. + * @param predicate A function to test each element for a condition. + */ + count(predicate: (item: T) => boolean): number + + + /** + * Returns the elements of the specified sequence or null if the sequence is empty. + */ + defaultIfEmpty(): Enumerable + + + /** + * Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. + * @param defaultValue The value to return if the sequence is empty. + */ + defaultIfEmpty(defaultValue: T): Enumerable + + + /** + * Returns distinct elements from a sequence by using the default equality comparer to compare values. + */ + distinct(): Enumerable + + + /** + * Produces the set difference of two sequences by using the EqualityComparer to compare values. + * @param comparer An EqualityComparer to compare values. + */ + distinct(comparer: EqualityComparer): Enumerable + + + /** + * Produces the set difference of two sequences by using the default equality comparer to compare values. + * @param second An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence. + */ + except(second: Iterable): Enumerable + + + /** + * Produces the set difference of two sequences by using the specified EqualityComparer to compare values. + * @param second An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence. + * @param comparer An EqualityComparer to compare values. + */ + except(second: Iterable, comparer: EqualityComparer): Enumerable + + + /** + * Returns the element at a specified index in a sequence. Throws an error if the index is less than 0 or greater than or equal to the number of elements in source. + * @param index The zero-based index of the element to retrieve. + */ + elementAt(index: number): T + + + /** + * Returns the first element of a sequence. this method throws an exception if there is no element in the sequence. + */ + first(): T + + + /** + * Returns the first element in a sequence that satisfies a specified condition. this method throws an exception if there is no element in the sequence. + * @param predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. + */ + first(predicate: (item: T) => boolean): T + + + /** + * Returns the first element of a sequence, or null if the sequence contains no elements. + */ + firstOrDefault(): T + + + /** + * Returns the first element of the sequence that satisfies a condition or null if no such element is found. + * @param predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. + */ + firstOrDefault(predicate: (item: T) => boolean): T + + + /** + * Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. + * @param predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. + * @param defaultValue The value to return if no element exists with specified condition. + */ + firstOrDefault(predicate: (item: T) => boolean, defaultValue: T): T + + + /** + * Performs the specified action on each element of an Enumerable. + * @param action The action function to perform on each element of an Enumerable. + */ + forEach(action: (item: T) => void): void + + + /** + * Performs the specified action on each element of an Enumerable. + * @param action The action function to perform on each element of an Enumerable; the second parameter of the function represents the index of the source element. + */ + forEach(action: (item: T, index: number) => void): void + + + /** + * Groups the elements of a sequence according to a specified key selector function. + * @param keySelector A function to extract the key for each element. + */ + groupBy(keySelector: (item: T) => TKey): Enumerable>; + + + /** + * Groups the elements of a sequence according to a specified key selector function. + * @param keySelector A function to extract the key for each element. + * @param comparer An equality comparer to compare values. + */ + groupBy(keySelector: (item: T) => TKey, comparer: EqualityComparer): Enumerable>; + + + /** + * Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function. + * @param keySelector A function to extract the key for each element. + * @param elementSelector A function to map each source element to an element in the Grouping. + */ + groupBy(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement): Enumerable>; + + + /** + * Groups the elements of a sequence according to a key selector function. + * The keys are compared by using a comparer and each group's elements are projected by using a specified function. + * @param keySelector A function to extract the key for each element. + * @param elementSelector A function to map each source element to an element in the Grouping. + * @param comparer An equality comparer to compare values. + */ + groupBy(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement, comparer: EqualityComparer): Enumerable>; + + + /** + * Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function. + * @param keySelector A function to extract the key for each element. + * @param elementSelector A function to map each source element to an element in the Grouping. + * @param resultSelector A function to extract the key for each element. + */ + groupBy(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement, resultSelector: (key: TKey, elements: Iterable) => TResult): Enumerable; + + + /** + * Groups the elements of a sequence according to a key selector function. + * The keys are compared by using a comparer and each group's elements are projected by using a specified function. + * @param keySelector A function to extract the key for each element. + * @param elementSelector A function to map each source element to an element in the Grouping. + * @param resultSelector A function to extract the key for each element. + * @param comparer An equality comparer to compare values. + */ + groupBy(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement, resultSelector: (key: TKey, elements: Iterable) => TResult, comparer: EqualityComparer): Enumerable; + + + /** + * Correlates the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys. + * @param inner The sequence to join to the current sequence. + * @param outerKeySelector A function to extract the join key from each element of the first sequence. + * @param innerKeySelector A function to extract the join key from each element of the second sequence. + * @param resultSelector A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. + */ + groupJoin(inner: Iterable, outerKeySelector: (item: T) => TKey, innerKeySelector: (item: TInner) => TKey, resultSelector: (outer: T, inner: Enumerable) => TResult): Enumerable; + + + /** + * Correlates the elements of two sequences based on key equality and groups the results. A specified EqualityComparer is used to compare keys. + * @param inner The sequence to join to the current sequence. + * @param outerKeySelector A function to extract the join key from each element of the first sequence. + * @param innerKeySelector A function to extract the join key from each element of the second sequence. + * @param resultSelector A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. + * @param comparer An equality comparer to compare values. + */ + groupJoin(inner: Iterable, outerKeySelector: (item: T) => TKey, innerKeySelector: (item: TInner) => TKey, resultSelector: (outer: T, inner: Enumerable) => TResult, comparer: EqualityComparer): Enumerable; + + + /** + * Produces the set intersection of two sequences by using the default equality comparer to compare values. + * @param second An Iterable whose distinct elements that also appear in the first sequence will be returned. + */ + intersect(second: Iterable): Enumerable; + + + /** + * Produces the set intersection of two sequences by using the default equality comparer to compare values. + * @param second An Iterable whose distinct elements that also appear in the first sequence will be returned. + * @param comparer An EqualityComparer to compare values. + */ + intersect(second: Iterable, comparer: EqualityComparer): Enumerable; + + + /** + * Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys. + * @param inner The sequence to join to the current sequence. + * @param outerKeySelector A function to extract the join key from each element of the first sequence. + * @param innerKeySelector A function to extract the join key from each element of the second sequence. + * @param resultSelector A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. + */ + join(inner: Iterable, outerKeySelector: (item: T) => TKey, innerKeySelector: (item: TInner) => TKey, resultSelector: (outer: T, inner: TInner) => TResult): Enumerable; + + + /** + * Correlates the elements of two sequences based on matching keys. A specified EqualityComparer is used to compare keys. + * @param inner The sequence to join to the current sequence. + * @param outerKeySelector A function to extract the join key from each element of the first sequence. + * @param innerKeySelector A function to extract the join key from each element of the second sequence. + * @param resultSelector A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. + * @param comparer An equality comparer to compare values. + */ + join(inner: Iterable, outerKeySelector: (item: T) => TKey, innerKeySelector: (item: TInner) => TKey, resultSelector: (outer: T, inner: TInner) => TResult, comparer: EqualityComparer): Enumerable; + + + /** + * Returns the last element of a sequence. + */ + last(): T + + + /** + * Returns the last element of a sequence that satisfies a specified condition. + * @param predicate A function to test each source element for a condition. + */ + last(predicate: (item: T) => boolean): T + + + /** + * Returns the first element of a sequence, or null if the sequence contains no elements. + */ + lastOrDefault(): T + + + /** + * Returns the last element of a sequence, or null if the sequence contains no elements. + * @param predicate A function to test each source element for a condition. + */ + lastOrDefault(predicate: (item: T) => boolean): T + + + /** + * Returns the last element of a sequence that satisfies a condition or null if no such element is found. + * @param predicate A function to test each source element for a condition. + * @param defaultValue The value to return if no element exists with specified condition. + */ + lastOrDefault(predicate: (item: T) => boolean, defaultValue: T): T + + + /** + * Returns the maximum value in a sequence of values. + */ + max(): T + + + /** + * Invokes a transform function on each element of a sequence and returns the maximum value. + * @param selector A transform function to apply to each element. + */ + max(selector: (item: T) => TResult): TResult + + + /** + * Returns the minimum value in a sequence of values. + */ + min(): T + + + /** + * Invokes a transform function on each element of a sequence and returns the minimum value. + * @param selector A transform function to apply to each element. + */ + min(selector: (item: T) => TResult): TResult + + + /** + * Filters the elements of an Enumerable based on a specified type. + * @param type The type to filter the elements of the sequence on. + */ + ofType(type: { new (...args: any[]): TResult }): Enumerable + + + /** + * Sorts the elements of a sequence in ascending order by using a specified comparer. + * @param keySelector A function to extract a key from each element. + */ + orderBy(keySelector: (item: T) => TKey): OrderedEnumerable + + + /** + * Sorts the elements of a sequence in ascending order by using a specified comparer. + * Returns an OrderedEnumerable whose elements are sorted according to a key. + * @param keySelector A function to extract a key from each element. + * @param comparer A Comparer to compare keys. + */ + orderBy(keySelector: (item: T) => TKey, comparer: EqualityComparer): OrderedEnumerable + + + /** + * Sorts the elements of a sequence in descending order by using a specified comparer. + * Returns an OrderedEnumerable whose elements are sorted according to a key. + * Returns an OrderedEnumerable whose elements are sorted in descending order according to a key. + * @param keySelector A function to extract a key from each element. + */ + orderByDescending(keySelector: (item: T) => TKey): OrderedEnumerable + + + /** + * Sorts the elements of a sequence in descending order by using a specified comparer. + * Returns an OrderedEnumerable whose elements are sorted in descending order according to a key. + * @param keySelector A function to extract a key from each element. + * @param comparer A Comparer to compare keys. + */ + orderByDescending(keySelector: (item: T) => TKey, comparer: EqualityComparer): OrderedEnumerable + + + /** + * Inverts the order of the elements in a sequence. + */ + reverse(): Enumerable + + + /** + * Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type. + * @param second An Iterable to compare to the first sequence. + */ + sequenceEqual(second: Iterable): boolean + + + /** + * Determines whether two sequences are equal by comparing their elements by using a specified EqualityComparer. + * @param second An Iterable to compare to the first sequence. + * @param comparer The EqualityComparer to compare values. + */ + sequenceEqual(second: Iterable, comparer: EqualityComparer): boolean + + + /** + * Projects each element of a sequence into a new form. + * @param selector A transform function to apply to each source element. + */ + select(selector: (item: T) => TResult): Enumerable + + + /** + * Projects each element of a sequence into a new form by incorporating the element's index. + * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + */ + select(selector: (item: T, index: number) => TResult): Enumerable + + + /** + * Projects each element of a sequence to an Enumerable and flattens the resulting sequences into one sequence. + * @param collectionSelector A transform function to apply to each source element. + */ + selectMany(selector: (item: T) => Iterable): Enumerable; + + + /** + * Projects each element of a sequence to an Enumerable and flattens the resulting sequences into one sequence. The index of each source element is used in the projected form of that element. + * @param collectionSelector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + */ + selectMany(selector: (item: T, index: number) => Iterable): Enumerable; + + + /** + * Projects each element of a sequence to an Enumerable and flattens the resulting sequences into one sequence. + * @param collectionSelector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + * @param resultSelector A transform function to apply to each element of the intermediate sequence. + */ + selectMany(collectionSelector: (item: T) => Iterable, resultSelector: (item: T, collection: TCollection) => TResult): Enumerable; + + + /** + * Projects each element of a sequence to an Enumerable and flattens the resulting sequences into one sequence. The index of each source element is used in the projected form of that element. + * @param collectionSelector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + * @param resultSelector A transform function to apply to each element of the intermediate sequence. + */ + selectMany(collectionSelector: (item: T, index: number) => Iterable, resultSelector: (item: T, collection: TCollection) => TResult): Enumerable; + + + /** + * Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. + */ + single(): T + + + /** + * Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. + * @param predicate A function to test each source element for a condition. + */ + single(predicate: (item: T) => boolean): T + + + /** + * Returns the only element of a sequence, or a null if the sequence is empty; this method throws an exception if there is more than one element in the sequence. + */ + singleOrDefault(): T + + + /** + * Returns the only element of a sequence that satisfies a specified condition or a null if no such element exists; this method throws an exception if more than one element satisfies the condition. + * @param predicate A function to test each source element for a condition. + */ + singleOrDefault(predicate: (item: T) => boolean): T + + + /** + * Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition. + * @param predicate A function to test each source element for a condition. + * @param defaultValue The value to return if no element exists with specified condition. + */ + singleOrDefault(predicate: (item: T) => boolean, defaultValue: T): T + + + /** + * Bypasses a specified number of elements in a sequence and then returns the remaining elements. + * @param count The number of elements to skip before returning the remaining elements. + */ + skip(count: number): Enumerable + + + /** + * Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. + * @param predicate A function to test each source element for a condition. + */ + skipWhile(predicate: (item: T) => boolean): Enumerable + + + /** + * Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function. + * @param predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. + */ + skipWhile(predicate: (item: T, index: number) => boolean): Enumerable + + + /** + * Computes the sum of a sequence of values. + */ + sum(): number + + + /** + * Computes the sum of the sequence of values that are obtained by invoking a transform function on each element of the input sequence. + * @param selector A transform function to apply to each element. + */ + sum(selector: (item: T) => number): number + + + /** + * Returns a specified number of contiguous elements from the start of a sequence. + * @param count The number of elements to return. + */ + take(count: number): Enumerable + + + /** + * Returns elements from a sequence as long as a specified condition is true. + * @param predicate A function to test each source element for a condition. + */ + takeWhile(predicate: (item: T) => boolean): Enumerable + + + /** + * Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function. + * @param predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. + */ + takeWhile(predicate: (item: T, index: number) => boolean): Enumerable + + + /** + * Creates an array from an Enumerable. + */ + toArray(): T[] + + + /** + * Creates a Dictionary from an Enumerable according to a specified key selector function. + * @param keySelector A function to extract a key from each element. + */ + toDictionary(keySelector: (item: T) => TKey): Dictionary; + + + /** + * Creates a Dictionary from an Enumerable according to specified key selector and comparer. + * @param keySelector A function to extract a key from each element. + * @param comparer An equality comparer to compare values. + */ + toDictionary(keySelector: (item: T) => TKey, comparer: EqualityComparer): Dictionary; + + + /** + * Creates a Dictionary from an Enumerable according to specified key selector and element selector functions. + * @param keySelector A function to extract a key from each element. + * @param elementSelector A transform function to produce a result element value from each element. + */ + toDictionary(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement): Dictionary; + + + /** + * Creates a Dictionary from an Enumerable according to a specified key selector function, a comparer, and an element selector function. + * @param keySelector A function to extract a key from each element. + * @param elementSelector A transform function to produce a result element value from each element. + * @param comparer An equality comparer to compare values. + */ + toDictionary(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement, comparer: EqualityComparer): Dictionary; + + + /** + * Creates a List from an Enumerable. + */ + toList(): List + + + /** + * Creates a Lookup from an Enumerable according to a specified key selector function. + * @param keySelector A function to extract a key from each element. + */ + toLookup(keySelector: (item: T) => TKey): Lookup; + + + /** + * Creates a Lookup from an Enumerable according to a specified key selector function and comparer. + * @param keySelector A function to extract a key from each element. + * @param comparer An equality comparer to compare values. + */ + toLookup(keySelector: (item: T) => TKey, comparer: EqualityComparer): Lookup; + + + /** + * Creates a Lookup from an Enumerable according to specified key selector and element selector functions. + * @param keySelector A function to extract a key from each element. + * @param elementSelector A transform function to produce a result element value from each element. + */ + toLookup(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement): Lookup; + + + /** + * Creates a Lookup from an Enumerable according to a specified key selector function, a comparer and an element selector function. + * @param keySelector A function to extract a key from each element. + * @param elementSelector A transform function to produce a result element value from each element. + * @param comparer An equality comparer to compare values. + */ + toLookup(keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement, comparer: EqualityComparer): Lookup; + + + /** + * Produces the set union of two sequences by using the default equality comparer. + * @param second An Iterable whose distinct elements form the second set for the union. + */ + union(second: Iterable): Enumerable + + + /** + * Produces the set union of two sequences by using a specified EqualityComparer. + * @param second An Iterable whose distinct elements form the second set for the union. + * @param comparer The EqualityComparer to compare values. + */ + union(second: Iterable, comparer: EqualityComparer): Enumerable + + + /** + * Filters a sequence of values based on a predicate. + * @param predicate A function to test each source element for a condition. + */ + where(predicate: (item: T) => boolean): Enumerable; + + + /** + * Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function. + * @param predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. + */ + where(predicate: (item: T, index: number) => boolean): Enumerable; + + + /** + * Merges two sequences by using the specified predicate function. + * @param second The second sequence to merge. + * @param resultSelector A function that specifies how to merge the elements from the two sequences. + */ + zip(second: Iterable, resultSelector: (first: T, second: TSecond) => TResult): Enumerable; + } + + + + /** + * Represents Array-like objects which has the "length" property and indexed properties access, eg. jQuery + */ + interface ArrayLike { + length: number; + [n: number]: T; + } + + + + /** + * Provides 'hash' and 'equals' functions for a particular type, suitable for use in hashing algorithms and data structures such as a hash table. + */ + interface RuntimeComparer { + + /** + * Serves as a hash function for a particular type. + */ + __hash__(): number; + + /** + * Determines whether the specified Object is equal to the current Object. + */ + __equals__(obj: any): boolean; + } + + + + /** + * Provides a set of static methods that provide support for internal operations. + */ + interface MultiplexRuntime { + + /** + * Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures such as a hash table. + * @param obj An object to retrieve the hash code for. + */ + hash(obj: any): number; + + + /** + * Determines whether the specified object instances are considered equal. + * @param objA The first object to compare. + * @param objB The second object to compare. + */ + equals(objA: any, objB: any): boolean; + + + /** + * Performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other. + * @param objA The first object to compare. + * @param objB The second object to compare. + */ + compare(objA: T, objB: T): number; + + + /** + * Creates A function expression from the specified string lambda expression + * @param exp String lambda expression. + */ + lambda(exp: string): (obj: T) => TResult; + + + /** + * Creates A function expression from the specified string lambda expression + * @param exp String lambda expression. + */ + lambda(exp: string): (obj1: T1, obj2: T2) => TResult; + + + /** + * Creates A function expression from the specified string lambda expression + * @param exp String lambda expression. + */ + lambda(exp: string): (obj1: T1, obj2: T2, obj3: T3) => TResult; + + + /** + * Creates A function expression from the specified string lambda expression + * @param exp String lambda expression. + */ + lambda(exp: string): (...args: any[]) => TResult; + + + /** + * Defines new or modifies existing properties directly on the specified object, returning the object. + * @param obj The object on which to define or modify properties. + * @param prop The name of the property to be defined or modified. + * @param attributes The descriptor for the property being defined or modified. + */ + define(obj: T, prop: String, attributes: PropertyDescriptor): T; + + + /** + * Extends the given object by implementing supplied members. + * @param obj The object on which to define or modify properties. + * @param properties Represetnts the mixin source object + * @param attributes The descriptor for the property being defined or modified. + */ + mixin(obj: T, properties: Object, attributes?: PropertyDescriptor): T; + } + + + + /** + * Defines MultiplexStatic module members + */ + interface MultiplexStatic { + + + + /* Factory Methods + --------------------------------------------------------------------------*/ + + /** + * Exposes the enumerator, which supports an iteration over the specified Enumerable object. + * @param obj An Iterable object. eg. Enumerable, Array, String, Set, Map, Iterable & Generators + */ + (obj: Iterable): Enumerable + + + /** + * Defines an enumerator, which supports an iteration over the specified Generator function. + * @param factory An Enumerator factory function. + */ + (factory: () => Enumerator): Enumerable + + + /** + * Defines an enumerator, which supports an iteration over the items of the specified Array-like object. + * An Array-like object is an object which has the "length" property and indexed properties access, eg. jQuery + * @param obj An Array-like object. + */ + (obj: ArrayLike): Enumerable + + + /** + * Defines an enumerator, which supports an iteration over the arguments local variable available within all functions. + * @param obj arguments local variable available within all functions. + */ + (obj: IArguments): Enumerable + + + /** + * Defines an enumerator, which supports an iteration over the properties of the specified object. + * @param obj A regular Object. + */ + (obj: Object): Enumerable> + + + + + + + /* Static Methods + --------------------------------------------------------------------------*/ + + /** + * Gets and combines hash code for the given parameters, calls the overridden "hash" method when available. + * @param objs Optional number of objects to combine their hash codes. + */ + hash(...obj: any[]): number; + + + /** + * Determines whether the specified object instances are considered equal. calls the overridden "equals" method when available. + * @param objA The first object to compare. + * @param objB The second object to compare. + */ + equals(objA: any, objB: any): boolean; + + + /** + * Determines whether the specified object instances are considered equal. calls the overridden "equals" method when available. + * @param objA The first object to compare. + * @param objB The second object to compare. + * @param comparer An equality comparer to compare values. + */ + equals(objA: any, objB: any, comparer: EqualityComparer): boolean; + + + /** + * Performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other. + * @param objA The first object to compare. + * @param objB The second object to compare. + */ + compare(objA: T, objB: T): number; + + + /** + * Extends Enumerable extension methods to the given type + * @param type The type to extend. + */ + enumerableExtend(type: Function): void; + + + /** + * Returns an empty Enumerable. + */ + empty(): Enumerable; + + + /** + * Detects if an object is Enumerable. + * @param obj An object to check its Enumerability. + */ + is(obj: any): boolean; + + + /** + * Generates a sequence of integral numbers within a specified range. + * @param start The value of the first integer in the sequence. + * @param count The number of sequential integers to generate. + */ + range(start: number, count: number): Enumerable; + + + /** + * Generates a sequence that contains one repeated value. + * @param element The value to be repeated. + * @param count The number of times to repeat the value in the generated sequence. + */ + repeat(element: T, count: number): Enumerable; + + + + + + + /* Mutiplex Types + --------------------------------------------------------------------------*/ + + /** + * Provides a set of static methods that provide support for internal operations. + */ + runtime: MultiplexRuntime + + /** + * Supports a simple iteration over a collection. + */ + Enumerator: EnumeratorConstructor + + /** + * Exposes the enumerator, which supports a simple iteration over a collection of a specified type. + */ + Enumerable: EnumerableConstructor + + /** + * Provides a base class for implementations of Comparer generic interface. + */ + Comparer: ComparerConstructor + + /** + * Provides a base class for implementations of the EqualityComparer. + */ + EqualityComparer: EqualityComparerConstructor + + /** + * Initializes a new instance of the abstract Collection class. + */ + Collection: CollectionConstructor + + /** + * Initializes a new instance of the abstract Collection class. + */ + ReadOnlyCollection: ReadOnlyCollectionConstructor + + /** + * Represents a strongly typed list of objects that can be accessed by index. + */ + List: ListConstructor + + /** + * Represents a collection of key/value pairs that are sorted by key based on the associated Comparer implementation. + */ + SortedList: SortedListConstructor + + /** + * Defines a key/value pair that can be set or retrieved. + */ + KeyValuePair: KeyValuePairConstructor + + /** + * Represents a collection of keys and values. + */ + Dictionary: DictionaryConstructor + + /** + * Represents a set of values. + */ + HashSet: HashSetConstructor + + /** + * Represents a node in a LinkedList. + */ + LinkedListNode: LinkedListNodeConstructor + + /** + * Represents a doubly linked list. + */ + LinkedList: LinkedListConstructor + + /** + * Represents a first-in, first-out collection of objects. + */ + Queue: QueueConstructor + + /** + * Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type. + */ + Stack: StackConstructor + } +} \ No newline at end of file From 3724099e05645107f2680428d6e0d237790051e8 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Date: Tue, 26 May 2015 16:44:06 -0300 Subject: [PATCH 085/137] test > tests --- hashids/{hashids-test.ts => hashids-tests.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hashids/{hashids-test.ts => hashids-tests.ts} (100%) diff --git a/hashids/hashids-test.ts b/hashids/hashids-tests.ts similarity index 100% rename from hashids/hashids-test.ts rename to hashids/hashids-tests.ts From 4ed4731d6b9f802846b9f8bc1be55d1ffdde43f2 Mon Sep 17 00:00:00 2001 From: Dominic Alie Date: Tue, 26 May 2015 15:44:24 -0400 Subject: [PATCH 086/137] Update angular-file-upload definitions Add abort and xhr methods to the upload promise --- angular-file-upload/angular-file-upload-tests.ts | 4 ++++ angular-file-upload/angular-file-upload.d.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/angular-file-upload/angular-file-upload-tests.ts b/angular-file-upload/angular-file-upload-tests.ts index 8b8fe7490..85dcb7853 100644 --- a/angular-file-upload/angular-file-upload-tests.ts +++ b/angular-file-upload/angular-file-upload-tests.ts @@ -29,6 +29,10 @@ module controllers { }, file: file }) + .abort() + .xhr((evt: any) => { + console.log('xhr'); + }) .progress((evt: angular.angularFileUpload.IFileProgressEvent) => { var percent = parseInt((100.0 * evt.loaded / evt.total).toString(), 10); console.log("upload progress: " + percent + "% for " + evt.config.file.name); diff --git a/angular-file-upload/angular-file-upload.d.ts b/angular-file-upload/angular-file-upload.d.ts index fa7aaa54e..d38c43226 100644 --- a/angular-file-upload/angular-file-upload.d.ts +++ b/angular-file-upload/angular-file-upload.d.ts @@ -14,8 +14,9 @@ declare module angular.angularFileUpload { } interface IUploadPromise extends IHttpPromise { - + abort(): IUploadPromise; progress(callback: IHttpPromiseCallback): IUploadPromise; + xhr(callback: IHttpPromiseCallback): IUploadPromise; } interface IFileUploadConfig extends IRequestConfig { From e96b92628f8ec90da6aebc58f44445f10e2cb655 Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Tue, 26 May 2015 21:42:24 -0300 Subject: [PATCH 087/137] Initial Commit --- magicsuggest/magicsuggest.d.ts | 463 +++++++++++++++++++++++++++++++++ 1 file changed, 463 insertions(+) create mode 100644 magicsuggest/magicsuggest.d.ts diff --git a/magicsuggest/magicsuggest.d.ts b/magicsuggest/magicsuggest.d.ts new file mode 100644 index 000000000..4d031c39f --- /dev/null +++ b/magicsuggest/magicsuggest.d.ts @@ -0,0 +1,463 @@ +// Type definitions for MagicSuggest 2.1.4 +// Project: http://nicolasbize.com/magicsuggest +// Definitions by: Leonardo Chaia +// Definitions: http://github.com/leonardochaia + +/// +interface JQuery { + magicSuggest: (configurationObject: MagicSuggest.Configuration) => MagicSuggest.Instance; +} + +declare module MagicSuggest { + interface Configuration { + /********** CONFIGURATION PROPERTIES ************/ + /** + * Restricts or allows the user to validate typed entries. + * Defaults to true. + */ + allowFreeEntries?: boolean; + + /** + * Restricts or allows the user to add the same entry more than once + * Defaults to false. + */ + allowDuplicates?: boolean; + + /** + * Additional config object passed to each $.ajax call + */ + ajaxConfig?: JQueryAjaxSettings; + + /** + * If a single suggestion comes out, it is preselected. + */ + autoSelect?: boolean; + + /** + * Auto select the first matching item with multiple items shown + */ + selectFirst?: boolean; + + /** + * Allow customization of query parameter + */ + queryParam?: string; + + /** + * A function triggered just before the ajax request is sent, similar to jQuery + */ + beforeSend?: () => void; + + /** + * A custom CSS class to apply to the field's underlying element. + */ + cls?: string; + + /** + * JSON Data source used to populate the combo box. 3 options are available here: + * No Data Source (default) + * When left null, the combo box will not suggest anything. It can still enable the user to enter + * multiple entries if allowFreeEntries is * set to true (default). + * Static Source + * You can pass an array of JSON objects, an array of strings or even a single CSV string as the + * data source.For ex. data: [* {id:0,name:"Paris"}, {id: 1, name: "New York"}] + * You can also pass any json object with the results property containing the json array. + * Url + * You can pass the url from which the component will fetch its JSON data.Data will be fetched + * using a POST ajax request that will * include the entered text as 'query' parameter. The results + * fetched from the server can be: + * - an array of JSON objects (ex: [{id:...,name:...},{...}]) + * - a string containing an array of JSON objects ready to be parsed (ex: "[{id:...,name:...},{...}]") + * - a JSON object whose data will be contained in the results property + * (ex: {results: [{id:...,name:...},{...}] + * Function + * You can pass a function which returns an array of JSON objects (ex: [{id:...,name:...},{...}]) + * The function can return the JSON data or it can use the first argument as function to handle the data. + * Only one (callback function or return value) is needed for the function to succeed. + * See the following example: + * function (response) { var myjson = [{name: 'test', id: 1}]; response(myjson); return myjson; } + */ + data?: any; + + /** + * Additional parameters to the ajax call + */ + dataUrlParams?: Object; + + /** + * Start the component in a disabled state. + */ + disabled?: boolean; + + /** + * Name of JSON object property that defines the disabled behaviour + */ + disabledField?: string; + + /** + * Name of JSON object property displayed in the combo list + */ + displayField?: string; + + /** + * Set to false if you only want mouse interaction. In that case the combo will + * automatically expand on focus. + */ + editable?: boolean; + + /** + * Set starting state for combo. + */ + expanded?: boolean; + + /** + * Automatically expands combo on focus. + */ + expandOnFocus?: boolean; + + /** + * JSON property by which the list should be grouped + */ + groupBy?: string; + + /** + * Set to true to hide the trigger on the right + */ + hideTrigger?: boolean; + + /** + * Set to true to highlight search input within displayed suggestions + */ + highlight?: boolean; + + /** + * A custom ID for this component + */ + id?: string; + + /** + * A class that is added to the info message appearing on the top-right part of the component + */ + infoMsgCls?: string; + + /** + * Additional parameters passed out to the INPUT tag. Enables usage of AngularJS's custom tags for ex. + */ + inputCfg?: any; + + /** + * The class that is applied to show that the field is invalid + */ + invalidCls?: string; + + /** + * Set to true to filter data results according to case. Useless if the data is fetched remotely + */ + matchCase?: boolean; + + /** + * Once expanded, the combo's height will take as much room as the # of available results. + * In case there are too many results displayed, this will fix the drop down height. + */ + maxDropHeight?: number; + + /** + * Defines how long the user free entry can be. Set to null for no limit. + */ + maxEntryLength?: number; + + /** + * A function that defines the helper text when the max entry length has been surpassed. + */ + maxEntryRenderer?: (v?: number) => void; + + /** + * The maximum number of results displayed in the combo drop down at once. + */ + maxSuggestions?: number; + + /** + * The maximum number of items the user can select if multiple selection is allowed. + * Set to null to remove the limit. + */ + maxSelection?: number; + + /** + * A function that defines the helper text when the max selection amount has been reached. The function has a single + * parameter which is the number of selected elements. + */ + maxSelectionRenderer?: (v: number) => void; + + /** + * The method used by the ajax request. + */ + method?: string; + + /** + * The minimum number of characters the user must type before the combo expands and offers suggestions. + */ + minChars?: number; + + /** + * A function that defines the helper text when not enough letters are set. The function has a single + * parameter which is the difference between the required amount of letters and the current one. + */ + minCharsRenderer?: (v: number) => void; + + /** + * Whether or not sorting / filtering should be done remotely or locally. + * Use either 'local' or 'remote' + */ + mode?: string; + + /** + * The name used as a form element. + */ + name?: string; + + /** + * The text displayed when there are no suggestions. + */ + noSuggestionText?: string; + + /** + * The default placeholder text when nothing has been entered + */ + placeholder?: string; + + /** + * A function used to define how the items will be presented in the combo + */ + renderer?: (item: any) => void; + + /** + * Whether or not this field should be required + */ + required?: boolean; + + /** + * Set to true to render selection as a delimited string + */ + resultAsString?: boolean; + + /** + * Text delimiter to use in a delimited string. + */ + resultAsStringDelimiter?: string; + + /** + * Name of JSON object property that represents the list of suggested objects + */ + resultsField?: string; + + /** + * A custom CSS class to add to a selected item + */ + selectionCls?: string; + + /** + * An optional element replacement in which the selection is rendered + */ + selectionContainer?: JQuery; + + /** + * Where the selected items will be displayed. Only 'right', 'bottom' and 'inner' are valid values + */ + selectionPosition?: string; + + /** + * A function used to define how the items will be presented in the tag list + */ + selectionRenderer?: (item: any) => void; + + /** + * Set to true to stack the selectioned items when positioned on the bottom + * Requires the selectionPosition to be set to 'bottom' + */ + selectionStacked?: boolean; + + /** + * Direction used for sorting. Only 'asc' and 'desc' are valid values + */ + sortDir?: string; + + /** + * name of JSON object property for local result sorting. + * Leave null if you do not wish the results to be ordered or if they are already ordered remotely. + */ + sortOrder?: string; + + /** + * If set to boolean; suggestions will have to start by user input (and not simply contain it as a substring) + */ + strictSuggest?: boolean; + + /** + * Custom style added to the component container. + */ + style?: string; + + /** + * If set to boolean; the combo will expand / collapse when clicked upon + */ + toggleOnClick?: boolean; + + + /** + * Amount (in ms) between keyboard registers. + */ + typeDelay?: number; + + /** + * If set to boolean; tab won't blur the component but will be registered as the ENTER key + */ + useTabKey?: boolean; + + /** + * If set to boolean; using comma will validate the user's choice + */ + useCommaKey?: boolean; + + + /** + * Determines whether or not the results will be displayed with a zebra table style + */ + useZebraStyle?: boolean; + + /** + * initial value for the field + */ + value?: any; + + /** + * name of JSON object property that represents its underlying value + */ + valueField?: string; + + /** + * regular expression to validate the values against + */ + vregex?: any; + + /** + * type to validate against + */ + vtype?: any; + } + + interface Instance { + /** + * Add one or multiple json items to the current selection + * @param items - json object or array of json objects + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + addToSelection(objs: Array, isSilent?: boolean): void; + + /** + * Clears the current selection + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + clear(isSilent?: boolean): void; + + /** + * Collapse the drop down part of the combo + */ + collapse(): void; + + /** + * Set the component in a disabled state. + */ + disable(): void; + + /** + * Empties out the combo user text + */ + empty(): void; + + /** + * Set the component in a enable state. + */ + enable(): void; + + /** + * Retrieve component enabled status + * @return {boolean} + */ + isDisabled(): boolean; + + /** + * Checks whether the field is valid or not + * @return {boolean} + */ + isValid(): boolean; + + /** + * Gets the data params for current ajax request + */ + getDataUrlParams(): Object; + + /** + * Gets the name given to the form input + */ + getName(): string; + + /** + * Retrieve an array of selected json objects + * @return {Array} + */ + getSelection(): Array; + + /** + * Retrieve the current text entered by the user + */ + getRawValue(): string; + + /** + * Retrieve an array of selected values + */ + getValue(): Array; + + /** + * Remove one or multiples json items from the current selection + * @param items - json object or array of json objects + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + removeFromSelection(items: any, isSilent: boolean): void; + + /** + * Set up some combo data after it has been rendered + * @param data + */ + setData(data: any): void; + + /** + * Get current data + */ + getData(): any; + + /** + * Sets the name for the input field so it can be fetched in the form + * @param name + */ + setName(name: string): void; + + /** + * Sets the current selection with the JSON items provided + * @param items + */ + setSelection(items: Array): void; + + /** + * Sets a value for the combo box. Value must be an array of values with data type matching valueField one. + * @param data + */ + setValue(values: Array): void; + + /** + * Sets data params for subsequent ajax requests + * @param params + */ + setDataUrlParams(params: any): void; + + } +} \ No newline at end of file From 2f6e9b996c5c5005f187d1f0991d7a96b6c84d2b Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Tue, 26 May 2015 21:44:01 -0300 Subject: [PATCH 088/137] Changed definitios url --- magicsuggest/magicsuggest.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magicsuggest/magicsuggest.d.ts b/magicsuggest/magicsuggest.d.ts index 4d031c39f..9cb09e3e8 100644 --- a/magicsuggest/magicsuggest.d.ts +++ b/magicsuggest/magicsuggest.d.ts @@ -1,7 +1,7 @@ // Type definitions for MagicSuggest 2.1.4 // Project: http://nicolasbize.com/magicsuggest // Definitions by: Leonardo Chaia -// Definitions: http://github.com/leonardochaia +// Definitions: http://github.com/leonardochaia/DefinitelyTyped /// interface JQuery { @@ -460,4 +460,4 @@ declare module MagicSuggest { setDataUrlParams(params: any): void; } -} \ No newline at end of file +} From 21de100cfeacc11fe002874d6ed824c81ce1c26f Mon Sep 17 00:00:00 2001 From: Sam Albert Date: Tue, 26 May 2015 22:14:56 -0400 Subject: [PATCH 089/137] Updated callback to support indefinite number of buffer params --- node_zeromq/zmq-tests.ts | 2 +- node_zeromq/zmq.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node_zeromq/zmq-tests.ts b/node_zeromq/zmq-tests.ts index 696a98c13..a62d97a6c 100644 --- a/node_zeromq/zmq-tests.ts +++ b/node_zeromq/zmq-tests.ts @@ -19,7 +19,7 @@ function test3() { var sock = zmq.socket('push'); sock.bindSync('tcp://127.0.0.1:3000'); sock.send(['hello', 'world']); - sock.on('message', function (buffer: Buffer) { + sock.on('message', function (buffer1: Buffer, buffer2: Buffer) { // }); } diff --git a/node_zeromq/zmq.d.ts b/node_zeromq/zmq.d.ts index 8d29e0569..3ab2d1f25 100644 --- a/node_zeromq/zmq.d.ts +++ b/node_zeromq/zmq.d.ts @@ -182,7 +182,7 @@ declare module 'zmq' { * @param eventName {string} * @param callback {Function} */ - on(eventName: string, callback: (buffer: Buffer) => void): void; + on(eventName: string, callback: (...buffer: Buffer[]) => void): void; // Socket Options _fd: any; From 7094689c1f419280d40305c6fa9a8474c36ecdba Mon Sep 17 00:00:00 2001 From: Seulgi Kim Date: Wed, 27 May 2015 20:29:52 +0900 Subject: [PATCH 090/137] gulp-istanbul 0.9.0 adds enforceThresholds function. --- gulp-istanbul/gulp-istanbul-0.8.1.d.ts | 51 ++++++++++++++++++++++++++ gulp-istanbul/gulp-istanbul-tests.ts | 13 +++++++ gulp-istanbul/gulp-istanbul.d.ts | 17 ++++++++- 3 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 gulp-istanbul/gulp-istanbul-0.8.1.d.ts diff --git a/gulp-istanbul/gulp-istanbul-0.8.1.d.ts b/gulp-istanbul/gulp-istanbul-0.8.1.d.ts new file mode 100644 index 000000000..3a10dfdba --- /dev/null +++ b/gulp-istanbul/gulp-istanbul-0.8.1.d.ts @@ -0,0 +1,51 @@ +// Type definitions for gulp-istanbul v0.8.1 +// Project: https://github.com/SBoudrias/gulp-istanbul +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-istanbul" { + function GulpIstanbul(opts?: GulpIstanbul.Options): NodeJS.ReadWriteStream; + + module GulpIstanbul { + export function hookRequire(): NodeJS.ReadWriteStream; + export function summarizeCoverage(opts?: {coverageVariable?: string}): Coverage; + export function writeReports(opts?: ReportOptions): NodeJS.ReadWriteStream; + + interface Options { + coverageVariable?: string; + includeUntested?: boolean; + embedSource?: boolean; + preserveComments?: boolean; + noCompact?: boolean; + noAutoWrap?: boolean; + codeGenerationOptions?: Object; + debug?: boolean; + walkDebug?: boolean; + } + + interface Coverage { + lines: CoverageStats; + statements: CoverageStats; + functions: CoverageStats; + branches: CoverageStats; + } + + interface CoverageStats { + total: number; + covered: number; + skipped: number; + pct: number; + } + + interface ReportOptions { + dir?: string; + reporters?: string[]; + reportOpts?: {dir?: string}; + coverageVariable?: string; + } + } + + export = GulpIstanbul; +} diff --git a/gulp-istanbul/gulp-istanbul-tests.ts b/gulp-istanbul/gulp-istanbul-tests.ts index 7f2327d07..0d64b53d0 100644 --- a/gulp-istanbul/gulp-istanbul-tests.ts +++ b/gulp-istanbul/gulp-istanbul-tests.ts @@ -29,4 +29,17 @@ gulp.task('test', function (cb) { .pipe(istanbul.writeReports({reporters: ['text']})) // Creating the reports after tests runned .on('end', cb); }); +}); + +gulp.task('test', function (cb) { + gulp.src(['lib/**/*.js', 'main.js']) + .pipe(istanbul({includeUntested: true})) // Covering files + .pipe(istanbul.hookRequire()) + .on('finish', function () { + gulp.src(['test/*.html']) + .pipe(testFramework()) + .pipe(istanbul.writeReports({reporters: ['text']})) // Creating the reports after tests runned + .pipe(istanbul.enforceThresholds({ thresholds: { global: 90 } })) // + .on('end', cb); + }); }); \ No newline at end of file diff --git a/gulp-istanbul/gulp-istanbul.d.ts b/gulp-istanbul/gulp-istanbul.d.ts index bf7a13bb0..d917d64b1 100644 --- a/gulp-istanbul/gulp-istanbul.d.ts +++ b/gulp-istanbul/gulp-istanbul.d.ts @@ -1,4 +1,4 @@ -// Type definitions for gulp-istanbul +// Type definitions for gulp-istanbul v0.9.0 // Project: https://github.com/SBoudrias/gulp-istanbul // Definitions by: Asana // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -12,6 +12,7 @@ declare module "gulp-istanbul" { export function hookRequire(): NodeJS.ReadWriteStream; export function summarizeCoverage(opts?: {coverageVariable?: string}): Coverage; export function writeReports(opts?: ReportOptions): NodeJS.ReadWriteStream; + export function enforceThresholds(opts?: ThresholdOptions): NodeJS.ReadWriteStream; interface Options { coverageVariable?: string; @@ -45,7 +46,19 @@ declare module "gulp-istanbul" { reportOpts?: {dir?: string}; coverageVariable?: string; } + + interface ThresholdOptions { + coverageVariable?: string; + thresholds?: { global?: Coverage|number; each?: Coverage|number }; + } + + interface CoverageOptions { + lines?: number; + statements?: number; + functions?: number; + branches?: number; + } } export = GulpIstanbul; -} \ No newline at end of file +} From a5efba8589f59949da9d7f0367cd4bfc53a8269c Mon Sep 17 00:00:00 2001 From: Seulgi Kim Date: Wed, 27 May 2015 20:55:26 +0900 Subject: [PATCH 091/137] Fix username --- mpromise/mpromise.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpromise/mpromise.d.ts b/mpromise/mpromise.d.ts index ba6961362..2a99964c2 100644 --- a/mpromise/mpromise.d.ts +++ b/mpromise/mpromise.d.ts @@ -1,6 +1,6 @@ // Type definitions for mpromise 0.5.4 // Project: https://github.com/aheckmann/mpromise -// Definitions by: Seulgi Kim +// Definitions by: Seulgi Kim // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module "mpromise" { From f2603afffaabe8c70b95d77961745c29036fe858 Mon Sep 17 00:00:00 2001 From: Kevin Wilson Date: Wed, 27 May 2015 15:00:54 +0100 Subject: [PATCH 092/137] Added static method and wrapped in module. Updated to include static Routie methods. Wrapped types up into a module definition. --- routie/routie.d.ts | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/routie/routie.d.ts b/routie/routie.d.ts index 9317904d4..d6e4cd281 100644 --- a/routie/routie.d.ts +++ b/routie/routie.d.ts @@ -3,15 +3,33 @@ // Definitions by: Adilson // Definitions: https://github.com/borisyankov/DefinitelyTyped -interface Route { - constructor(path: string, name: string): Route; - addHandler(fn: Function): void; - removeHandler(fn: Function): void; - run(params: any): void; - match(path: string, params: any): boolean; - toURL(params: any): string; +declare module routie { + interface Route { + constructor(path: string, name: string): Route; + addHandler(fn: Function): void; + removeHandler(fn: Function): void; + run(params: any): void; + match(path: string, params: any): boolean; + toURL(params: any): string; + } + + interface Routie extends RoutieStatic { + (path: string): void; + (path: string, fn: Function): void; + (routes: { [key: string]: Function }): void; + } + + interface RoutieStatic { + lookup(name: string, fn: Function): string; + remove(path: string, fn: Function): void; + removeAll(): void; + navigate(path: string, options: RouteOptions): void; + noConflict(): Routie; + } + + interface RouteOptions { + silent?: boolean; + } } -declare function routie(path: string): void; -declare function routie(path: string, fn: Function): void; -declare function routie(routes: { [key: string]: Function }): void; \ No newline at end of file +declare var routie: routie.Routie; From 34ef6f1dd3ce8c4ead9c1234ca96f2e582f08160 Mon Sep 17 00:00:00 2001 From: Kevin Wilson Date: Wed, 27 May 2015 15:02:08 +0100 Subject: [PATCH 093/137] Added to change log. --- routie/routie.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/routie/routie.d.ts b/routie/routie.d.ts index d6e4cd281..cd3bb09dc 100644 --- a/routie/routie.d.ts +++ b/routie/routie.d.ts @@ -1,6 +1,7 @@ // Type definitions for routie 0.3.2 // Project: https://github.com/jgallen23/routie // Definitions by: Adilson +// Definitions by: kwilson // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module routie { From e2e6bdb50df936afdcfd91e2e1bdcdb28f392a11 Mon Sep 17 00:00:00 2001 From: Kevin Wilson Date: Wed, 27 May 2015 15:13:48 +0100 Subject: [PATCH 094/137] Added tests for static functions. --- routie/routie-tests.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/routie/routie-tests.ts b/routie/routie-tests.ts index 323142c7e..12ee397c4 100644 --- a/routie/routie-tests.ts +++ b/routie/routie-tests.ts @@ -54,4 +54,24 @@ routie("users/12312312"); routie("*", function () { }); -routie("anything"); \ No newline at end of file +routie("anything"); + +// STATIC + +// Lookup +var existing = routie.lookup("users/bob", () => { +}); + +// Remove +routie.remove("users/bob", () => { +}); + +// RemoveAll +routie.removeAll(); + +// Navigate +routie.navigate("users/bob"); +routie.navigate("users/bob", { silent: true }); + +// NoConflict +var myRoutie = routie.noConflict(); From 45d69d19cbc7beae195cfeb5d4d6c085b9073545 Mon Sep 17 00:00:00 2001 From: Kevin Wilson Date: Wed, 27 May 2015 15:14:21 +0100 Subject: [PATCH 095/137] Fixed missing optional flag for navigate options. --- routie/routie.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routie/routie.d.ts b/routie/routie.d.ts index cd3bb09dc..8f32c3d78 100644 --- a/routie/routie.d.ts +++ b/routie/routie.d.ts @@ -24,7 +24,7 @@ declare module routie { lookup(name: string, fn: Function): string; remove(path: string, fn: Function): void; removeAll(): void; - navigate(path: string, options: RouteOptions): void; + navigate(path: string, options?: RouteOptions): void; noConflict(): Routie; } From fa7330d6fe18c795891fc8465445662ba5cd9675 Mon Sep 17 00:00:00 2001 From: Kevin Wilson Date: Wed, 27 May 2015 15:16:53 +0100 Subject: [PATCH 096/137] Fixed heading error. --- routie/routie.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/routie/routie.d.ts b/routie/routie.d.ts index 8f32c3d78..79ab2dc8a 100644 --- a/routie/routie.d.ts +++ b/routie/routie.d.ts @@ -1,7 +1,6 @@ // Type definitions for routie 0.3.2 // Project: https://github.com/jgallen23/routie // Definitions by: Adilson -// Definitions by: kwilson // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module routie { From 79bdd9caf3545c421646c522a49e0c306ddcf00a Mon Sep 17 00:00:00 2001 From: Chris Wrench Date: Wed, 27 May 2015 15:20:33 +0100 Subject: [PATCH 097/137] Add Stripe Checkout definitions Fixes #4366. --- stripe-checkout/stripe-checkout-tests.ts | 38 ++++++++++++++++++++++++ stripe-checkout/stripe-checkout.d.ts | 35 ++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 stripe-checkout/stripe-checkout-tests.ts create mode 100644 stripe-checkout/stripe-checkout.d.ts diff --git a/stripe-checkout/stripe-checkout-tests.ts b/stripe-checkout/stripe-checkout-tests.ts new file mode 100644 index 000000000..c054b2365 --- /dev/null +++ b/stripe-checkout/stripe-checkout-tests.ts @@ -0,0 +1,38 @@ +/// + +// Test the minimum amount of configuration required. +var handler = StripeCheckout.configure({ + key: "my-secret-key", + token: function(token: StripeTokenResponse) { + console.log(token.id); + } +}); + +handler.open(); + +handler.close(); + +// Test all configuration options. +var options = { + key: "my-secret-key", + token: function(token: StripeTokenResponse) { + console.log(token.id); + }, + image: "http://placehold.it/128x128", + name: "Definitely Typed", + description: "A DefinitelyTyped test for Stripe Checkout", + amount: Number.MAX_VALUE, + currency: "USD", + panelLabel: "Pay Definitely Typed {{amount}}", + label: "Pay Definitely Typed", + zipCode: false, + email: "test@example.com", + allowRememberMe: false, + bitcoin: false, + opened: function() {}, + closed: function() {} +} + +handler = StripeCheckout.configure(options); + +handler.open(options); \ No newline at end of file diff --git a/stripe-checkout/stripe-checkout.d.ts b/stripe-checkout/stripe-checkout.d.ts new file mode 100644 index 000000000..f648a1bb3 --- /dev/null +++ b/stripe-checkout/stripe-checkout.d.ts @@ -0,0 +1,35 @@ +// Type definitions for Stripe Checkout +// Project: https://stripe.com/checkout +// Definitions by: Chris Wrench +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface StripeCheckoutStatic { + configure(options: StripeCheckoutOptions): StripeCheckoutHandler; +} + +interface StripeCheckoutHandler { + open(options?: StripeCheckoutOptions): void; + close(): void; +} + +interface StripeCheckoutOptions { + key: string; + token: (token: StripeTokenResponse) => void; + image?: string; + name?: string; + description?: string; + amount?: number; + currency?: string; + panelLabel?: string; + zipCode?: boolean; + email?: string; + label?: string; + allowRememberMe?: boolean; + bitcoin?: boolean; + opened?: () => void; + closed?: () => void; +} + +declare var StripeCheckout: StripeCheckoutStatic; \ No newline at end of file From 8f7a306a4875d0fb1124e67a84c7ab3eea3f8d09 Mon Sep 17 00:00:00 2001 From: Reto Rezzonico Date: Wed, 27 May 2015 16:28:51 +0200 Subject: [PATCH 098/137] Add definitions for angular-jwt --- angular-jwt/angular-jwt-tests.ts | 17 +++++++++++++++++ angular-jwt/angular-jwt.d.ts | 30 ++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 angular-jwt/angular-jwt-tests.ts create mode 100644 angular-jwt/angular-jwt.d.ts diff --git a/angular-jwt/angular-jwt-tests.ts b/angular-jwt/angular-jwt-tests.ts new file mode 100644 index 000000000..2e7ccbc08 --- /dev/null +++ b/angular-jwt/angular-jwt-tests.ts @@ -0,0 +1,17 @@ +/// +/// + +var app = angular.module("angular-jwt-tests", ["angular-jwt"]); + +var $jwtHelper: angular.jwt.IJwtHelper; + +var expToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3NhbXBsZXMuYXV0aDAuY29tLyIsInN1YiI6ImZhY2Vib29rfDEwMTU0Mjg3MDI3NTEwMzAyIiwiYXVkIjoiQlVJSlNXOXg2MHNJSEJ3OEtkOUVtQ2JqOGVESUZ4REMiLCJleHAiOjE0MTIyMzQ3MzAsImlhdCI6MTQxMjE5ODczMH0.7M5sAV50fF1-_h9qVbdSgqAnXVF7mz3I6RjS6JiH0H8'; +var tokenPayload = $jwtHelper.decodeToken(expToken); +var date = $jwtHelper.getTokenExpirationDate(expToken); +var bool = $jwtHelper.isTokenExpired(expToken); + +var $jwtInterceptor: angular.jwt.IJwtInterceptor; + +$jwtInterceptor.tokenGetter = () => { + return expToken; +} \ No newline at end of file diff --git a/angular-jwt/angular-jwt.d.ts b/angular-jwt/angular-jwt.d.ts new file mode 100644 index 000000000..ec0e03e16 --- /dev/null +++ b/angular-jwt/angular-jwt.d.ts @@ -0,0 +1,30 @@ +// Type definitions for angular-jwt 0.0.8 +// Project: https://github.com/auth0/angular-jwt +// Definitions by: Reto Rezzonico +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.jwt { + + interface JwtToken { + iss: string; + sub: string; + aud: string; + exp: number; + nbf: number; + iat: number; + jti: string; + unique_name: string; + } + + interface IJwtHelper { + decodeToken(token: string): JwtToken; + getTokenExpirationDate(token: any): Date; + isTokenExpired(token: any, offsetSeconds?: number): boolean; + } + + interface IJwtInterceptor { + tokenGetter(): string; + } +} \ No newline at end of file From 989b586b954819ef65a894634ffb0fa0ca0bb84d Mon Sep 17 00:00:00 2001 From: Reto Rezzonico Date: Wed, 27 May 2015 16:32:52 +0200 Subject: [PATCH 099/137] Linebreaks --- angular-jwt/angular-jwt-tests.ts | 2 +- angular-jwt/angular-jwt.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-jwt/angular-jwt-tests.ts b/angular-jwt/angular-jwt-tests.ts index 2e7ccbc08..7f66f2611 100644 --- a/angular-jwt/angular-jwt-tests.ts +++ b/angular-jwt/angular-jwt-tests.ts @@ -14,4 +14,4 @@ var $jwtInterceptor: angular.jwt.IJwtInterceptor; $jwtInterceptor.tokenGetter = () => { return expToken; -} \ No newline at end of file +} diff --git a/angular-jwt/angular-jwt.d.ts b/angular-jwt/angular-jwt.d.ts index ec0e03e16..55bb3e4f6 100644 --- a/angular-jwt/angular-jwt.d.ts +++ b/angular-jwt/angular-jwt.d.ts @@ -27,4 +27,4 @@ declare module angular.jwt { interface IJwtInterceptor { tokenGetter(): string; } -} \ No newline at end of file +} From 4c024ccc5b6d4258dfec002bc41b8c68de648c01 Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Wed, 27 May 2015 17:57:12 -0300 Subject: [PATCH 100/137] Added tests file. Bugfixes on definitions --- magicsuggest/magicsuggest-tests.ts | 24 ++++++++++++++++++++++++ magicsuggest/magicsuggest.d.ts | 7 +++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 magicsuggest/magicsuggest-tests.ts diff --git a/magicsuggest/magicsuggest-tests.ts b/magicsuggest/magicsuggest-tests.ts new file mode 100644 index 000000000..993f6cde3 --- /dev/null +++ b/magicsuggest/magicsuggest-tests.ts @@ -0,0 +1,24 @@ + +function basicTest() { + $('#magicSuggest').magicSuggest(); +} + +function testWithConfigurationOptions() { + $('#magicSuggest').magicSuggest({ + data: [ + { id: 1, name: "Buenos Aires" }, + { id: 2, name: "New York" }, + { id: 3, name: "Madrid" }, + ], + maxDropHeight: 500, + maxSelection: 2, + expandOnFocus: true, + }); +} + +function testSomeMethods() { + var ms = $('#magicSuggest').magicSuggest(); + ms.addToSelection([{ id: 1, name: "Mexico" }]); + console.info(ms.getSelection()); + ms.disable() +} \ No newline at end of file diff --git a/magicsuggest/magicsuggest.d.ts b/magicsuggest/magicsuggest.d.ts index 9cb09e3e8..f1ac71a2e 100644 --- a/magicsuggest/magicsuggest.d.ts +++ b/magicsuggest/magicsuggest.d.ts @@ -5,7 +5,10 @@ /// interface JQuery { - magicSuggest: (configurationObject: MagicSuggest.Configuration) => MagicSuggest.Instance; + /** + * Initialize MagicSuggest on this selector + */ + magicSuggest(configurationObject?: MagicSuggest.Configuration): MagicSuggest.Instance; } declare module MagicSuggest { @@ -460,4 +463,4 @@ declare module MagicSuggest { setDataUrlParams(params: any): void; } -} +} \ No newline at end of file From 220ded7238f0cd09b1f456ffb562aa61190335be Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Wed, 27 May 2015 18:02:55 -0300 Subject: [PATCH 101/137] Forgot to add the reference to typings on test file --- magicsuggest/magicsuggest-tests.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/magicsuggest/magicsuggest-tests.ts b/magicsuggest/magicsuggest-tests.ts index 993f6cde3..b41cf9f71 100644 --- a/magicsuggest/magicsuggest-tests.ts +++ b/magicsuggest/magicsuggest-tests.ts @@ -1,4 +1,6 @@ - +/// +/// + function basicTest() { $('#magicSuggest').magicSuggest(); } From dc9c8d2d5f4822cec81f7c4184f6103e3c340eee Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Tue, 26 May 2015 21:42:24 -0300 Subject: [PATCH 102/137] Initial Commit --- magicsuggest/magicsuggest.d.ts | 463 +++++++++++++++++++++++++++++++++ 1 file changed, 463 insertions(+) create mode 100644 magicsuggest/magicsuggest.d.ts diff --git a/magicsuggest/magicsuggest.d.ts b/magicsuggest/magicsuggest.d.ts new file mode 100644 index 000000000..4d031c39f --- /dev/null +++ b/magicsuggest/magicsuggest.d.ts @@ -0,0 +1,463 @@ +// Type definitions for MagicSuggest 2.1.4 +// Project: http://nicolasbize.com/magicsuggest +// Definitions by: Leonardo Chaia +// Definitions: http://github.com/leonardochaia + +/// +interface JQuery { + magicSuggest: (configurationObject: MagicSuggest.Configuration) => MagicSuggest.Instance; +} + +declare module MagicSuggest { + interface Configuration { + /********** CONFIGURATION PROPERTIES ************/ + /** + * Restricts or allows the user to validate typed entries. + * Defaults to true. + */ + allowFreeEntries?: boolean; + + /** + * Restricts or allows the user to add the same entry more than once + * Defaults to false. + */ + allowDuplicates?: boolean; + + /** + * Additional config object passed to each $.ajax call + */ + ajaxConfig?: JQueryAjaxSettings; + + /** + * If a single suggestion comes out, it is preselected. + */ + autoSelect?: boolean; + + /** + * Auto select the first matching item with multiple items shown + */ + selectFirst?: boolean; + + /** + * Allow customization of query parameter + */ + queryParam?: string; + + /** + * A function triggered just before the ajax request is sent, similar to jQuery + */ + beforeSend?: () => void; + + /** + * A custom CSS class to apply to the field's underlying element. + */ + cls?: string; + + /** + * JSON Data source used to populate the combo box. 3 options are available here: + * No Data Source (default) + * When left null, the combo box will not suggest anything. It can still enable the user to enter + * multiple entries if allowFreeEntries is * set to true (default). + * Static Source + * You can pass an array of JSON objects, an array of strings or even a single CSV string as the + * data source.For ex. data: [* {id:0,name:"Paris"}, {id: 1, name: "New York"}] + * You can also pass any json object with the results property containing the json array. + * Url + * You can pass the url from which the component will fetch its JSON data.Data will be fetched + * using a POST ajax request that will * include the entered text as 'query' parameter. The results + * fetched from the server can be: + * - an array of JSON objects (ex: [{id:...,name:...},{...}]) + * - a string containing an array of JSON objects ready to be parsed (ex: "[{id:...,name:...},{...}]") + * - a JSON object whose data will be contained in the results property + * (ex: {results: [{id:...,name:...},{...}] + * Function + * You can pass a function which returns an array of JSON objects (ex: [{id:...,name:...},{...}]) + * The function can return the JSON data or it can use the first argument as function to handle the data. + * Only one (callback function or return value) is needed for the function to succeed. + * See the following example: + * function (response) { var myjson = [{name: 'test', id: 1}]; response(myjson); return myjson; } + */ + data?: any; + + /** + * Additional parameters to the ajax call + */ + dataUrlParams?: Object; + + /** + * Start the component in a disabled state. + */ + disabled?: boolean; + + /** + * Name of JSON object property that defines the disabled behaviour + */ + disabledField?: string; + + /** + * Name of JSON object property displayed in the combo list + */ + displayField?: string; + + /** + * Set to false if you only want mouse interaction. In that case the combo will + * automatically expand on focus. + */ + editable?: boolean; + + /** + * Set starting state for combo. + */ + expanded?: boolean; + + /** + * Automatically expands combo on focus. + */ + expandOnFocus?: boolean; + + /** + * JSON property by which the list should be grouped + */ + groupBy?: string; + + /** + * Set to true to hide the trigger on the right + */ + hideTrigger?: boolean; + + /** + * Set to true to highlight search input within displayed suggestions + */ + highlight?: boolean; + + /** + * A custom ID for this component + */ + id?: string; + + /** + * A class that is added to the info message appearing on the top-right part of the component + */ + infoMsgCls?: string; + + /** + * Additional parameters passed out to the INPUT tag. Enables usage of AngularJS's custom tags for ex. + */ + inputCfg?: any; + + /** + * The class that is applied to show that the field is invalid + */ + invalidCls?: string; + + /** + * Set to true to filter data results according to case. Useless if the data is fetched remotely + */ + matchCase?: boolean; + + /** + * Once expanded, the combo's height will take as much room as the # of available results. + * In case there are too many results displayed, this will fix the drop down height. + */ + maxDropHeight?: number; + + /** + * Defines how long the user free entry can be. Set to null for no limit. + */ + maxEntryLength?: number; + + /** + * A function that defines the helper text when the max entry length has been surpassed. + */ + maxEntryRenderer?: (v?: number) => void; + + /** + * The maximum number of results displayed in the combo drop down at once. + */ + maxSuggestions?: number; + + /** + * The maximum number of items the user can select if multiple selection is allowed. + * Set to null to remove the limit. + */ + maxSelection?: number; + + /** + * A function that defines the helper text when the max selection amount has been reached. The function has a single + * parameter which is the number of selected elements. + */ + maxSelectionRenderer?: (v: number) => void; + + /** + * The method used by the ajax request. + */ + method?: string; + + /** + * The minimum number of characters the user must type before the combo expands and offers suggestions. + */ + minChars?: number; + + /** + * A function that defines the helper text when not enough letters are set. The function has a single + * parameter which is the difference between the required amount of letters and the current one. + */ + minCharsRenderer?: (v: number) => void; + + /** + * Whether or not sorting / filtering should be done remotely or locally. + * Use either 'local' or 'remote' + */ + mode?: string; + + /** + * The name used as a form element. + */ + name?: string; + + /** + * The text displayed when there are no suggestions. + */ + noSuggestionText?: string; + + /** + * The default placeholder text when nothing has been entered + */ + placeholder?: string; + + /** + * A function used to define how the items will be presented in the combo + */ + renderer?: (item: any) => void; + + /** + * Whether or not this field should be required + */ + required?: boolean; + + /** + * Set to true to render selection as a delimited string + */ + resultAsString?: boolean; + + /** + * Text delimiter to use in a delimited string. + */ + resultAsStringDelimiter?: string; + + /** + * Name of JSON object property that represents the list of suggested objects + */ + resultsField?: string; + + /** + * A custom CSS class to add to a selected item + */ + selectionCls?: string; + + /** + * An optional element replacement in which the selection is rendered + */ + selectionContainer?: JQuery; + + /** + * Where the selected items will be displayed. Only 'right', 'bottom' and 'inner' are valid values + */ + selectionPosition?: string; + + /** + * A function used to define how the items will be presented in the tag list + */ + selectionRenderer?: (item: any) => void; + + /** + * Set to true to stack the selectioned items when positioned on the bottom + * Requires the selectionPosition to be set to 'bottom' + */ + selectionStacked?: boolean; + + /** + * Direction used for sorting. Only 'asc' and 'desc' are valid values + */ + sortDir?: string; + + /** + * name of JSON object property for local result sorting. + * Leave null if you do not wish the results to be ordered or if they are already ordered remotely. + */ + sortOrder?: string; + + /** + * If set to boolean; suggestions will have to start by user input (and not simply contain it as a substring) + */ + strictSuggest?: boolean; + + /** + * Custom style added to the component container. + */ + style?: string; + + /** + * If set to boolean; the combo will expand / collapse when clicked upon + */ + toggleOnClick?: boolean; + + + /** + * Amount (in ms) between keyboard registers. + */ + typeDelay?: number; + + /** + * If set to boolean; tab won't blur the component but will be registered as the ENTER key + */ + useTabKey?: boolean; + + /** + * If set to boolean; using comma will validate the user's choice + */ + useCommaKey?: boolean; + + + /** + * Determines whether or not the results will be displayed with a zebra table style + */ + useZebraStyle?: boolean; + + /** + * initial value for the field + */ + value?: any; + + /** + * name of JSON object property that represents its underlying value + */ + valueField?: string; + + /** + * regular expression to validate the values against + */ + vregex?: any; + + /** + * type to validate against + */ + vtype?: any; + } + + interface Instance { + /** + * Add one or multiple json items to the current selection + * @param items - json object or array of json objects + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + addToSelection(objs: Array, isSilent?: boolean): void; + + /** + * Clears the current selection + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + clear(isSilent?: boolean): void; + + /** + * Collapse the drop down part of the combo + */ + collapse(): void; + + /** + * Set the component in a disabled state. + */ + disable(): void; + + /** + * Empties out the combo user text + */ + empty(): void; + + /** + * Set the component in a enable state. + */ + enable(): void; + + /** + * Retrieve component enabled status + * @return {boolean} + */ + isDisabled(): boolean; + + /** + * Checks whether the field is valid or not + * @return {boolean} + */ + isValid(): boolean; + + /** + * Gets the data params for current ajax request + */ + getDataUrlParams(): Object; + + /** + * Gets the name given to the form input + */ + getName(): string; + + /** + * Retrieve an array of selected json objects + * @return {Array} + */ + getSelection(): Array; + + /** + * Retrieve the current text entered by the user + */ + getRawValue(): string; + + /** + * Retrieve an array of selected values + */ + getValue(): Array; + + /** + * Remove one or multiples json items from the current selection + * @param items - json object or array of json objects + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + removeFromSelection(items: any, isSilent: boolean): void; + + /** + * Set up some combo data after it has been rendered + * @param data + */ + setData(data: any): void; + + /** + * Get current data + */ + getData(): any; + + /** + * Sets the name for the input field so it can be fetched in the form + * @param name + */ + setName(name: string): void; + + /** + * Sets the current selection with the JSON items provided + * @param items + */ + setSelection(items: Array): void; + + /** + * Sets a value for the combo box. Value must be an array of values with data type matching valueField one. + * @param data + */ + setValue(values: Array): void; + + /** + * Sets data params for subsequent ajax requests + * @param params + */ + setDataUrlParams(params: any): void; + + } +} \ No newline at end of file From 68dd8244f14677b3bf8f17dbb50090721c65175d Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Tue, 26 May 2015 21:44:01 -0300 Subject: [PATCH 103/137] Changed definitios url --- magicsuggest/magicsuggest.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magicsuggest/magicsuggest.d.ts b/magicsuggest/magicsuggest.d.ts index 4d031c39f..9cb09e3e8 100644 --- a/magicsuggest/magicsuggest.d.ts +++ b/magicsuggest/magicsuggest.d.ts @@ -1,7 +1,7 @@ // Type definitions for MagicSuggest 2.1.4 // Project: http://nicolasbize.com/magicsuggest // Definitions by: Leonardo Chaia -// Definitions: http://github.com/leonardochaia +// Definitions: http://github.com/leonardochaia/DefinitelyTyped /// interface JQuery { @@ -460,4 +460,4 @@ declare module MagicSuggest { setDataUrlParams(params: any): void; } -} \ No newline at end of file +} From 69750463b614f599f4f95496daed88ce8a489610 Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Wed, 27 May 2015 17:57:12 -0300 Subject: [PATCH 104/137] Added tests file. Bugfixes on definitions --- magicsuggest/magicsuggest-tests.ts | 24 ++++++++++++++++++++++++ magicsuggest/magicsuggest.d.ts | 7 +++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 magicsuggest/magicsuggest-tests.ts diff --git a/magicsuggest/magicsuggest-tests.ts b/magicsuggest/magicsuggest-tests.ts new file mode 100644 index 000000000..993f6cde3 --- /dev/null +++ b/magicsuggest/magicsuggest-tests.ts @@ -0,0 +1,24 @@ + +function basicTest() { + $('#magicSuggest').magicSuggest(); +} + +function testWithConfigurationOptions() { + $('#magicSuggest').magicSuggest({ + data: [ + { id: 1, name: "Buenos Aires" }, + { id: 2, name: "New York" }, + { id: 3, name: "Madrid" }, + ], + maxDropHeight: 500, + maxSelection: 2, + expandOnFocus: true, + }); +} + +function testSomeMethods() { + var ms = $('#magicSuggest').magicSuggest(); + ms.addToSelection([{ id: 1, name: "Mexico" }]); + console.info(ms.getSelection()); + ms.disable() +} \ No newline at end of file diff --git a/magicsuggest/magicsuggest.d.ts b/magicsuggest/magicsuggest.d.ts index 9cb09e3e8..f1ac71a2e 100644 --- a/magicsuggest/magicsuggest.d.ts +++ b/magicsuggest/magicsuggest.d.ts @@ -5,7 +5,10 @@ /// interface JQuery { - magicSuggest: (configurationObject: MagicSuggest.Configuration) => MagicSuggest.Instance; + /** + * Initialize MagicSuggest on this selector + */ + magicSuggest(configurationObject?: MagicSuggest.Configuration): MagicSuggest.Instance; } declare module MagicSuggest { @@ -460,4 +463,4 @@ declare module MagicSuggest { setDataUrlParams(params: any): void; } -} +} \ No newline at end of file From 99d72aacf41a3b2bc6c48a3da50940989a3c5563 Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Wed, 27 May 2015 18:02:55 -0300 Subject: [PATCH 105/137] Forgot to add the reference to typings on test file --- magicsuggest/magicsuggest-tests.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/magicsuggest/magicsuggest-tests.ts b/magicsuggest/magicsuggest-tests.ts index 993f6cde3..b41cf9f71 100644 --- a/magicsuggest/magicsuggest-tests.ts +++ b/magicsuggest/magicsuggest-tests.ts @@ -1,4 +1,6 @@ - +/// +/// + function basicTest() { $('#magicSuggest').magicSuggest(); } From 0f894228dfd3ad45b843dbf2fd445e4da04e8e55 Mon Sep 17 00:00:00 2001 From: Dmitry Radkovskiy Date: Thu, 28 May 2015 00:43:38 +0300 Subject: [PATCH 106/137] Moved declarations to moment-node.d.ts --- moment/moment-node.d.ts | 482 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 482 insertions(+) create mode 100644 moment/moment-node.d.ts diff --git a/moment/moment-node.d.ts b/moment/moment-node.d.ts new file mode 100644 index 000000000..13f1b9362 --- /dev/null +++ b/moment/moment-node.d.ts @@ -0,0 +1,482 @@ +// Type definitions for Moment.js 2.8.0 +// Project: https://github.com/timrwood/moment +// Definitions by: Michael Lakerveld , Aaron King , Hiroki Horiuchi , Dick van den Brink , Adi Dahiya +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module moment { + + interface MomentInput { + + years?: number; + y?: number; + + months?: number; + M?: number; + + weeks?: number; + w?: number; + + days?: number; + d?: number; + + hours?: number; + h?: number; + + minutes?: number; + m?: number; + + seconds?: number; + s?: number; + + milliseconds?: number; + ms?: number; + + } + + interface Duration { + + humanize(withSuffix?: boolean): string; + + as(units: string): number; + + milliseconds(): number; + asMilliseconds(): number; + + seconds(): number; + asSeconds(): number; + + minutes(): number; + asMinutes(): number; + + hours(): number; + asHours(): number; + + days(): number; + asDays(): number; + + months(): number; + asMonths(): number; + + years(): number; + asYears(): number; + + add(n: number, p: string): Duration; + add(n: number): Duration; + add(d: Duration): Duration; + + subtract(n: number, p: string): Duration; + subtract(n: number): Duration; + subtract(d: Duration): Duration; + + toISOString(): string; + + } + + interface Moment { + + format(format: string): string; + format(): string; + + fromNow(withoutSuffix?: boolean): string; + + startOf(unitOfTime: string): Moment; + endOf(unitOfTime: string): Moment; + + /** + * Mutates the original moment by adding time. (deprecated in 2.8.0) + * + * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc) + * @param amount the amount you want to add + */ + add(unitOfTime: string, amount: number): Moment; + /** + * Mutates the original moment by adding time. + * + * @param amount the amount you want to add + * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc) + */ + add(amount: number, unitOfTime: string): Moment; + /** + * Mutates the original moment by adding time. Note that the order of arguments can be flipped. + * + * @param amount the amount you want to add + * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc) + */ + add(amount: string, unitOfTime: string): Moment; + /** + * Mutates the original moment by adding time. + * + * @param objectLiteral an object literal that describes multiple time units {days:7,months:1} + */ + add(objectLiteral: MomentInput): Moment; + /** + * Mutates the original moment by adding time. + * + * @param duration a length of time + */ + add(duration: Duration): Moment; + + /** + * Mutates the original moment by subtracting time. (deprecated in 2.8.0) + * + * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc) + * @param amount the amount you want to subtract + */ + subtract(unitOfTime: string, amount: number): Moment; + /** + * Mutates the original moment by subtracting time. + * + * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc) + * @param amount the amount you want to subtract + */ + subtract(amount: number, unitOfTime: string): Moment; + /** + * Mutates the original moment by subtracting time. Note that the order of arguments can be flipped. + * + * @param amount the amount you want to add + * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc) + */ + subtract(amount: string, unitOfTime: string): Moment; + /** + * Mutates the original moment by subtracting time. + * + * @param objectLiteral an object literal that describes multiple time units {days:7,months:1} + */ + subtract(objectLiteral: MomentInput): Moment; + /** + * Mutates the original moment by subtracting time. + * + * @param duration a length of time + */ + subtract(duration: Duration): Moment; + + calendar(): string; + calendar(start: Moment): string; + + clone(): Moment; + + /** + * @return Unix timestamp, or milliseconds since the epoch. + */ + valueOf(): number; + + local(): Moment; // current date/time in local mode + + utc(): Moment; // current date/time in UTC mode + + isValid(): boolean; + + year(y: number): Moment; + year(): number; + quarter(): number; + quarter(q: number): Moment; + month(M: number): Moment; + month(M: string): Moment; + month(): number; + day(d: number): Moment; + day(d: string): Moment; + day(): number; + date(d: number): Moment; + date(): number; + hour(h: number): Moment; + hour(): number; + hours(h: number): Moment; + hours(): number; + minute(m: number): Moment; + minute(): number; + minutes(m: number): Moment; + minutes(): number; + second(s: number): Moment; + second(): number; + seconds(s: number): Moment; + seconds(): number; + millisecond(ms: number): Moment; + millisecond(): number; + milliseconds(ms: number): Moment; + milliseconds(): number; + weekday(): number; + weekday(d: number): Moment; + isoWeekday(): number; + isoWeekday(d: number): Moment; + weekYear(): number; + weekYear(d: number): Moment; + isoWeekYear(): number; + isoWeekYear(d: number): Moment; + week(): number; + week(d: number): Moment; + weeks(): number; + weeks(d: number): Moment; + isoWeek(): number; + isoWeek(d: number): Moment; + isoWeeks(): number; + isoWeeks(d: number): Moment; + weeksInYear(): number; + isoWeeksInYear(): number; + dayOfYear(): number; + dayOfYear(d: number): Moment; + + from(f: Moment): string; + from(f: Moment, suffix: boolean): string; + from(d: Date): string; + from(s: string): string; + from(date: number[]): string; + + diff(b: Moment): number; + diff(b: Moment, unitOfTime: string): number; + diff(b: Moment, unitOfTime: string, round: boolean): number; + + toArray(): number[]; + toDate(): Date; + toISOString(): string; + toJSON(): string; + unix(): number; + + isLeapYear(): boolean; + zone(): number; + zone(b: number): Moment; + zone(b: string): Moment; + utcOffset(): number; + utcOffset(b: number): Moment; + utcOffset(b: string): Moment; + daysInMonth(): number; + isDST(): boolean; + + isBefore(): boolean; + isBefore(b: Moment): boolean; + isBefore(b: string): boolean; + isBefore(b: Number): boolean; + isBefore(b: Date): boolean; + isBefore(b: number[]): boolean; + isBefore(b: Moment, granularity: string): boolean; + isBefore(b: String, granularity: string): boolean; + isBefore(b: Number, granularity: string): boolean; + isBefore(b: Date, granularity: string): boolean; + isBefore(b: number[], granularity: string): boolean; + + isAfter(): boolean; + isAfter(b: Moment): boolean; + isAfter(b: string): boolean; + isAfter(b: Number): boolean; + isAfter(b: Date): boolean; + isAfter(b: number[]): boolean; + isAfter(b: Moment, granularity: string): boolean; + isAfter(b: String, granularity: string): boolean; + isAfter(b: Number, granularity: string): boolean; + isAfter(b: Date, granularity: string): boolean; + isAfter(b: number[], granularity: string): boolean; + + isSame(b: Moment): boolean; + isSame(b: string): boolean; + isSame(b: Number): boolean; + isSame(b: Date): boolean; + isSame(b: number[]): boolean; + isSame(b: Moment, granularity: string): boolean; + isSame(b: String, granularity: string): boolean; + isSame(b: Number, granularity: string): boolean; + isSame(b: Date, granularity: string): boolean; + isSame(b: number[], granularity: string): boolean; + + // Deprecated as of 2.8.0. + lang(language: string): Moment; + lang(reset: boolean): Moment; + lang(): MomentLanguage; + + locale(language: string): Moment; + locale(reset: boolean): Moment; + locale(): string; + + localeData(language: string): Moment; + localeData(reset: boolean): Moment; + localeData(): MomentLanguage; + + // Deprecated as of 2.7.0. + max(date: Date): Moment; + max(date: number): Moment; + max(date: any[]): Moment; + max(date: string): Moment; + max(date: string, format: string): Moment; + max(clone: Moment): Moment; + + // Deprecated as of 2.7.0. + min(date: Date): Moment; + min(date: number): Moment; + min(date: any[]): Moment; + min(date: string): Moment; + min(date: string, format: string): Moment; + min(clone: Moment): Moment; + + get(unit: string): number; + set(unit: string, value: number): Moment; + + } + + interface MomentCalendar { + + lastDay: any; + sameDay: any; + nextDay: any; + lastWeek: any; + nextWeek: any; + sameElse: any; + + } + + interface BaseMomentLanguage { + months ?: any; + monthsShort ?: any; + weekdays ?: any; + weekdaysShort ?: any; + weekdaysMin ?: any; + relativeTime ?: MomentRelativeTime; + meridiem ?: (hour: number, minute: number, isLowercase: boolean) => string; + calendar ?: MomentCalendar; + ordinal ?: (num: number) => string; + } + + interface MomentLanguage extends BaseMomentLanguage { + longDateFormat?: MomentLongDateFormat; + } + + interface MomentLanguageData extends BaseMomentLanguage { + /** + * @param formatType should be L, LL, LLL, LLLL. + */ + longDateFormat(formatType: string): string; + } + + interface MomentLongDateFormat { + + L: string; + LL: string; + LLL: string; + LLLL: string; + LT: string; + l?: string; + ll?: string; + lll?: string; + llll?: string; + lt?: string; + + } + + interface MomentRelativeTime { + + future: any; + past: any; + s: any; + m: any; + mm: any; + h: any; + hh: any; + d: any; + dd: any; + M: any; + MM: any; + y: any; + yy: any; + + } + + interface MomentStatic { + + version: string; + + (): Moment; + (date: number): Moment; + (date: number[]): Moment; + (date: string, format?: string, strict?: boolean): Moment; + (date: string, format?: string, language?: string, strict?: boolean): Moment; + (date: string, formats: string[], strict?: boolean): Moment; + (date: string, formats: string[], language?: string, strict?: boolean): Moment; + (date: string, specialFormat: () => void, strict?: boolean): Moment; + (date: string, specialFormat: () => void, language?: string, strict?: boolean): Moment; + (date: string, formatsIncludingSpecial: any[], strict?: boolean): Moment; + (date: string, formatsIncludingSpecial: any[], language?: string, strict?: boolean): Moment; + (date: Date): Moment; + (date: Moment): Moment; + (date: Object): Moment; + + utc(): Moment; + utc(date: number): Moment; + utc(date: number[]): Moment; + utc(date: string, format?: string, strict?: boolean): Moment; + utc(date: string, format?: string, language?: string, strict?: boolean): Moment; + utc(date: string, formats: string[], strict?: boolean): Moment; + utc(date: string, formats: string[], language?: string, strict?: boolean): Moment; + utc(date: Date): Moment; + utc(date: Moment): Moment; + utc(date: Object): Moment; + + unix(timestamp: number): Moment; + + invalid(parsingFlags?: Object): Moment; + isMoment(): boolean; + isMoment(m: any): boolean; + isDuration(): boolean; + isDuration(d: any): boolean; + + // Deprecated in 2.8.0. + lang(language?: string): string; + lang(language?: string, definition?: MomentLanguage): string; + + locale(language?: string): string; + locale(language?: string[]): string; + locale(language?: string, definition?: MomentLanguage): string; + + localeData(language?: string): MomentLanguageData; + + longDateFormat: any; + relativeTime: any; + meridiem: (hour: number, minute: number, isLowercase: boolean) => string; + calendar: any; + ordinal: (num: number) => string; + + duration(milliseconds: Number): Duration; + duration(num: Number, unitOfTime: string): Duration; + duration(input: MomentInput): Duration; + duration(object: any): Duration; + duration(): Duration; + + parseZone(date: string): Moment; + + months(): string[]; + months(index: number): string; + months(format: string): string[]; + months(format: string, index: number): string; + monthsShort(): string[]; + monthsShort(index: number): string; + monthsShort(format: string): string[]; + monthsShort(format: string, index: number): string; + + weekdays(): string[]; + weekdays(index: number): string; + weekdays(format: string): string[]; + weekdays(format: string, index: number): string; + weekdaysShort(): string[]; + weekdaysShort(index: number): string; + weekdaysShort(format: string): string[]; + weekdaysShort(format: string, index: number): string; + weekdaysMin(): string[]; + weekdaysMin(index: number): string; + weekdaysMin(format: string): string[]; + weekdaysMin(format: string, index: number): string; + + min(moments: Moment[]): Moment; + max(moments: Moment[]): Moment; + + normalizeUnits(unit: string): string; + relativeTimeThreshold(threshold: string, limit: number): void; + + /** + * Constant used to enable explicit ISO_8601 format parsing. + */ + ISO_8601(): void; + + } + +} + +declare module 'moment' { + var moment: moment.MomentStatic; + export = moment; +} From a1575b96ec38e916750629839d2110cb96210f89 Mon Sep 17 00:00:00 2001 From: Dmitry Radkovskiy Date: Thu, 28 May 2015 00:46:21 +0300 Subject: [PATCH 107/137] Modified moment.d.ts to use moment-node.d.ts --- moment/moment.d.ts | 477 +-------------------------------------------- 1 file changed, 1 insertion(+), 476 deletions(-) diff --git a/moment/moment.d.ts b/moment/moment.d.ts index e09aab1d5..736956e5d 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -3,481 +3,6 @@ // Definitions by: Michael Lakerveld , Aaron King , Hiroki Horiuchi , Dick van den Brink , Adi Dahiya // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module moment { - - interface MomentInput { - - years?: number; - y?: number; - - months?: number; - M?: number; - - weeks?: number; - w?: number; - - days?: number; - d?: number; - - hours?: number; - h?: number; - - minutes?: number; - m?: number; - - seconds?: number; - s?: number; - - milliseconds?: number; - ms?: number; - - } - - interface Duration { - - humanize(withSuffix?: boolean): string; - - as(units: string): number; - - milliseconds(): number; - asMilliseconds(): number; - - seconds(): number; - asSeconds(): number; - - minutes(): number; - asMinutes(): number; - - hours(): number; - asHours(): number; - - days(): number; - asDays(): number; - - months(): number; - asMonths(): number; - - years(): number; - asYears(): number; - - add(n: number, p: string): Duration; - add(n: number): Duration; - add(d: Duration): Duration; - - subtract(n: number, p: string): Duration; - subtract(n: number): Duration; - subtract(d: Duration): Duration; - - toISOString(): string; - - } - - interface Moment { - - format(format: string): string; - format(): string; - - fromNow(withoutSuffix?: boolean): string; - - startOf(unitOfTime: string): Moment; - endOf(unitOfTime: string): Moment; - - /** - * Mutates the original moment by adding time. (deprecated in 2.8.0) - * - * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc) - * @param amount the amount you want to add - */ - add(unitOfTime: string, amount: number): Moment; - /** - * Mutates the original moment by adding time. - * - * @param amount the amount you want to add - * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc) - */ - add(amount: number, unitOfTime: string): Moment; - /** - * Mutates the original moment by adding time. Note that the order of arguments can be flipped. - * - * @param amount the amount you want to add - * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc) - */ - add(amount: string, unitOfTime: string): Moment; - /** - * Mutates the original moment by adding time. - * - * @param objectLiteral an object literal that describes multiple time units {days:7,months:1} - */ - add(objectLiteral: MomentInput): Moment; - /** - * Mutates the original moment by adding time. - * - * @param duration a length of time - */ - add(duration: Duration): Moment; - - /** - * Mutates the original moment by subtracting time. (deprecated in 2.8.0) - * - * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc) - * @param amount the amount you want to subtract - */ - subtract(unitOfTime: string, amount: number): Moment; - /** - * Mutates the original moment by subtracting time. - * - * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc) - * @param amount the amount you want to subtract - */ - subtract(amount: number, unitOfTime: string): Moment; - /** - * Mutates the original moment by subtracting time. Note that the order of arguments can be flipped. - * - * @param amount the amount you want to add - * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc) - */ - subtract(amount: string, unitOfTime: string): Moment; - /** - * Mutates the original moment by subtracting time. - * - * @param objectLiteral an object literal that describes multiple time units {days:7,months:1} - */ - subtract(objectLiteral: MomentInput): Moment; - /** - * Mutates the original moment by subtracting time. - * - * @param duration a length of time - */ - subtract(duration: Duration): Moment; - - calendar(): string; - calendar(start: Moment): string; - - clone(): Moment; - - /** - * @return Unix timestamp, or milliseconds since the epoch. - */ - valueOf(): number; - - local(): Moment; // current date/time in local mode - - utc(): Moment; // current date/time in UTC mode - - isValid(): boolean; - - year(y: number): Moment; - year(): number; - quarter(): number; - quarter(q: number): Moment; - month(M: number): Moment; - month(M: string): Moment; - month(): number; - day(d: number): Moment; - day(d: string): Moment; - day(): number; - date(d: number): Moment; - date(): number; - hour(h: number): Moment; - hour(): number; - hours(h: number): Moment; - hours(): number; - minute(m: number): Moment; - minute(): number; - minutes(m: number): Moment; - minutes(): number; - second(s: number): Moment; - second(): number; - seconds(s: number): Moment; - seconds(): number; - millisecond(ms: number): Moment; - millisecond(): number; - milliseconds(ms: number): Moment; - milliseconds(): number; - weekday(): number; - weekday(d: number): Moment; - isoWeekday(): number; - isoWeekday(d: number): Moment; - weekYear(): number; - weekYear(d: number): Moment; - isoWeekYear(): number; - isoWeekYear(d: number): Moment; - week(): number; - week(d: number): Moment; - weeks(): number; - weeks(d: number): Moment; - isoWeek(): number; - isoWeek(d: number): Moment; - isoWeeks(): number; - isoWeeks(d: number): Moment; - weeksInYear(): number; - isoWeeksInYear(): number; - dayOfYear(): number; - dayOfYear(d: number): Moment; - - from(f: Moment): string; - from(f: Moment, suffix: boolean): string; - from(d: Date): string; - from(s: string): string; - from(date: number[]): string; - - diff(b: Moment): number; - diff(b: Moment, unitOfTime: string): number; - diff(b: Moment, unitOfTime: string, round: boolean): number; - - toArray(): number[]; - toDate(): Date; - toISOString(): string; - toJSON(): string; - unix(): number; - - isLeapYear(): boolean; - zone(): number; - zone(b: number): Moment; - zone(b: string): Moment; - utcOffset(): number; - utcOffset(b: number): Moment; - utcOffset(b: string): Moment; - daysInMonth(): number; - isDST(): boolean; - - isBefore(): boolean; - isBefore(b: Moment): boolean; - isBefore(b: string): boolean; - isBefore(b: Number): boolean; - isBefore(b: Date): boolean; - isBefore(b: number[]): boolean; - isBefore(b: Moment, granularity: string): boolean; - isBefore(b: String, granularity: string): boolean; - isBefore(b: Number, granularity: string): boolean; - isBefore(b: Date, granularity: string): boolean; - isBefore(b: number[], granularity: string): boolean; - - isAfter(): boolean; - isAfter(b: Moment): boolean; - isAfter(b: string): boolean; - isAfter(b: Number): boolean; - isAfter(b: Date): boolean; - isAfter(b: number[]): boolean; - isAfter(b: Moment, granularity: string): boolean; - isAfter(b: String, granularity: string): boolean; - isAfter(b: Number, granularity: string): boolean; - isAfter(b: Date, granularity: string): boolean; - isAfter(b: number[], granularity: string): boolean; - - isSame(b: Moment): boolean; - isSame(b: string): boolean; - isSame(b: Number): boolean; - isSame(b: Date): boolean; - isSame(b: number[]): boolean; - isSame(b: Moment, granularity: string): boolean; - isSame(b: String, granularity: string): boolean; - isSame(b: Number, granularity: string): boolean; - isSame(b: Date, granularity: string): boolean; - isSame(b: number[], granularity: string): boolean; - - // Deprecated as of 2.8.0. - lang(language: string): Moment; - lang(reset: boolean): Moment; - lang(): MomentLanguage; - - locale(language: string): Moment; - locale(reset: boolean): Moment; - locale(): string; - - localeData(language: string): Moment; - localeData(reset: boolean): Moment; - localeData(): MomentLanguage; - - // Deprecated as of 2.7.0. - max(date: Date): Moment; - max(date: number): Moment; - max(date: any[]): Moment; - max(date: string): Moment; - max(date: string, format: string): Moment; - max(clone: Moment): Moment; - - // Deprecated as of 2.7.0. - min(date: Date): Moment; - min(date: number): Moment; - min(date: any[]): Moment; - min(date: string): Moment; - min(date: string, format: string): Moment; - min(clone: Moment): Moment; - - get(unit: string): number; - set(unit: string, value: number): Moment; - - } - - interface MomentCalendar { - - lastDay: any; - sameDay: any; - nextDay: any; - lastWeek: any; - nextWeek: any; - sameElse: any; - - } - - interface BaseMomentLanguage { - months ?: any; - monthsShort ?: any; - weekdays ?: any; - weekdaysShort ?: any; - weekdaysMin ?: any; - relativeTime ?: MomentRelativeTime; - meridiem ?: (hour: number, minute: number, isLowercase: boolean) => string; - calendar ?: MomentCalendar; - ordinal ?: (num: number) => string; - } - - interface MomentLanguage extends BaseMomentLanguage { - longDateFormat?: MomentLongDateFormat; - } - - interface MomentLanguageData extends BaseMomentLanguage { - /** - * @param formatType should be L, LL, LLL, LLLL. - */ - longDateFormat(formatType: string): string; - } - - interface MomentLongDateFormat { - - L: string; - LL: string; - LLL: string; - LLLL: string; - LT: string; - l?: string; - ll?: string; - lll?: string; - llll?: string; - lt?: string; - - } - - interface MomentRelativeTime { - - future: any; - past: any; - s: any; - m: any; - mm: any; - h: any; - hh: any; - d: any; - dd: any; - M: any; - MM: any; - y: any; - yy: any; - - } - - interface MomentStatic { - - version: string; - - (): Moment; - (date: number): Moment; - (date: number[]): Moment; - (date: string, format?: string, strict?: boolean): Moment; - (date: string, format?: string, language?: string, strict?: boolean): Moment; - (date: string, formats: string[], strict?: boolean): Moment; - (date: string, formats: string[], language?: string, strict?: boolean): Moment; - (date: string, specialFormat: () => void, strict?: boolean): Moment; - (date: string, specialFormat: () => void, language?: string, strict?: boolean): Moment; - (date: string, formatsIncludingSpecial: any[], strict?: boolean): Moment; - (date: string, formatsIncludingSpecial: any[], language?: string, strict?: boolean): Moment; - (date: Date): Moment; - (date: Moment): Moment; - (date: Object): Moment; - - utc(): Moment; - utc(date: number): Moment; - utc(date: number[]): Moment; - utc(date: string, format?: string, strict?: boolean): Moment; - utc(date: string, format?: string, language?: string, strict?: boolean): Moment; - utc(date: string, formats: string[], strict?: boolean): Moment; - utc(date: string, formats: string[], language?: string, strict?: boolean): Moment; - utc(date: Date): Moment; - utc(date: Moment): Moment; - utc(date: Object): Moment; - - unix(timestamp: number): Moment; - - invalid(parsingFlags?: Object): Moment; - isMoment(): boolean; - isMoment(m: any): boolean; - isDuration(): boolean; - isDuration(d: any): boolean; - - // Deprecated in 2.8.0. - lang(language?: string): string; - lang(language?: string, definition?: MomentLanguage): string; - - locale(language?: string): string; - locale(language?: string[]): string; - locale(language?: string, definition?: MomentLanguage): string; - - localeData(language?: string): MomentLanguageData; - - longDateFormat: any; - relativeTime: any; - meridiem: (hour: number, minute: number, isLowercase: boolean) => string; - calendar: any; - ordinal: (num: number) => string; - - duration(milliseconds: Number): Duration; - duration(num: Number, unitOfTime: string): Duration; - duration(input: MomentInput): Duration; - duration(object: any): Duration; - duration(): Duration; - - parseZone(date: string): Moment; - - months(): string[]; - months(index: number): string; - months(format: string): string[]; - months(format: string, index: number): string; - monthsShort(): string[]; - monthsShort(index: number): string; - monthsShort(format: string): string[]; - monthsShort(format: string, index: number): string; - - weekdays(): string[]; - weekdays(index: number): string; - weekdays(format: string): string[]; - weekdays(format: string, index: number): string; - weekdaysShort(): string[]; - weekdaysShort(index: number): string; - weekdaysShort(format: string): string[]; - weekdaysShort(format: string, index: number): string; - weekdaysMin(): string[]; - weekdaysMin(index: number): string; - weekdaysMin(format: string): string[]; - weekdaysMin(format: string, index: number): string; - - min(moments: Moment[]): Moment; - max(moments: Moment[]): Moment; - - normalizeUnits(unit: string): string; - relativeTimeThreshold(threshold: string, limit: number): void; - - /** - * Constant used to enable explicit ISO_8601 format parsing. - */ - ISO_8601(): void; - - } - -} +/// declare var moment: moment.MomentStatic; - -declare module 'moment' { - export = moment; -} From 4e99d96891661b1d8885e2748b812b7d1ea19dbb Mon Sep 17 00:00:00 2001 From: LCHProducciones Date: Wed, 27 May 2015 19:43:27 -0300 Subject: [PATCH 108/137] Bugfixes on definitions --- magicsuggest/magicsuggest.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magicsuggest/magicsuggest.d.ts b/magicsuggest/magicsuggest.d.ts index f1ac71a2e..660a58c5c 100644 --- a/magicsuggest/magicsuggest.d.ts +++ b/magicsuggest/magicsuggest.d.ts @@ -447,8 +447,9 @@ declare module MagicSuggest { /** * Sets the current selection with the JSON items provided * @param items + * @param isSilent - (optional) */ - setSelection(items: Array): void; + setSelection(items: Array, isSilet?: boolean): void; /** * Sets a value for the combo box. Value must be an array of values with data type matching valueField one. From 3ca8ceb795a971e425d8a9873de74a509aec9d43 Mon Sep 17 00:00:00 2001 From: Vincent Siao Date: Wed, 27 May 2015 18:28:29 -0700 Subject: [PATCH 109/137] [react] Make var addons into a module This lets you do import aliasing (eg. `import TestUtils = React.addons.TestUtils;`) --- react/react-addons-global.d.ts | 172 +++++++++++++++++---------------- react/react-addons-tests.ts | 10 +- react/react-addons.d.ts | 172 +++++++++++++++++---------------- 3 files changed, 188 insertions(+), 166 deletions(-) diff --git a/react/react-addons-global.d.ts b/react/react-addons-global.d.ts index bccd3f427..cda3edcc8 100644 --- a/react/react-addons-global.d.ts +++ b/react/react-addons-global.d.ts @@ -9,33 +9,39 @@ declare module React { // React.addons // ---------------------------------------------------------------------- - export var addons: { - CSSTransitionGroup: CSSTransitionGroup; - LinkedStateMixin: LinkedStateMixin; - PureRenderMixin: PureRenderMixin; - TransitionGroup: TransitionGroup; + export module addons { + export var CSSTransitionGroup: CSSTransitionGroup; + export var TransitionGroup: TransitionGroup; - batchedUpdates(callback: (a: A, b: B) => any, a: A, b: B): void; - batchedUpdates(callback: (a: A) => any, a: A): void; - batchedUpdates(callback: () => any): void; + export var LinkedStateMixin: LinkedStateMixin; + export var PureRenderMixin: PureRenderMixin; + + export function batchedUpdates( + callback: (a: A, b: B) => any, a: A, b: B): void; + export function batchedUpdates(callback: (a: A) => any, a: A): void; + export function batchedUpdates(callback: () => any): void; // deprecated: use petehunt/react-classset or JedWatson/classnames - classSet(cx: { [key: string]: boolean }): string; - classSet(...classList: string[]): string; + export function classSet(cx: { [key: string]: boolean }): string; + export function classSet(...classList: string[]): string; - cloneWithProps

(element: DOMElement

, props: P): DOMElement

; - cloneWithProps

(element: ClassicElement

, props: P): ClassicElement

; - cloneWithProps

(element: ReactElement

, props: P): ReactElement

; + export function cloneWithProps

( + element: DOMElement

, props: P): DOMElement

; + export function cloneWithProps

( + element: ClassicElement

, props: P): ClassicElement

; + export function cloneWithProps

( + element: ReactElement

, props: P): ReactElement

; - createFragment(object: { [key: string]: ReactNode }): ReactFragment; + export function createFragment( + object: { [key: string]: ReactNode }): ReactFragment; - update(value: any[], spec: UpdateArraySpec): any[]; - update(value: {}, spec: UpdateSpec): any; + export function update(value: any[], spec: UpdateArraySpec): any[]; + export function update(value: {}, spec: UpdateSpec): any; // Development tools - Perf: ReactPerf; - TestUtils: ReactTestUtils; - }; + export import Perf = ReactPerf; + export import TestUtils = ReactTestUtils; + } // // React.addons (Transitions) @@ -114,14 +120,14 @@ declare module React { totalTime: number; } - interface ReactPerf { - start(): void; - stop(): void; - printInclusive(measurements: Measurements[]): void; - printExclusive(measurements: Measurements[]): void; - printWasted(measurements: Measurements[]): void; - printDOM(measurements: Measurements[]): void; - getLastMeasurements(): Measurements[]; + module ReactPerf { + export function start(): void; + export function stop(): void; + export function printInclusive(measurements: Measurements[]): void; + export function printExclusive(measurements: Measurements[]): void; + export function printWasted(measurements: Measurements[]): void; + export function printDOM(measurements: Measurements[]): void; + export function getLastMeasurements(): Measurements[]; } // @@ -132,55 +138,59 @@ declare module React { new(): any; } - interface ReactTestUtils { - Simulate: Simulate; + module ReactTestUtils { + export import Simulate = ReactSimulate; - renderIntoDocument

(element: ReactElement

): Component; - renderIntoDocument>(element: ReactElement): C; + export function renderIntoDocument

( + element: ReactElement

): Component; + export function renderIntoDocument>( + element: ReactElement): C; - mockComponent(mocked: MockedComponentClass, mockTagName?: string): ReactTestUtils; + export function mockComponent( + mocked: MockedComponentClass, mockTagName?: string): typeof ReactTestUtils; - isElementOfType(element: ReactElement, type: ReactType): boolean; - isTextComponent(instance: Component): boolean; - isDOMComponent(instance: Component): boolean; - isCompositeComponent(instance: Component): boolean; - isCompositeComponentWithType( + export function isElementOfType( + element: ReactElement, type: ReactType): boolean; + export function isTextComponent(instance: Component): boolean; + export function isDOMComponent(instance: Component): boolean; + export function isCompositeComponent(instance: Component): boolean; + export function isCompositeComponentWithType( instance: Component, type: ComponentClass): boolean; - findAllInRenderedTree( + export function findAllInRenderedTree( tree: Component, fn: (i: Component) => boolean): Component; - scryRenderedDOMComponentsWithClass( + export function scryRenderedDOMComponentsWithClass( tree: Component, className: string): DOMComponent[]; - findRenderedDOMComponentWithClass( + export function findRenderedDOMComponentWithClass( tree: Component, className: string): DOMComponent; - scryRenderedDOMComponentsWithTag( + export function scryRenderedDOMComponentsWithTag( tree: Component, tagName: string): DOMComponent[]; - findRenderedDOMComponentWithTag( + export function findRenderedDOMComponentWithTag( tree: Component, tagName: string): DOMComponent; - scryRenderedComponentsWithType

( + export function scryRenderedComponentsWithType

( tree: Component, type: ComponentClass

): Component[]; - scryRenderedComponentsWithType>( + export function scryRenderedComponentsWithType>( tree: Component, type: ComponentClass): C[]; - findRenderedComponentWithType

( + export function findRenderedComponentWithType

( tree: Component, type: ComponentClass

): Component; - findRenderedComponentWithType>( + export function findRenderedComponentWithType>( tree: Component, type: ComponentClass): C; - createRenderer(): ShallowRenderer; + export function createRenderer(): ShallowRenderer; } interface SyntheticEventData { @@ -222,40 +232,40 @@ declare module React { (component: Component, eventData?: SyntheticEventData): void; } - interface Simulate { - blur: EventSimulator; - change: EventSimulator; - click: EventSimulator; - cut: EventSimulator; - doubleClick: EventSimulator; - drag: EventSimulator; - dragEnd: EventSimulator; - dragEnter: EventSimulator; - dragExit: EventSimulator; - dragLeave: EventSimulator; - dragOver: EventSimulator; - dragStart: EventSimulator; - drop: EventSimulator; - focus: EventSimulator; - input: EventSimulator; - keyDown: EventSimulator; - keyPress: EventSimulator; - keyUp: EventSimulator; - mouseDown: EventSimulator; - mouseEnter: EventSimulator; - mouseLeave: EventSimulator; - mouseMove: EventSimulator; - mouseOut: EventSimulator; - mouseOver: EventSimulator; - mouseUp: EventSimulator; - paste: EventSimulator; - scroll: EventSimulator; - submit: EventSimulator; - touchCancel: EventSimulator; - touchEnd: EventSimulator; - touchMove: EventSimulator; - touchStart: EventSimulator; - wheel: EventSimulator; + module ReactSimulate { + export var blur: EventSimulator; + export var change: EventSimulator; + export var click: EventSimulator; + export var cut: EventSimulator; + export var doubleClick: EventSimulator; + export var drag: EventSimulator; + export var dragEnd: EventSimulator; + export var dragEnter: EventSimulator; + export var dragExit: EventSimulator; + export var dragLeave: EventSimulator; + export var dragOver: EventSimulator; + export var dragStart: EventSimulator; + export var drop: EventSimulator; + export var focus: EventSimulator; + export var input: EventSimulator; + export var keyDown: EventSimulator; + export var keyPress: EventSimulator; + export var keyUp: EventSimulator; + export var mouseDown: EventSimulator; + export var mouseEnter: EventSimulator; + export var mouseLeave: EventSimulator; + export var mouseMove: EventSimulator; + export var mouseOut: EventSimulator; + export var mouseOver: EventSimulator; + export var mouseUp: EventSimulator; + export var paste: EventSimulator; + export var scroll: EventSimulator; + export var submit: EventSimulator; + export var touchCancel: EventSimulator; + export var touchEnd: EventSimulator; + export var touchMove: EventSimulator; + export var touchStart: EventSimulator; + export var wheel: EventSimulator; } class ShallowRenderer { diff --git a/react/react-addons-tests.ts b/react/react-addons-tests.ts index 72d6db486..f67072c5f 100644 --- a/react/react-addons-tests.ts +++ b/react/react-addons-tests.ts @@ -1,6 +1,8 @@ /// import React = require("react/addons"); +import TestUtils = React.addons.TestUtils; + interface Props extends React.Props { hello: string; world?: string; @@ -397,12 +399,12 @@ React.createFactory(React.addons.CSSTransitionGroup)({ // -------------------------------------------------------------------------- var node: Element; -React.addons.TestUtils.Simulate.click(node); -React.addons.TestUtils.Simulate.change(node); -React.addons.TestUtils.Simulate.keyDown(node, { key: "Enter" }); +TestUtils.Simulate.click(node); +TestUtils.Simulate.change(node); +TestUtils.Simulate.keyDown(node, { key: "Enter" }); var renderer: React.ShallowRenderer = - React.addons.TestUtils.createRenderer(); + TestUtils.createRenderer(); renderer.render(React.createElement(Timer)); var output: Timer = renderer.getRenderOutput(); diff --git a/react/react-addons.d.ts b/react/react-addons.d.ts index c4e768f27..4ddf17152 100644 --- a/react/react-addons.d.ts +++ b/react/react-addons.d.ts @@ -744,33 +744,39 @@ declare module "react/addons" { // React.addons // ---------------------------------------------------------------------- - export var addons: { - CSSTransitionGroup: CSSTransitionGroup; - LinkedStateMixin: LinkedStateMixin; - PureRenderMixin: PureRenderMixin; - TransitionGroup: TransitionGroup; + export module addons { + export var CSSTransitionGroup: CSSTransitionGroup; + export var TransitionGroup: TransitionGroup; - batchedUpdates(callback: (a: A, b: B) => any, a: A, b: B): void; - batchedUpdates(callback: (a: A) => any, a: A): void; - batchedUpdates(callback: () => any): void; + export var LinkedStateMixin: LinkedStateMixin; + export var PureRenderMixin: PureRenderMixin; + + export function batchedUpdates( + callback: (a: A, b: B) => any, a: A, b: B): void; + export function batchedUpdates(callback: (a: A) => any, a: A): void; + export function batchedUpdates(callback: () => any): void; // deprecated: use petehunt/react-classset or JedWatson/classnames - classSet(cx: { [key: string]: boolean }): string; - classSet(...classList: string[]): string; + export function classSet(cx: { [key: string]: boolean }): string; + export function classSet(...classList: string[]): string; - cloneWithProps

(element: DOMElement

, props: P): DOMElement

; - cloneWithProps

(element: ClassicElement

, props: P): ClassicElement

; - cloneWithProps

(element: ReactElement

, props: P): ReactElement

; + export function cloneWithProps

( + element: DOMElement

, props: P): DOMElement

; + export function cloneWithProps

( + element: ClassicElement

, props: P): ClassicElement

; + export function cloneWithProps

( + element: ReactElement

, props: P): ReactElement

; - createFragment(object: { [key: string]: ReactNode }): ReactFragment; + export function createFragment( + object: { [key: string]: ReactNode }): ReactFragment; - update(value: any[], spec: UpdateArraySpec): any[]; - update(value: {}, spec: UpdateSpec): any; + export function update(value: any[], spec: UpdateArraySpec): any[]; + export function update(value: {}, spec: UpdateSpec): any; // Development tools - Perf: ReactPerf; - TestUtils: ReactTestUtils; - }; + export import Perf = ReactPerf; + export import TestUtils = ReactTestUtils; + } // // React.addons (Transitions) @@ -849,14 +855,14 @@ declare module "react/addons" { totalTime: number; } - interface ReactPerf { - start(): void; - stop(): void; - printInclusive(measurements: Measurements[]): void; - printExclusive(measurements: Measurements[]): void; - printWasted(measurements: Measurements[]): void; - printDOM(measurements: Measurements[]): void; - getLastMeasurements(): Measurements[]; + module ReactPerf { + export function start(): void; + export function stop(): void; + export function printInclusive(measurements: Measurements[]): void; + export function printExclusive(measurements: Measurements[]): void; + export function printWasted(measurements: Measurements[]): void; + export function printDOM(measurements: Measurements[]): void; + export function getLastMeasurements(): Measurements[]; } // @@ -867,55 +873,59 @@ declare module "react/addons" { new(): any; } - interface ReactTestUtils { - Simulate: Simulate; + module ReactTestUtils { + export import Simulate = ReactSimulate; - renderIntoDocument

(element: ReactElement

): Component; - renderIntoDocument>(element: ReactElement): C; + export function renderIntoDocument

( + element: ReactElement

): Component; + export function renderIntoDocument>( + element: ReactElement): C; - mockComponent(mocked: MockedComponentClass, mockTagName?: string): ReactTestUtils; + export function mockComponent( + mocked: MockedComponentClass, mockTagName?: string): typeof ReactTestUtils; - isElementOfType(element: ReactElement, type: ReactType): boolean; - isTextComponent(instance: Component): boolean; - isDOMComponent(instance: Component): boolean; - isCompositeComponent(instance: Component): boolean; - isCompositeComponentWithType( + export function isElementOfType( + element: ReactElement, type: ReactType): boolean; + export function isTextComponent(instance: Component): boolean; + export function isDOMComponent(instance: Component): boolean; + export function isCompositeComponent(instance: Component): boolean; + export function isCompositeComponentWithType( instance: Component, type: ComponentClass): boolean; - findAllInRenderedTree( + export function findAllInRenderedTree( tree: Component, fn: (i: Component) => boolean): Component; - scryRenderedDOMComponentsWithClass( + export function scryRenderedDOMComponentsWithClass( tree: Component, className: string): DOMComponent[]; - findRenderedDOMComponentWithClass( + export function findRenderedDOMComponentWithClass( tree: Component, className: string): DOMComponent; - scryRenderedDOMComponentsWithTag( + export function scryRenderedDOMComponentsWithTag( tree: Component, tagName: string): DOMComponent[]; - findRenderedDOMComponentWithTag( + export function findRenderedDOMComponentWithTag( tree: Component, tagName: string): DOMComponent; - scryRenderedComponentsWithType

( + export function scryRenderedComponentsWithType

( tree: Component, type: ComponentClass

): Component[]; - scryRenderedComponentsWithType>( + export function scryRenderedComponentsWithType>( tree: Component, type: ComponentClass): C[]; - findRenderedComponentWithType

( + export function findRenderedComponentWithType

( tree: Component, type: ComponentClass

): Component; - findRenderedComponentWithType>( + export function findRenderedComponentWithType>( tree: Component, type: ComponentClass): C; - createRenderer(): ShallowRenderer; + export function createRenderer(): ShallowRenderer; } interface SyntheticEventData { @@ -957,40 +967,40 @@ declare module "react/addons" { (component: Component, eventData?: SyntheticEventData): void; } - interface Simulate { - blur: EventSimulator; - change: EventSimulator; - click: EventSimulator; - cut: EventSimulator; - doubleClick: EventSimulator; - drag: EventSimulator; - dragEnd: EventSimulator; - dragEnter: EventSimulator; - dragExit: EventSimulator; - dragLeave: EventSimulator; - dragOver: EventSimulator; - dragStart: EventSimulator; - drop: EventSimulator; - focus: EventSimulator; - input: EventSimulator; - keyDown: EventSimulator; - keyPress: EventSimulator; - keyUp: EventSimulator; - mouseDown: EventSimulator; - mouseEnter: EventSimulator; - mouseLeave: EventSimulator; - mouseMove: EventSimulator; - mouseOut: EventSimulator; - mouseOver: EventSimulator; - mouseUp: EventSimulator; - paste: EventSimulator; - scroll: EventSimulator; - submit: EventSimulator; - touchCancel: EventSimulator; - touchEnd: EventSimulator; - touchMove: EventSimulator; - touchStart: EventSimulator; - wheel: EventSimulator; + module ReactSimulate { + export var blur: EventSimulator; + export var change: EventSimulator; + export var click: EventSimulator; + export var cut: EventSimulator; + export var doubleClick: EventSimulator; + export var drag: EventSimulator; + export var dragEnd: EventSimulator; + export var dragEnter: EventSimulator; + export var dragExit: EventSimulator; + export var dragLeave: EventSimulator; + export var dragOver: EventSimulator; + export var dragStart: EventSimulator; + export var drop: EventSimulator; + export var focus: EventSimulator; + export var input: EventSimulator; + export var keyDown: EventSimulator; + export var keyPress: EventSimulator; + export var keyUp: EventSimulator; + export var mouseDown: EventSimulator; + export var mouseEnter: EventSimulator; + export var mouseLeave: EventSimulator; + export var mouseMove: EventSimulator; + export var mouseOut: EventSimulator; + export var mouseOver: EventSimulator; + export var mouseUp: EventSimulator; + export var paste: EventSimulator; + export var scroll: EventSimulator; + export var submit: EventSimulator; + export var touchCancel: EventSimulator; + export var touchEnd: EventSimulator; + export var touchMove: EventSimulator; + export var touchStart: EventSimulator; + export var wheel: EventSimulator; } class ShallowRenderer { From 23b92b854f13406ad47da99ecdcc4855f7e2cc28 Mon Sep 17 00:00:00 2001 From: Tanguy Krotoff Date: Thu, 28 May 2015 15:36:30 +0200 Subject: [PATCH 110/137] Type definitions for urlsafe-base64 v1.0.0 --- urlsafe-base64/urlsafe-base64-tests.ts | 9 +++++ urlsafe-base64/urlsafe-base64.d.ts | 50 ++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 urlsafe-base64/urlsafe-base64-tests.ts create mode 100644 urlsafe-base64/urlsafe-base64.d.ts diff --git a/urlsafe-base64/urlsafe-base64-tests.ts b/urlsafe-base64/urlsafe-base64-tests.ts new file mode 100644 index 000000000..2c7d4722f --- /dev/null +++ b/urlsafe-base64/urlsafe-base64-tests.ts @@ -0,0 +1,9 @@ +/// + +import URLSafeBase64 = require('urlsafe-base64'); + +var base64 = URLSafeBase64.encode(new Buffer('3Rpbmd1aXNoZWQ', 'base64')); + +var buf = URLSafeBase64.decode('3Rpbmd1aXNoZWQ'); + +var isValid = URLSafeBase64.validate('3Rpbmd1aXNoZWQ'); diff --git a/urlsafe-base64/urlsafe-base64.d.ts b/urlsafe-base64/urlsafe-base64.d.ts new file mode 100644 index 000000000..c9c6ed0b9 --- /dev/null +++ b/urlsafe-base64/urlsafe-base64.d.ts @@ -0,0 +1,50 @@ +// Type definitions for urlsafe-base64 v1.0.0 +// Project: https://github.com/RGBboy/urlsafe-base64 +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'urlsafe-base64' { + /** + * Library version. + */ + export var version: string; + + /** + * .encode + * + * return an encoded Buffer as URL Safe Base64 + * + * Note: This function encodes to the RFC 4648 Spec where '+' is encoded + * as '-' and '/' is encoded as '_'. The padding character '=' is + * removed. + * + * @param {Buffer} buffer + * @return {String} + * @api public + */ + export function encode(buffer: Buffer): string; + + /** + * .decode + * + * return an decoded URL Safe Base64 as Buffer + * + * @param {String} + * @return {Buffer} + * @api public + */ + export function decode(base64: string): Buffer; + + /** + * .validate + * + * Validates a string if it is URL Safe Base64 encoded. + * + * @param {String} + * @return {Boolean} + * @api public + */ + export function validate(base64: string): boolean; +} From f7ceda504602664f36d5a7bf303068dc45d5e824 Mon Sep 17 00:00:00 2001 From: Vadim Macagon Date: Thu, 28 May 2015 22:37:24 +0700 Subject: [PATCH 111/137] Add PrettyStream constructor with options, and some doc comments --- bunyan-prettystream/bunyan-prettystream.d.ts | 22 +++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/bunyan-prettystream/bunyan-prettystream.d.ts b/bunyan-prettystream/bunyan-prettystream.d.ts index 9f9fa4f57..12e399ea3 100644 --- a/bunyan-prettystream/bunyan-prettystream.d.ts +++ b/bunyan-prettystream/bunyan-prettystream.d.ts @@ -1,6 +1,6 @@ -// Type definitions for bunyan-prettystream +// Type definitions for bunyan-prettystream 0.1.3 // Project: https://www.npmjs.com/package/bunyan-prettystream -// Definitions by: Jason Swearingen +// Definitions by: Jason Swearingen , Vadim Macagon // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -8,7 +8,23 @@ declare module "bunyan-prettystream" { import stream = require("stream"); class PrettyStream extends stream.Writable { - public pipe(destination: T, options?: { end?: boolean; }): T; + /** + * @param options.mode Output format, can be either `long`, `short`, or `dev`, + * defaults to `long`. + * @param options.useColor Indicates whether or not output should be colored, + * defaults to `true`. + */ + constructor(options?: { mode?: string; useColor?: boolean }); + + /** + * Pipes data from this stream to another. + * + * @param destination Stream to write data to. + * @param options.end Indicates whether `end()` should be called on the `destination` + * stream when this stream emits `end`, defaults to `true`. + * @return The `destination` stream. + */ + pipe(destination: T, options?: { end?: boolean; }): T; } export = PrettyStream; } \ No newline at end of file From 9920fd383c8a426d91eaae34ed33ab23046d8ae5 Mon Sep 17 00:00:00 2001 From: LeandroDG Date: Thu, 28 May 2015 13:25:04 -0300 Subject: [PATCH 112/137] Adding basic authentication support Added property "auth" to options class and method "request.auth" to provide basic authentication --- request/request.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/request/request.d.ts b/request/request.d.ts index eff35ada6..e94a04ad1 100644 --- a/request/request.d.ts +++ b/request/request.d.ts @@ -62,6 +62,7 @@ declare module 'request' { callback?: (error: any, response: any, body: any) => void; jar?: any; // CookieJar form?: any; // Object or string + auth?: AuthOptions; oauth?: OAuthOptions; aws?: AWSOptions; hawk ?: HawkOptions; @@ -107,6 +108,7 @@ declare module 'request' { multipart(multipart: RequestPart[]): Request; json(val: any): Request; aws(opts: AWSOptions, now?: boolean): Request; + auth(username: string, password: string, sendInmediately?: boolean, bearer?: string): Request; oauth(oauth: OAuthOptions): Request; jar(jar: CookieJar): Request; From 292104d982d25965eefa0411ce0e1118323b4dc7 Mon Sep 17 00:00:00 2001 From: LeandroDG Date: Thu, 28 May 2015 18:13:44 -0300 Subject: [PATCH 113/137] Changed response type to http.IncomingMessage --- request/request.d.ts | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/request/request.d.ts b/request/request.d.ts index e94a04ad1..e16eafadb 100644 --- a/request/request.d.ts +++ b/request/request.d.ts @@ -15,40 +15,40 @@ declare module 'request' { export = RequestAPI; - function RequestAPI(uri: string, options?: RequestAPI.Options, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request; - function RequestAPI(uri: string, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request; - function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request; + function RequestAPI(uri: string, options?: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; + function RequestAPI(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; + function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; module RequestAPI { export function defaults(options: Options): typeof RequestAPI; - export function request(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function request(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function request(options?: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function request(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function request(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function request(options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function get(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function get(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function get(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function get(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function get(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function get(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function post(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function post(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function post(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function post(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function post(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function post(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function put(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function put(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function put(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function put(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function put(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function put(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function head(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function head(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function head(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function head(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function head(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function head(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function patch(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function patch(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function patch(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function patch(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function patch(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function patch(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function del(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function del(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function del(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function del(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function del(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function del(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; export function forever(agentOptions: any, optionsArg: any): Request; export function jar(): CookieJar; @@ -59,7 +59,7 @@ declare module 'request' { export interface Options { url?: string; uri?: string; - callback?: (error: any, response: any, body: any) => void; + callback?: (error: any, response: http.IncomingMessage, body: any) => void; jar?: any; // CookieJar form?: any; // Object or string auth?: AuthOptions; From bb793321c6797c8b94da0da2517b8bb5a4af09c3 Mon Sep 17 00:00:00 2001 From: Vincent Siao Date: Thu, 28 May 2015 14:18:58 -0700 Subject: [PATCH 114/137] [React] change ShallowRenderer output to ReactElement --- react/react-addons-global.d.ts | 3 ++- react/react-addons-tests.ts | 4 ++-- react/react-addons.d.ts | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/react/react-addons-global.d.ts b/react/react-addons-global.d.ts index cda3edcc8..508ae0522 100644 --- a/react/react-addons-global.d.ts +++ b/react/react-addons-global.d.ts @@ -269,7 +269,8 @@ declare module React { } class ShallowRenderer { - getRenderOutput>(): C; + getRenderOutput>(): E; + getRenderOutput(): ReactElement; render(element: ReactElement, context?: any): void; unmount(): void; } diff --git a/react/react-addons-tests.ts b/react/react-addons-tests.ts index f67072c5f..b07b7fd58 100644 --- a/react/react-addons-tests.ts +++ b/react/react-addons-tests.ts @@ -406,5 +406,5 @@ TestUtils.Simulate.keyDown(node, { key: "Enter" }); var renderer: React.ShallowRenderer = TestUtils.createRenderer(); renderer.render(React.createElement(Timer)); -var output: Timer = renderer.getRenderOutput(); - +var output: React.ReactElement> = + renderer.getRenderOutput(); diff --git a/react/react-addons.d.ts b/react/react-addons.d.ts index 4ddf17152..40693cb80 100644 --- a/react/react-addons.d.ts +++ b/react/react-addons.d.ts @@ -1004,7 +1004,8 @@ declare module "react/addons" { } class ShallowRenderer { - getRenderOutput>(): C; + getRenderOutput>(): E; + getRenderOutput(): ReactElement; render(element: ReactElement, context?: any): void; unmount(): void; } From 1cc5ea01d8986ba5793072de8c63822947298ce2 Mon Sep 17 00:00:00 2001 From: Vincent Siao Date: Thu, 28 May 2015 15:30:16 -0700 Subject: [PATCH 115/137] [React] Update HTMLAttributes interface removes `scrollLeft`, `scrollTop` (0.12.0) adds `formAction`, `formEncType`, `formMethod`, `formTarget`, `marginHeight`, `marginWidth` (0.12.2) adds `scoped`, `high`, `low`, `optimum`, `unselectable` (0.13.2) --- react/react-addons.d.ts | 14 ++++++++++++-- react/react-global.d.ts | 14 ++++++++++++-- react/react.d.ts | 14 ++++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/react/react-addons.d.ts b/react/react-addons.d.ts index 40693cb80..37cde636d 100644 --- a/react/react-addons.d.ts +++ b/react/react-addons.d.ts @@ -435,10 +435,16 @@ declare module "react/addons" { draggable?: boolean; encType?: string; form?: string; + formAction?: string; + formEncType?: string; + formMethod?: string; formNoValidate?: boolean; + formTarget?: string; frameBorder?: number | string; + headers?: string; height?: number | string; hidden?: boolean; + high?: number; href?: string; hrefLang?: string; htmlFor?: string; @@ -449,7 +455,10 @@ declare module "react/addons" { lang?: string; list?: string; loop?: boolean; + low?: number; manifest?: string; + marginHeight?: number; + marginWidth?: number; max?: number | string; maxLength?: number; media?: string; @@ -461,6 +470,7 @@ declare module "react/addons" { name?: string; noValidate?: boolean; open?: boolean; + optimum?: number; pattern?: string; placeholder?: string; poster?: string; @@ -474,9 +484,8 @@ declare module "react/addons" { rowSpan?: number; sandbox?: string; scope?: string; - scrollLeft?: number; + scoped?: boolean; scrolling?: string; - scrollTop?: number; seamless?: boolean; selected?: boolean; shape?: string; @@ -506,6 +515,7 @@ declare module "react/addons" { itemProp?: string; itemScope?: boolean; itemType?: string; + unselectable?: boolean; } interface SVGAttributes extends DOMAttributes { diff --git a/react/react-global.d.ts b/react/react-global.d.ts index c3fa9fc7c..5a4893862 100644 --- a/react/react-global.d.ts +++ b/react/react-global.d.ts @@ -435,10 +435,16 @@ declare module React { draggable?: boolean; encType?: string; form?: string; + formAction?: string; + formEncType?: string; + formMethod?: string; formNoValidate?: boolean; + formTarget?: string; frameBorder?: number | string; + headers?: string; height?: number | string; hidden?: boolean; + high?: number; href?: string; hrefLang?: string; htmlFor?: string; @@ -449,7 +455,10 @@ declare module React { lang?: string; list?: string; loop?: boolean; + low?: number; manifest?: string; + marginHeight?: number; + marginWidth?: number; max?: number | string; maxLength?: number; media?: string; @@ -461,6 +470,7 @@ declare module React { name?: string; noValidate?: boolean; open?: boolean; + optimum?: number; pattern?: string; placeholder?: string; poster?: string; @@ -474,9 +484,8 @@ declare module React { rowSpan?: number; sandbox?: string; scope?: string; - scrollLeft?: number; + scoped?: boolean; scrolling?: string; - scrollTop?: number; seamless?: boolean; selected?: boolean; shape?: string; @@ -506,6 +515,7 @@ declare module React { itemProp?: string; itemScope?: boolean; itemType?: string; + unselectable?: boolean; } interface SVGAttributes extends DOMAttributes { diff --git a/react/react.d.ts b/react/react.d.ts index d92279305..0b202f20e 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -435,10 +435,16 @@ declare module "react" { draggable?: boolean; encType?: string; form?: string; + formAction?: string; + formEncType?: string; + formMethod?: string; formNoValidate?: boolean; + formTarget?: string; frameBorder?: number | string; + headers?: string; height?: number | string; hidden?: boolean; + high?: number; href?: string; hrefLang?: string; htmlFor?: string; @@ -449,7 +455,10 @@ declare module "react" { lang?: string; list?: string; loop?: boolean; + low?: number; manifest?: string; + marginHeight?: number; + marginWidth?: number; max?: number | string; maxLength?: number; media?: string; @@ -461,6 +470,7 @@ declare module "react" { name?: string; noValidate?: boolean; open?: boolean; + optimum?: number; pattern?: string; placeholder?: string; poster?: string; @@ -474,9 +484,8 @@ declare module "react" { rowSpan?: number; sandbox?: string; scope?: string; - scrollLeft?: number; + scoped?: boolean; scrolling?: string; - scrollTop?: number; seamless?: boolean; selected?: boolean; shape?: string; @@ -506,6 +515,7 @@ declare module "react" { itemProp?: string; itemScope?: boolean; itemType?: string; + unselectable?: boolean; } interface SVGAttributes extends DOMAttributes { From 7b47d0c9776b0dc18ce2b0d6f5e406692309019a Mon Sep 17 00:00:00 2001 From: Vincent Siao Date: Thu, 28 May 2015 15:33:04 -0700 Subject: [PATCH 116/137] [React] Update README (0.13.3) --- react/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/react/README.md b/react/README.md index 0c773fd38..1f4cb7f03 100644 --- a/react/README.md +++ b/react/README.md @@ -1,10 +1,11 @@ -# React v0.13.0 Type Definitions +# React v0.13.3 Type Definitions This folder contains the following `.d.ts` files: -* `react-0.13.0.d.ts` declares the external module `"react"` -* `react-addons-0.13.0.d.ts` declares the external module `"react/addons"` -* `react-global-0.13.0.d.ts` declares the internal module `React` in the global namespace -* `react-addons-global-0.13.0.d.ts` extends the global `React` module with `addons` +* `react.d.ts` declares the external module `"react"` +* `react-addons.d.ts` declares the external module `"react/addons"` +* `react-global.d.ts` declares the internal module `React` in the global namespace +* `react-addons-global.d.ts` extends the global `React` module with `addons` -Interfaces are duplicated between these files; please take care to keep them in sync when making changes. See [#3615](https://github.com/borisyankov/DefinitelyTyped/pull/3615) for relevant discussion. +Interfaces are duplicated between these files; please take care to keep them in sync when making changes. +See [#3615](https://github.com/borisyankov/DefinitelyTyped/pull/3615) for relevant discussion. From 3afd16a3691da4a9be175374f127730fbf87dc7a Mon Sep 17 00:00:00 2001 From: Fabian Raetz Date: Fri, 29 May 2015 00:33:31 +0200 Subject: [PATCH 117/137] add test case for fulfilled --- chai-as-promised/chai-as-promised-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/chai-as-promised/chai-as-promised-tests.ts b/chai-as-promised/chai-as-promised-tests.ts index a2dcb72ed..95a433517 100644 --- a/chai-as-promised/chai-as-promised-tests.ts +++ b/chai-as-promised/chai-as-promised-tests.ts @@ -9,6 +9,7 @@ chai.use(chaiAsPromised); var promise: any; chai.expect(promise).to.eventually.equal(3); chai.expect(promise).to.become(3); +chai.expect(promise).to.be.fulfilled; chai.expect(promise).to.be.rejected; chai.expect(promise).to.be.rejectedWith(Error); chai.expect(promise).to.notify(() => console.log('done')); From 5b0830b61e0cd5ba8dfe37bca50e47af2d3d1575 Mon Sep 17 00:00:00 2001 From: Fabian Raetz Date: Fri, 29 May 2015 00:34:31 +0200 Subject: [PATCH 118/137] add fulfilled to Assertion --- chai-as-promised/chai-as-promised.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/chai-as-promised/chai-as-promised.d.ts b/chai-as-promised/chai-as-promised.d.ts index 6ff150eb4..106bbf41e 100644 --- a/chai-as-promised/chai-as-promised.d.ts +++ b/chai-as-promised/chai-as-promised.d.ts @@ -14,6 +14,7 @@ declare module Chai { interface Assertion { become(expected: any): Assertion; + fulfilled: Assertion; rejected: Assertion; rejectedWith(expected: any): Assertion; notify(fn: Function): Assertion; From 5294692073a4dc3c04ae971809d8bba93452ba6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20K=C3=B6nig?= Date: Fri, 29 May 2015 09:59:37 +0200 Subject: [PATCH 119/137] AngularJS 1.4 - `bindToController` object definition This commit supports using `bindToController` as an object (see: https://github.com/angular/angular.js/blob/master/CHANGELOG.md#features-9). --- angularjs/angular.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 719e84139..29dd32c68 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular JS 1.3+ +// Type definitions for Angular JS 1.4+ // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -1550,7 +1550,7 @@ declare module angular { compile?: IDirectiveCompileFn; controller?: any; controllerAs?: string; - bindToController?: boolean; + bindToController?: any; link?: IDirectiveLinkFn | IDirectivePrePost; name?: string; priority?: number; From 58d0e244a7a608835ada3382f70732b23d6f9b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20K=C3=B6nig?= Date: Fri, 29 May 2015 10:06:25 +0200 Subject: [PATCH 120/137] union type for `bindToController` --- angularjs/angular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 29dd32c68..bdb804ff2 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1550,7 +1550,7 @@ declare module angular { compile?: IDirectiveCompileFn; controller?: any; controllerAs?: string; - bindToController?: any; + bindToController?: boolean|Object; link?: IDirectiveLinkFn | IDirectivePrePost; name?: string; priority?: number; From 4b7a72361277c3c5daf95bc2f9e7e69b5f51a9ab Mon Sep 17 00:00:00 2001 From: Vadim Macagon Date: Fri, 29 May 2015 13:40:07 +0700 Subject: [PATCH 121/137] Add type definitions for pty.js --- pty.js/pty.js-tests.ts | 21 +++++++ pty.js/pty.js.d.ts | 133 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 pty.js/pty.js-tests.ts create mode 100644 pty.js/pty.js.d.ts diff --git a/pty.js/pty.js-tests.ts b/pty.js/pty.js-tests.ts new file mode 100644 index 000000000..cf73af384 --- /dev/null +++ b/pty.js/pty.js-tests.ts @@ -0,0 +1,21 @@ +/// + +import pty = require('pty.js'); + +var term: pty.Terminal = pty.spawn('bash', [], { + name: 'xterm-color', + cols: 80, + rows: 30, + cwd: process.env.HOME, + env: process.env +}); + +term.on('data', function(data: any) { + console.log(data); +}); + +term.write('ls\r'); +term.resize(100, 40); +term.write('ls /\r'); + +console.log(term.process); diff --git a/pty.js/pty.js.d.ts b/pty.js/pty.js.d.ts new file mode 100644 index 000000000..937dff0c0 --- /dev/null +++ b/pty.js/pty.js.d.ts @@ -0,0 +1,133 @@ +// Type definitions for pty.js 0.2.7-1 +// Project: https://github.com/chjj/pty.js +// Definitions by: Vadim Macagon +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'pty.js' { + /** Options that can be used when creating a new pseudo-terminal. */ + interface TerminalOptions { + name?: string; + cols?: number; + rows?: number; + cwd?: string; + env?: any; + uid?: number; + gid?: number; + } + + import stream = require('stream'); + import net = require('net'); + + export class Terminal implements stream.Stream { + /** Read-only name of the terminal. */ + name: string; + /** Read-only number of columns in the terminal. */ + cols: number; + /** Read-only number of rows in the terminal. */ + rows: number; + /** + * Read-only identifier of the spawned process associated with the slave end of the + * pseudo-terminal. This will be null if the terminal was created via [[Terminal.open]]. + */ + pid: number; + /** Read-only file descriptor of the master end of the pseudo-terminal. */ + fd: number; + /** Read-only name of the slave end of the pseudo-terminal. */ + pty: string; + /** Read-only filename of the executable associated with the slave end of the pseudo-terminal. */ + file: string; + /** Read-only name of the process associated with the slave end of the pseudo-terminal. */ + process: string; + stdout: Terminal; + /** Note that an exception will be thrown if an attempt is made to access this property. */ + stderr: Terminal; + stdin: Terminal; + socket: net.Socket; + + /** + * Creates a new pseudo-terminal, spawns a child process, and associates it with the slave + * end of the pseudo-terminal. + */ + constructor(file?: string, args?: string[], opt?: TerminalOptions); + + resize(cols?: number, rows?: number): void; + /** + * Sends a signal to the spawned process associated with the slave end of the + * pseudo-terminal (this only works if [[pid]] is not null). + */ + kill(signal?: string): void; + redraw(): void; + + // NodeJS Socket-like interface (wrappers for this.socket) + + write(data: any): boolean; + end(data: any): void; + pause(): void; + resume(): void; + setEncoding(encoding: string): void; + /** + * Closes the master end of the pseudo-terminal, and attempts to kill the spawned process + * associated with the slave end of the pseudo-terminal (but only if [[pid]] is not null). + */ + destroy(): void; + + // NodeJS Stream interface + + pipe(destination: T, options?: { end?: boolean; }): T; + + // NodeJS EventEmitter interface + + addListener(event: string, listener: Function): NodeJS.EventEmitter; + on(event: string, listener: Function): NodeJS.EventEmitter; + once(event: string, listener: Function): NodeJS.EventEmitter; + removeListener(event: string, listener: Function): NodeJS.EventEmitter; + removeAllListeners(event?: string): NodeJS.EventEmitter; + // NOTE: this method is not actually defined in pty.js + setMaxListeners(n: number): void; + listeners(event: string): Function[]; + emit(event: string, ...args: any[]): boolean; + } + + /** + * Creates a new pseudo-terminal, spawns a child process, and associates it with the slave + * end of the pseudo-terminal. + */ + export function createTerminal(file?: string, args?: string[], opt?: TerminalOptions): Terminal; + /** Alias for [[createTerminal]]. */ + export function fork(file?: string, args?: string[], opt?: TerminalOptions): Terminal; + /** Alias for [[createTerminal]]. */ + export function spawn(file?: string, args?: string[], opt?: TerminalOptions): Terminal; + /** + * Creates a new pseudo-terminal. + * This function is not available on Windows, use [[fork]] there instead. + */ + export function open(opt?: { cols?: number; rows?: number }): Terminal; + + // Internal stuff that probably isn't very useful but is exported by pty.js + export module native { + /** Unix-only. */ + export function fork( + file: string, args: string[], env: any, cwd: string, cols: number, rows: number, + uid?: number, gid?: number + ): { fd: number; pid: number; pty: string }; + /** Unix-only. */ + export function open( + cols: number, rows: number + ): { master: number; slave: number; pty: string }; + /** Unix-only. */ + export function process(fd: number, tty: string): string; + /** Windows-only. */ + export function open( + dataPipe: string, cols: number, rows: number, debug: boolean + ): { pid: number; pty: number; fd: number }; + /** Windows-only. */ + export function startProcess( + pid: number, file: string, cmdline: string, env: string[], cwd: string + ): void; + /** Windows-only. */ + export function kill(pid: number): void; + export function resize(fd: number, cols: number, rows: number): void; + } +} From 08f4725531229e124af715130d0ead425f999ee7 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Fri, 29 May 2015 11:45:53 +0100 Subject: [PATCH 122/137] Add mobile-detect type definitions --- mobile-detect/mobile-detect-tests.ts | 14 ++++++++++++++ mobile-detect/mobile-detect.d.ts | 22 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 mobile-detect/mobile-detect-tests.ts create mode 100644 mobile-detect/mobile-detect.d.ts diff --git a/mobile-detect/mobile-detect-tests.ts b/mobile-detect/mobile-detect-tests.ts new file mode 100644 index 000000000..694d3cd89 --- /dev/null +++ b/mobile-detect/mobile-detect-tests.ts @@ -0,0 +1,14 @@ +/// + +var md: MobileDetect; + +var mobie: string = md.mobile() +var phone: string = md.phone() +var tablet: string = md.tablet() +var userAgent: string = md.userAgent() +var os: string = md.os() +var isPhone: boolean = md.is('iPhone') +var bot: boolean = md.is('bot') +var version: number = md.version('Webkit') +var versionStr: string = md.versionStr('Build') +var match: boolean = md.match('playstation|xbox') \ No newline at end of file diff --git a/mobile-detect/mobile-detect.d.ts b/mobile-detect/mobile-detect.d.ts new file mode 100644 index 000000000..e6149848d --- /dev/null +++ b/mobile-detect/mobile-detect.d.ts @@ -0,0 +1,22 @@ +// Type definitions for mobile-detect v1.2.0 +// Project: http://hgoebl.github.io/mobile-detect.js/ +// Definitions by: Martin McWhorter +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + + +declare class MobileDetect { + + contructor(userAgent: string, maxPhoneWidth?: number); + + is(key: string): boolean; + match(pattern: string|RegExp): boolean + mobile(): string; + mobileGrade(): string; + os(): string; + phone(): string; + tablet(): string; + userAgent(): string; + version(value: string): number; + versionStr(value: string): string; +} From f6ce2b2a27c5aa64432700c16b87938a3fd540f0 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Fri, 29 May 2015 11:48:18 +0100 Subject: [PATCH 123/137] fix vertical whitespace --- mobile-detect/mobile-detect.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/mobile-detect/mobile-detect.d.ts b/mobile-detect/mobile-detect.d.ts index e6149848d..f37793ced 100644 --- a/mobile-detect/mobile-detect.d.ts +++ b/mobile-detect/mobile-detect.d.ts @@ -3,8 +3,6 @@ // Definitions by: Martin McWhorter // Definitions: https://github.com/borisyankov/DefinitelyTyped - - declare class MobileDetect { contructor(userAgent: string, maxPhoneWidth?: number); From 9fffdcf779c2fa49e0b6b0b1e332004d5a5026c5 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Fri, 29 May 2015 12:16:47 +0100 Subject: [PATCH 124/137] Fix tests --- mobile-detect/mobile-detect.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile-detect/mobile-detect.d.ts b/mobile-detect/mobile-detect.d.ts index f37793ced..c24b2ea67 100644 --- a/mobile-detect/mobile-detect.d.ts +++ b/mobile-detect/mobile-detect.d.ts @@ -5,7 +5,7 @@ declare class MobileDetect { - contructor(userAgent: string, maxPhoneWidth?: number); + contructor(userAgent: string, maxPhoneWidth?: number): MobileDetect; is(key: string): boolean; match(pattern: string|RegExp): boolean From 3aee09a07cbd608a23a17c6c28ae26dc51499dc9 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Fri, 29 May 2015 13:10:45 +0100 Subject: [PATCH 125/137] Fix contructor --- mobile-detect/mobile-detect-tests.ts | 2 +- mobile-detect/mobile-detect.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile-detect/mobile-detect-tests.ts b/mobile-detect/mobile-detect-tests.ts index 694d3cd89..64dbddc1a 100644 --- a/mobile-detect/mobile-detect-tests.ts +++ b/mobile-detect/mobile-detect-tests.ts @@ -1,6 +1,6 @@ /// -var md: MobileDetect; +var md: MobileDetect = new MobileDetect(window.navigator.userAgent); var mobie: string = md.mobile() var phone: string = md.phone() diff --git a/mobile-detect/mobile-detect.d.ts b/mobile-detect/mobile-detect.d.ts index c24b2ea67..180fd0664 100644 --- a/mobile-detect/mobile-detect.d.ts +++ b/mobile-detect/mobile-detect.d.ts @@ -5,7 +5,7 @@ declare class MobileDetect { - contructor(userAgent: string, maxPhoneWidth?: number): MobileDetect; + constructor(userAgent: string, maxPhoneWidth?: number); is(key: string): boolean; match(pattern: string|RegExp): boolean From dfc08933163f1e36ba0bad0390bcc2a1a4636bd3 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 29 May 2015 13:24:40 +0100 Subject: [PATCH 126/137] Update angular.d.ts - JSDoc-ed $filter --- angularjs/angular.d.ts | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 92784af38..1b12c2026 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -736,17 +736,37 @@ declare module angular { eventFn(element: Node, doneFn: () => void): Function; } - /////////////////////////////////////////////////////////////////////////// - // FilterService - // see http://docs.angularjs.org/api/ng.$filter - // see http://docs.angularjs.org/api/ng.$filterProvider - /////////////////////////////////////////////////////////////////////////// + /** + * $filter - $filterProvider - service in module ng + * + * Filters are used for formatting data displayed to the user. + * + * see https://docs.angularjs.org/api/ng/service/$filter + */ interface IFilterService { + /** + * Usage: + * $filter(name); + * + * @param name Name of the filter function to retrieve + */ (name: string): Function; } + /** + * $filterProvider - $filter - provider in module ng + * + * Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function. + * + * see https://docs.angularjs.org/api/ng/provider/$filterProvider + */ interface IFilterProvider extends IServiceProvider { - register(name: string, filterFactory: Function): IServiceProvider; + /** + * register(name); + * + * @param name Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories. Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace your filters, then you can use capitalization (myappSubsectionFilterx) or underscores (myapp_subsection_filterx). + */ + register(name: string | {}): IServiceProvider; } /////////////////////////////////////////////////////////////////////////// From 4f11e3facf42c7691ae89a55fd35bb10b8ecfc0f Mon Sep 17 00:00:00 2001 From: Arvitaly Date: Sat, 30 May 2015 23:49:38 +0300 Subject: [PATCH 127/137] Fixed ur to url for RequestResource in phantomjs --- phantomjs/phantomjs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phantomjs/phantomjs.d.ts b/phantomjs/phantomjs.d.ts index 3682024b6..0bb6af7b8 100644 --- a/phantomjs/phantomjs.d.ts +++ b/phantomjs/phantomjs.d.ts @@ -173,7 +173,7 @@ interface ResourceResponse { interface ResourceRequest { id: number; method: string; - ur: string; + url: string; time: Date; headers: { [name: string]: string; }; } From 33c089e9c0a19a94f50aaf4e2fe64fccdb4fce36 Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Sun, 31 May 2015 11:05:24 +1000 Subject: [PATCH 128/137] Update toastr.d.ts --- toastr/toastr.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toastr/toastr.d.ts b/toastr/toastr.d.ts index 2fcdc3840..321177ec2 100644 --- a/toastr/toastr.d.ts +++ b/toastr/toastr.d.ts @@ -197,3 +197,6 @@ interface Toastr { } declare var toastr: Toastr; +declare module "toastr" { + export = toastr; +} From 3e6f6339a537c569cb99bc54746d189545345485 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Abuzyarov" Date: Sun, 31 May 2015 13:48:30 +0300 Subject: [PATCH 129/137] Add Decorator definition to IModule --- angularjs/angular-tests.ts | 3 +++ angularjs/angular.d.ts | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts index 628b6d1d2..7511f3627 100644 --- a/angularjs/angular-tests.ts +++ b/angularjs/angular-tests.ts @@ -201,6 +201,9 @@ mod.constant(My.Namespace); mod.value('name', 23); mod.value('name', "23"); mod.value(My.Namespace); +mod.decorator('name', function($scope:ng.IScope){ }); +mod.decorator('name', ['$scope', function($scope: ng.IScope){ }]); + class TestProvider implements ng.IServiceProvider { constructor(private $scope: ng.IScope) { diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 457a1df35..621f0b3e5 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -384,6 +384,14 @@ declare module angular { value(name: string, value: any): IModule; value(object: Object): IModule; + /** + * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service. + * @param name The name of the service to decorate + * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to. + */ + decorator(name:string, decoratorConstructor: Function): IModule; + decorator(name:string, inlineAnnotatedConstructor: any[]): IModule; + // Properties name: string; requires: string[]; From 47ccfe38b576bc6602ac4286f9a5f7bbe46879fc Mon Sep 17 00:00:00 2001 From: Viktor Sidochenko Date: Sun, 31 May 2015 19:37:57 +0500 Subject: [PATCH 130/137] Add chrome.browser type --- chrome/chrome.d.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 23eb24bef..19d5c4d0b 100755 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -43,6 +43,37 @@ declare module chrome.alarms { var onAlarm: AlarmEvent; } +/** + * Use the chrome.browser API to interact with the Chrome browser associated with + * the current application and Chrome profile. + */ +declare module chrome.browser { + interface Options { + /** + * The URL to navigate to when the new tab is initially opened. + */ + url:string; + } + + /** + * Opens a new tab in a browser window associated with the current application + * and Chrome profile. If no browser window for the Chrome profile is opened, + * a new one is opened prior to creating the new tab. + * @param options Configures how the tab should be opened. + * @param callback Called when the tab was successfully + * created, or failed to be created. If failed, runtime.lastError will be set. + */ + export function openTab (options: Options, callback: () => void): void; + + /** + * Opens a new tab in a browser window associated with the current application + * and Chrome profile. If no browser window for the Chrome profile is opened, + * a new one is opened prior to creating the new tab. Since Chrome 42 only. + * @param options Configures how the tab should be opened. + */ + export function openTab (options: Options): void; +} + //////////////////// // Bookmarks //////////////////// From 83ea26f60b059a307c09cb0b827499a246e1fab2 Mon Sep 17 00:00:00 2001 From: satoru kimura Date: Mon, 1 Jun 2015 12:39:06 +0900 Subject: [PATCH 131/137] Updated a test code for dat-gui. --- dat-gui/dat-gui-tests.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dat-gui/dat-gui-tests.ts b/dat-gui/dat-gui-tests.ts index cd71e2471..19b34dd43 100644 --- a/dat-gui/dat-gui-tests.ts +++ b/dat-gui/dat-gui-tests.ts @@ -157,3 +157,19 @@ var FizzyText = function () { update(); } +// ------------ 11. Object Literal Tests +() => { + var obj = {a:1,b:1}; + var gui = new dat.GUI(); + var controller = gui.add(obj, 'maxSize', 0, 10); + + controller.onChange(function (value) { + // Fires on every change, drag, keypress, etc. + }); + + controller.onFinishChange(function (value) { + // Fires when a controller loses focus. + alert("The new value is " + value); + }); +} + From 480df8744d1c300751cf7225789da0f45cee3497 Mon Sep 17 00:00:00 2001 From: Horiuchi_H Date: Mon, 1 Jun 2015 16:33:43 +0900 Subject: [PATCH 132/137] add `imagemagick-native`s type definition file --- .../imagemagick-native-tests.ts | 128 ++++++++++++++++++ imagemagick-native/imagemagick-native.d.ts | 96 +++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 imagemagick-native/imagemagick-native-tests.ts create mode 100644 imagemagick-native/imagemagick-native.d.ts diff --git a/imagemagick-native/imagemagick-native-tests.ts b/imagemagick-native/imagemagick-native-tests.ts new file mode 100644 index 000000000..a1e42c6a9 --- /dev/null +++ b/imagemagick-native/imagemagick-native-tests.ts @@ -0,0 +1,128 @@ +/// +/// + +import imagemagick = require('imagemagick-native'); +import fs = require('fs'); + + +// Examples + +// * Convert formats +// Convert from one format to another with quality control: +fs.writeFileSync('after.png', imagemagick.convert({ + srcData: fs.readFileSync('before.jpg'), + format: 'PNG', + quality: 100 // (best) to 1 (worst) +})); + +// * Blur +// Blur image: +fs.writeFileSync('after.jpg', imagemagick.convert({ + srcData: fs.readFileSync('before.jpg'), + blur: 5 +})); + +// * Resize +// Resized images by specifying width and height. There are three resizing styles: +// - aspectfill: Default. The resulting image will be exactly the specified size, and may be cropped. +// - aspectfit: Scales the image so that it will not have to be cropped. +// - fill: Squishes or stretches the image so that it fills exactly the specified size. +fs.writeFileSync('after_resize.jpg', imagemagick.convert({ + srcData: fs.readFileSync('before_resize.jpg'), + width: 100, + height: 100, + resizeStyle: 'aspectfill', // is the default, or 'aspectfit' or 'fill' + gravity: 'Center' // optional: position crop area when using 'aspectfill' +})); + +// * Rotate, flip, and mirror +// Rotate and flip images, and combine the two to mirror: +fs.writeFileSync('after_rotateflip.jpg', imagemagick.convert({ + srcData: fs.readFileSync('before_rotateflip.jpg'), + rotate: 180, + flip: true +})); + + +// API Reference + +// * convert(options, [callback]) +// Convert a buffer provided as options.srcData and return a Buffer. +var options = { + srcData: fs.readFileSync('source.jpg'), + srcFormat: 'jpeg', + quality: 90, + trim: true, + trimFuzz: 0.25, + width: 100, + height: 100, + density: 96, + resizeStyle: 'aspectfill', + gravity: 'NorthWest', + format: 'png', + filter: 'Lnaczos', + blur: 3, + strip: true, + rotate: 30, + flip: true, + debug: true, + ignoreWarnings: false +}; + +imagemagick.convert(options, (err: any, buffer: Buffer) => { + // check err, use buffer +}); +fs.createReadStream('input.png') + .pipe(imagemagick.streams.convert(options)) + .pipe(fs.createWriteStream('output.png')); + + +// * identify(options, [callback]) +// Identify a buffer provided as srcData and return an object. +imagemagick.identify({ + srcData: fs.readFileSync('target.jpg'), + debug: true, + ignoreWarnings: false +}, (err: any, result: imagemagick.IIdentifyResult) => { + // check err, use result +}); + +// * quantizeColors(options) +// Quantize the image to a specified amount of colors from a buffer provided as srcData and return an array. +var colors = imagemagick.quantizeColors({ + srcData: fs.readFileSync('target.jpg'), + colors: 3, + debug: true, + ignoreWarnings: false +}); + +// * composite(options, [callback]) +// Composite a buffer provided as options.compositeData on a buffer provided as options.srcData with gravity specified by options.gravity and return a Buffer +imagemagick.composite({ + srcData: fs.readFileSync('target.jpg'), + compositeData: fs.readFileSync('composite.jpg'), + gravity: 'NorthWestGravity', + debug: true, + ignoreWarnings: false +}, (err: any, buffer: Buffer) => { + // check err, use buffer +}); + +// * getConstPixels(options) +// Get pixels of provided rectangular region. +var pixels = imagemagick.getConstPixels({ + srcData: fs.readFileSync('target.jpg'), + x: 0, + y: 0, + columns: 1, + rows: 1 +}); + +// * quantumDepth +// Return ImageMagick's QuantumDepth, which is defined in compile time. +var depth: number = imagemagick.quantumDepth(); + +// * version +// Return ImageMagick's version as string. +var version: string = imagemagick.version(); + diff --git a/imagemagick-native/imagemagick-native.d.ts b/imagemagick-native/imagemagick-native.d.ts new file mode 100644 index 000000000..c69cd6d8d --- /dev/null +++ b/imagemagick-native/imagemagick-native.d.ts @@ -0,0 +1,96 @@ +// Type definitions for imagemagick-native 1.7.0 +// Project: https://www.npmjs.org/package/imagemagick-native +// Definitions by: Hiroki Horiuchi +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "imagemagick-native" { + + import stream = require('stream'); + export module streams { + export function convert(options: IConvertOptions): stream.Transform; + } + + function convert(options: IConvertOptions): Buffer; + function convert(options: IConvertOptions, callback: (err: any, result: Buffer) => void): void; + function identify(options: IIdentifyOptions): IIdentifyResult; + function identify(options: IIdentifyOptions, callback: (err: any, result: IIdentifyResult) => void): void; + function quantizeColors(options: IQuantizeColorsOptions): IQuantizeColorsItem[]; + function composite(options: ICompositeOptions): Buffer; + function composite(options: ICompositeOptions, callback: (err: any, result: Buffer) => void): void; + function getConstPixels(options: IConstPixelsOptions): IConstPixelsItem[]; + function quantumDepth(): number; + function version(): string; + + export interface IConvertOptions { + srcData: Buffer; + srcFormat?: string; + quality?: number; + trim?: boolean; + trimFuzz?: number; + width?: number; + height?: number; + density?: number; + resizeStyle?: string; + gravity?: string; + format?: string; + filter?: string; + blur?: number; + strip?: boolean; + rotate?: number; + flip?: boolean; + debug?: boolean; + ignoreWarnings?: boolean; + } + export interface IIdentifyOptions { + srcData: Buffer; + debug?: boolean; + ignoreWarnings?: boolean; + } + export interface IIdentifyResult { + format: string; + width: number; + height: number; + depth: number; + density : { + width : number; + height : number; + }; + exif: { + orientation: number; // 0 if none exists or e.g. 3 (portrait iPad pictures) + }; + } + export interface IQuantizeColorsOptions { + srcData: Buffer; + colors: number; + debug?: boolean; + ignoreWarnings?: boolean; + } + export interface IQuantizeColorsItem { + r: number; + g: number; + b: number; + hex: string; + } + export interface ICompositeOptions { + srcData: Buffer; + compositeData: Buffer; + gravity?: string; + debug?: boolean; + ignoreWarnings?: boolean; + } + export interface IConstPixelsOptions { + srcData: Buffer; + x: number; + y: number; + columns: number; + rows: number; + } + export interface IConstPixelsItem { + red: number; + green: number; + blue: number; + opacity: number; + } + +} + From a5db8a65cad22c7b4c9025aa56d93aa0f14eb5fb Mon Sep 17 00:00:00 2001 From: Horiuchi_H Date: Mon, 1 Jun 2015 16:40:50 +0900 Subject: [PATCH 133/137] add reference to `node.d.ts` --- imagemagick-native/imagemagick-native.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imagemagick-native/imagemagick-native.d.ts b/imagemagick-native/imagemagick-native.d.ts index c69cd6d8d..e848fa32a 100644 --- a/imagemagick-native/imagemagick-native.d.ts +++ b/imagemagick-native/imagemagick-native.d.ts @@ -3,6 +3,8 @@ // Definitions by: Hiroki Horiuchi // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// + declare module "imagemagick-native" { import stream = require('stream'); From eb24f0b44e302d0a40e0b9eeac89b16346001e37 Mon Sep 17 00:00:00 2001 From: Horiuchi_H Date: Mon, 1 Jun 2015 17:33:27 +0900 Subject: [PATCH 134/137] fix `convert` options on stream version --- .../imagemagick-native-tests.ts | 6 +++++- imagemagick-native/imagemagick-native.d.ts | 21 ++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/imagemagick-native/imagemagick-native-tests.ts b/imagemagick-native/imagemagick-native-tests.ts index a1e42c6a9..efefba8ee 100644 --- a/imagemagick-native/imagemagick-native-tests.ts +++ b/imagemagick-native/imagemagick-native-tests.ts @@ -73,7 +73,11 @@ imagemagick.convert(options, (err: any, buffer: Buffer) => { // check err, use buffer }); fs.createReadStream('input.png') - .pipe(imagemagick.streams.convert(options)) + .pipe(imagemagick.streams.convert({ + quality: 75, + width: 160, + height: 160 + })) .pipe(fs.createWriteStream('output.png')); diff --git a/imagemagick-native/imagemagick-native.d.ts b/imagemagick-native/imagemagick-native.d.ts index e848fa32a..fbf213f68 100644 --- a/imagemagick-native/imagemagick-native.d.ts +++ b/imagemagick-native/imagemagick-native.d.ts @@ -9,7 +9,7 @@ declare module "imagemagick-native" { import stream = require('stream'); export module streams { - export function convert(options: IConvertOptions): stream.Transform; + export function convert(options: IStreamConvertOptions): stream.Transform; } function convert(options: IConvertOptions): Buffer; @@ -23,6 +23,25 @@ declare module "imagemagick-native" { function quantumDepth(): number; function version(): string; + export interface IStreamConvertOptions { + srcFormat?: string; + quality?: number; + trim?: boolean; + trimFuzz?: number; + width?: number; + height?: number; + density?: number; + resizeStyle?: string; + gravity?: string; + format?: string; + filter?: string; + blur?: number; + strip?: boolean; + rotate?: number; + flip?: boolean; + debug?: boolean; + ignoreWarnings?: boolean; + } export interface IConvertOptions { srcData: Buffer; srcFormat?: string; From 93a0bd7d5083d63eb5ac702ee9081fa5032f018e Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Tue, 2 Jun 2015 10:21:55 +0100 Subject: [PATCH 135/137] Added Navigation typings and tests --- navigation/navigation-tests.ts | 117 +++++ navigation/navigation.d.ts | 847 +++++++++++++++++++++++++++++++++ 2 files changed, 964 insertions(+) create mode 100644 navigation/navigation-tests.ts create mode 100644 navigation/navigation.d.ts diff --git a/navigation/navigation-tests.ts b/navigation/navigation-tests.ts new file mode 100644 index 000000000..e0871a267 --- /dev/null +++ b/navigation/navigation-tests.ts @@ -0,0 +1,117 @@ +/// + +// History Manager +class LogHistoryManager extends Navigation.HashHistoryManager { + addHistory(state: Navigation.State, url: string) { + console.log('add history'); + super.addHistory(state, url); + } +} + +// State Router +class LogStateRouter extends Navigation.StateRouter { + getData(route: string): { state: Navigation.State; data: any } { + console.log('get data'); + return super.getData(route); + } +} + +// Settings +Navigation.settings.router = new LogStateRouter(); +Navigation.settings.historyManager = new LogHistoryManager(); +Navigation.settings.stateIdKey = 'state'; + +// Configuration +Navigation.StateInfoConfig.build([ + { key: 'home', initial: 'page', states: [ + { key: 'page', route: '' } + ]}, + { key: 'person', initial: 'list', states: [ + { key: 'list', route: 'people/{page}', transitions: [ + { key: 'select', to: 'details' } + ], defaults: { page: 1 }, trackCrumbTrail: false }, + { key: 'details', route: 'person/{id}', defaultTypes: { id: 'number' } } + ]} +]); + +// StateInfo +var dialogs = Navigation.StateInfoConfig.dialogs; +var home = dialogs['home']; +var homePage = home.states['page']; +var homeKey = home.key; +var homePageKey = homePage.key; +homePage = home.initial; +var person = dialogs['person']; +var personList = person.states['list']; +var personDetails = person.states['details']; +var personListSelect = personList.transitions['select']; +personList = personListSelect.parent; +personDetails = personListSelect.to; +var pageDefault = personList.defaults.page; +var idDefaultType = personDetails.defaultTypes.id; + +// StateNavigator +personList.dispose = () => {}; +personList.navigating = (data, url, navigate) => { + navigate(); +}; +personList.navigated = (data) => {}; + +// State Handler +class LogStateHandler extends Navigation.StateHandler { + getNavigationData(state: Navigation.State, url: string): any { + console.log('get navigation data'); + super.getNavigationData(state, url); + } +} +homePage.stateHandler = new LogStateHandler(); +personList.stateHandler = new LogStateHandler(); +personDetails.stateHandler = new LogStateHandler(); + +// Navigation Event +var navigationListener = +(oldState: Navigation.State, state: Navigation.State, data: any) => { + Navigation.StateController.offNavigate(navigationListener); +}; +Navigation.StateController.onNavigate(navigationListener); + +// Navigation +Navigation.start('home'); +Navigation.StateController.navigate('person'); +Navigation.StateController.refresh(); +Navigation.StateController.refresh({ page: 2 }); +Navigation.StateController.navigate('select', { id: 10 }); +var canGoBack: boolean = Navigation.StateController.canNavigateBack(1); +Navigation.StateController.navigateBack(1); + +// Navigation Link +var link = Navigation.StateController.getNavigationLink('person'); +link = Navigation.StateController.getRefreshLink(); +link = Navigation.StateController.getRefreshLink({ page: 2 }); +link = Navigation.StateController.getNavigationLink('select', { id: 10 }); +var nextDialog = Navigation.StateController.getNextState('select').parent; +person = nextDialog; +Navigation.StateController.navigateLink(link); +link = Navigation.StateController.getNavigationBackLink(1); +var crumb = Navigation.StateController.crumbs[0]; +link = crumb.navigationLink; + +// StateContext +Navigation.StateController.navigate('home'); +Navigation.StateController.navigate('person'); +home = Navigation.StateContext.previousDialog; +homePage = Navigation.StateContext.previousState; +person === Navigation.StateContext.dialog; +personList === Navigation.StateContext.state; +var url: string = Navigation.StateContext.url; +var page: number = Navigation.StateContext.data.page; + +// Navigation Data +Navigation.StateController.refresh({ page: 2 }); +var data = Navigation.StateContext.includeCurrentData({ sort: 'name' }, ['page']); +Navigation.StateController.refresh(data); +Navigation.StateContext.clear('sort'); +var data = Navigation.StateContext.includeCurrentData({ pageSize: 10 }); +Navigation.StateController.refresh(data); +Navigation.StateContext.clear(); +Navigation.StateController.refresh(); diff --git a/navigation/navigation.d.ts b/navigation/navigation.d.ts new file mode 100644 index 000000000..7cb830897 --- /dev/null +++ b/navigation/navigation.d.ts @@ -0,0 +1,847 @@ +// Type definitions for Navigation 1.0 +// Project: http://grahammendick.github.io/navigation/ +// Definitions by: Graham Mendick +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module 'navigation' { + export = Navigation; +} + +declare module Navigation { + /** + * Defines a contract a class must implement in order to represent a + * logical grouping of child State elements. Navigating across different + * dialogs will initialise the crumb trail + */ + interface IDialog { + /** + * Gets the State children + */ + states: TStates; + /** + * Gets the state to navigate to if the Key is passed as an action + * parameter to the StateController + */ + initial: TState; + /** + * Gets the key, unique across dialogs, which is passed as the action + * parameter to the StateController when navigating + */ + key: string; + /** + * Gets the textual description of the dialog + */ + title?: string; + } + + /** + * Defines a contract a class must implement in order to configure state + * information. A child of a Dialog element, it represents the endpoint of + * a navigation + */ + interface IState { + /** + * Gets the Transition children + */ + transitions?: TTransitions; + /** + * Gets the key, unique within a Parent, used by Dialog and Transition + * elements to specify navigation configuration + */ + key: string; + /** + * Gets the default NavigationData for this State + */ + defaults?: any; + /** + * Gets the default NavigationData Types for this State + */ + defaultTypes?: any; + /** + * Gets the textual description of the state + */ + title?: string; + /** + * Gets the route Url pattern + */ + route: string; + /** + * Gets a value that indicates whether to maintain crumb trail + * information e.g PreviousState. This can be used together with Route + * to produce user friendly Urls + */ + trackCrumbTrail?: boolean; + } + + /** + * Defines a contract a class must implement in order to configure + * transition information. A child of a State element it represents a + * possible navigation from its Parent to a sibling State + */ + interface ITransition { + /** + * Gets the state to navigate to if the Key is passed as an action + * parameter to the StateController + */ + to: TState; + /** + * Gets the key, unique within a Parent, which is passed as the action + * parameter to the StateController when navigating + */ + key: string; + } + + /** + * Configures dialog information. Represents a logical grouping of child + * State elements. Navigating across different dialogs will initialise the + * crumb trail + */ + class Dialog implements IDialog { + /** + * Gets the State children by index + */ + _states: State[]; + /** + * Gets the State children + */ + states: { + [index: string]: State; + }; + /** + * Gets the number of the dialog + */ + index: number; + /** + * Gets the state to navigate to if the Key is passed as an action + * parameter to the StateController + */ + initial: State; + /** + * Gets the key, unique across dialogs, which is passed as the action + * parameter to the StateController when navigating + */ + key: string; + /** + * Gets the textual description of the dialog + */ + title: string; + } + + /** + * Configures state information. A child of a Dialog element, it + * represents the endpoint of a navigation + */ + class State implements IState<{ [index: string]: Transition; }> { + /** + * Gets the Transition children by index + */ + _transitions: Transition[]; + /** + * Gets the Transition children + */ + transitions: { + [index: string]: Transition; + }; + /** + * Gets the parent Dialog configuration item + */ + parent: Dialog; + /** + * Gets the number of the state within its Parent + */ + index: number; + /** + * Gets the unique identifier for this State + */ + id: string; + /** + * Gets the key, unique within a Parent, used by Dialog and Transition + * elements to specify navigation configuration + */ + key: string; + /** + * Gets the default NavigationData for this State + */ + defaults: any; + /** + * Gets the default NavigationData Types for this State + */ + defaultTypes: any; + /** + * Gets the formatted default NavigationData for this State + */ + formattedDefaults: any; + /** + * Gets the textual description of the state + */ + title: string; + /** + * Gets the route Url pattern + */ + route: string; + /** + * Gets a value that indicates whether to maintain crumb trail + * information e.g PreviousState. This can be used together with Route + * to produce user friendly Urls + */ + trackCrumbTrail: boolean; + /** + * Gets or sets the IStateHandler responsible for building and parsing + * avigation links to this State + */ + stateHandler: IStateHandler; + /** + * Called on the old State (this is not the same as the previous + * State) after navigating to a different State + */ + dispose: () => void; + /** + * Called on the current State after navigating to it + * @param data The current NavigationData + */ + navigated: (data: any) => void; + /** + * Called on the new State before navigating to it + * @param data The new NavigationData + * @param url The new target location + * @param navigate The function to call to continue to navigate + */ + navigating: (data: any, url: string, navigate: () => void) => void; + } + + /** + * Configures transition information. A child of a State element it + * represents a possible navigation from its Parent to a sibling State + */ + class Transition implements ITransition { + /** + * Gets the state to navigate to if the Key is passed as an action + * parameter to the StateController + */ + to: State; + /** + * Gets the parent State configuration item + */ + parent: State; + /** + * Gets the number of the transition within its Parent + */ + index: number; + /** + * Gets the key, unique within a Parent, which is passed as the action + * parameter to the StateController when navigating + */ + key: string; + } + + /** + * Provides static access to the Dialog, State and Transition configuration + */ + class StateInfoConfig { + /** + * Gets a collection of Dialog information, by index, with their child + * State information and grandchild Transition information + */ + static _dialogs: Dialog[]; + /** + * Gets a collection of Dialog information with their child State + * information and grandchild Transition information + */ + static dialogs: { + [index: string]: Dialog; + }; + /** + * Builds the Dialog, State and Transition configuration + * @param dialogs A collection of Dialog information with their child + * State information and grandchild Transition information + */ + static build(dialogs: IDialog[]>[]>[]): void; + } + + /** + * Defines a contract a class must implement in order to manage the browser + * Url + */ + interface IHistoryManager { + /** + * Gets or sets a value indicating whether to disable browser history + */ + disabled: boolean; + /** + * Registers browser history event listeners + */ + init(): any; + /** + * Adds browser history + * @param state The State navigated to + * @param url The current url + */ + addHistory(state: State, url: string): void; + /** + * Gets the current location + */ + getCurrentUrl(): string; + /** + * Gets an Href from the url + */ + getHref(url: string): string; + /** + * Gets a Url from the anchor + */ + getUrl(anchor: HTMLAnchorElement): string; + } + + /** + * Manages history using the browser Url's hash. If used in a browser + * without the hashchange event or outside of a browser environment, then + * history is disabled + */ + class HashHistoryManager implements IHistoryManager { + /** + * Gets or sets a value indicating whether to disable browser history. + * Set to true if used in a browser without the hashchange event or + * outside of a browser environment + */ + disabled: boolean; + /** + * Gets or sets a value indicating whether to use '#' in place of '?' + * in Urls. Set to true for Internet explorer 6 and 7 support + */ + replaceQueryIdentifier: boolean; + /** + * Registers a listener for the hashchange event + */ + init(): void; + /** + * Sets the browser Url's hash to the url + * @param state The State navigated to + * @param url The current url + */ + addHistory(state: State, url: string): void; + /** + * Gets the current location + */ + getCurrentUrl(): string; + /** + * Gets an Href from the url + */ + getHref(url: string): string; + /** + * Gets a Url from the anchor + */ + getUrl(anchor: HTMLAnchorElement): string; + } + + /** + * Manages history using the HTML5 history api. If used in a browser + * without the HTML5 history api or outside of a browser environment, then + * history is disabled + */ + class HTML5HistoryManager implements IHistoryManager { + /** + * Gets or sets a value indicating whether to disable browser history. + * Set to true if used in a browser without the HTML5 history api or + * outside of a browser environment + */ + disabled: boolean; + /** + * Registers a listener for the popstate event + */ + init(): void; + /** + * Sets the browser Url to the url using pushState + * @param state The State navigated to + * @param url The current url + */ + addHistory(state: State, url: string): void; + /** + * Gets the current location + */ + getCurrentUrl(): string; + /** + * Gets an Href from the url + */ + getHref(url: string): string; + /** + * Gets a Url from the anchor + */ + getUrl(anchor: HTMLAnchorElement): string; + } + + /** + * Defines a contract a class must implement in order to build and parse + * navigation links + */ + interface IStateHandler { + /** + * Gets a link that navigates to the state passing the data + * @param state The State to navigate to + * @param data The data to pass when navigating + * @returns The navigation link + */ + getNavigationLink(state: State, data: any): string; + /** + * Navigates to the url + * @param oldState The current State + * @param state The State to navigate to + * @param url The target location + */ + navigateLink(oldState: State, state: State, url: string): void; + /** + * Gets the data parsed from the url + * @param state The State navigated to + * @param url The current url + * @returns The navigation data + */ + getNavigationData(state: State, url: string): any; + /** + * Truncates the crumb trail + * @param The State navigated to + * @param The Crumb collection representing the crumb trail + * @returns Truncated crumb trail + */ + truncateCrumbTrail(state: State, crumbs: Crumb[]): Crumb[]; + } + + /** + * Represents one piece of the crumb trail and holds the information need + * to return to and recreate the State as previously visited. In a single + * crumb trail no two crumbs can have the same State but all must have the + * same Dialog + */ + class Crumb { + /** + * Gets the Context Data held at the time of navigating away from this + * State + */ + data: any; + /** + * Gets the configuration information associated with this navigation + */ + state: State; + /** + * Gets a value indicating whether the Crumb is the last in the crumb + * trail + */ + last: boolean; + /** + * Gets the State Title + */ + title: string; + /** + * Gets the hyperlink navigation to return to the State and pass the + * associated Data + */ + navigationLink: string; + /** + * Initializes a new instance of the Crumb class + */ + constructor(data: any, state: State, link: string, last: boolean); + } + + /** + * Provides access to the Navigation Settings configuration + */ + class NavigationSettings { + router: IRouter; + historyManager: IHistoryManager; + /** + * Gets or sets the key that identifies the StateId + */ + stateIdKey: string; + /** + * Gets or sets the key that identifies the PreviousStateId + */ + previousStateIdKey: string; + /** + * Gets or sets the key that identifies the ReturnData + */ + returnDataKey: string; + /** + * Gets or sets the key that identifies the CrumbTrail + */ + crumbTrailKey: string; + /** + * Gets or sets the application path + */ + applicationPath: string; + } + + /** + * Provides static properties for accessing context sensitive navigation + * information. Holds the current State and NavigationData. Also holds the + * previous State (this is not the same as the previous Crumb) + */ + class StateContext { + /** + * Gets the State navigated away from to reach the current State + */ + static previousState: State; + /** + * Gets the parent of the PreviousState property + */ + static previousDialog: Dialog; + /** + * Gets the current State + */ + static state: State; + /** + * Gets the parent of the State property + */ + static dialog: Dialog; + /** + * Gets the NavigationData for the current State. It can be accessed. + * Will become the data stored in a Crumb when part of a crumb trail + */ + static data: any; + /** + * Gets the current Url + */ + static url: string; + /** + * Combines the data with all the current NavigationData + * @param The data to add to the current NavigationData + * @returns The combined data + */ + static includeCurrentData(data: any): any; + /** + * Combines the data with a subset of the current NavigationData + * @param The data to add to the current NavigationData + * @returns The combined data + */ + static includeCurrentData(data: any, keys: string[]): any; + /** + * Removes all items from the NavigationData + */ + static clear(): void; + /** + * Removes a single item from the NavigationData + * @param The key of the item to remove + */ + static clear(key: string): void; + } + + /** + * Manages all navigation. These can be forward using an action parameter; + * backward via a Crumb; or refreshing the current State + */ + class StateController { + /** + * Gets a Crumb collection representing the crumb trail, ordered oldest + * Crumb first + */ + static crumbs: Crumb[]; + /** + * Sets the Context Data with the data returned from the current + * State's IStateHandler + * @param state The current State + * @param url The current Url + */ + static setStateContext(state: State, url: string): void; + /** + * Registers a navigate event listener + * @param handler The navigate event listener + */ + static onNavigate(handler: (oldState: State, state: State, data: any) => void): void; + /** + * Unregisters a navigate event listener + * @param handler The navigate event listener + */ + static offNavigate(handler: (oldState: State, state: State, data: any) => void): void; + /** + * Navigates to a State. Depending on the action will either navigate + * to the 'to' State of a Transition or the 'initial' State of a + * Dialog. It passes no NavigationData + * @param action The key of a child Transition or the key of a Dialog + * @throws action does not match the key of a child Transition or the + * key of a Dialog; or there is NavigationData that cannot be converted + * to a String + * @throws A mandatory route parameter has not been supplied a value + */ + static navigate(action: string): void; + /** + * Navigates to a State. Depending on the action will either navigate + * to the 'to' State of a Transition or the 'initial' State of a + * Dialog + * @param action The key of a child Transition or the key of a Dialog + * @param toData The NavigationData to be passed to the next State and + * stored in the StateContext + * @throws action does not match the key of a child Transition or the + * key of a Dialog; or there is NavigationData that cannot be converted + * to a String + * @throws A mandatory route parameter has not been supplied a value + */ + static navigate(action: string, toData: any): void; + /** + * Gets a Url to navigate to a State. Depending on the action will + * either navigate to the 'to' State of a Transition or the 'initial' + * State of a Dialog. It passes no NavigationData + * @param action The key of a child Transition or the key of a Dialog + * @returns Url that will navigate to State specified in the action + * @throws action does not match the key of a child Transition or the + * key of a Dialog; or there is NavigationData that cannot be converted + * to a String + */ + static getNavigationLink(action: string): string; + /** + * Gets a Url to navigate to a State. Depending on the action will + * either navigate to the 'to' State of a Transition or the 'initial' + * State of a Dialog + * @param action The key of a child Transition or the key of a Dialog + * @param toData The NavigationData to be passed to the next State and + * stored in the StateContext + * @returns Url that will navigate to State specified in the action + * @throws action does not match the key of a child Transition or the + * key of a Dialog; or there is NavigationData that cannot be converted + * to a String + */ + static getNavigationLink(action: string, toData: any): string; + /** + * Determines if the distance specified is within the bounds of the + * crumb trail represented by the Crumbs collection + */ + static canNavigateBack(distance: number): boolean; + /** + * Navigates back to the Crumb contained in the crumb trail, + * represented by the Crumbs collection, as specified by the distance. + * In the crumb trail no two crumbs can have the same State but all + * must have the same Dialog + * @param distance Starting at 1, the number of Crumb steps to go back + * @throws canNavigateBack returns false for this distance + * @throws A mandatory route parameter has not been supplied a value + */ + static navigateBack(distance: number): void; + /** + * Gets a Url to navigate to a Crumb contained in the crumb trail, + * represented by the Crumbs collection, as specified by the distance. + * In the crumb trail no two crumbs can have the same State but all + * must have the same Dialog + * @param distance Starting at 1, the number of Crumb steps to go back + * @throws canNavigateBack returns false for this distance + */ + static getNavigationBackLink(distance: number): string; + /** + * Navigates to the current State passing no NavigationData + * @throws A mandatory route parameter has not been supplied a value + */ + static refresh(): void; + /** + * Navigates to the current State + * @param toData The NavigationData to be passed to the current State + * and stored in the StateContext + * @throws There is NavigationData that cannot be converted to a String + * @throws A mandatory route parameter has not been supplied a value + */ + static refresh(toData: any): void; + /** + * Gets a Url to navigate to the current State passing no + * NavigationData + */ + static getRefreshLink(): string; + /** + * Gets a Url to navigate to the current State + * @param toData The NavigationData to be passed to the current State + * and stored in the StateContext + * @returns Url that will navigate to the current State + * @throws There is NavigationData that cannot be converted to a String + */ + static getRefreshLink(toData: any): string; + /** + * Navigates to the url + * @param url The target location + */ + static navigateLink(url: string): void; + /** + * Gets the next State. Depending on the action will either return the + * 'to' State of a Transition or the 'initial' State of a Dialog + * @param action The key of a child Transition or the key of a Dialog + * @throws action does not match the key of a child Transition or the + * key of a Dialog + */ + static getNextState(action: string): State; + } + + /** + * Implementation of IStateHandler that builds and parses navigation links + */ + class StateHandler implements IStateHandler { + /** + * Gets a link that navigates to the state passing the data + * @param state The State to navigate to + * @param data The data to pass when navigating + * @returns The navigation link + */ + getNavigationLink(state: State, data: any): string; + /** + * Navigates to the url + * @param oldState The current State + * @param state The State to navigate to + * @param url The target location + */ + navigateLink(oldState: State, state: State, url: string): void; + /** + * Gets the data parsed from the url + * @param state The State navigated to + * @param url The current url + * @returns The navigation data + */ + getNavigationData(state: State, url: string): any; + /** + * Truncates the crumb trail whenever a repeated or initial State is + * encountered + * @param The State navigated to + * @param The Crumb collection representing the crumb trail + * @returns Truncated crumb trail + */ + truncateCrumbTrail(state: State, crumbs: Crumb[]): Crumb[]; + } + + /** + * Defines a contract a class must implement in order build and parse + * State routes + */ + interface IRouter { + /** + * Gets the matching State and data for the route + * @param route The route to match + * @returns The matched State and data + */ + getData(route: string): { state: State; data: any; }; + /** + * Gets the matching route and data for the state and data + * @param The state to match + * @param The data to match + * @returns The matched route and data + */ + getRoute(state: State, data: any): { route: string; data: any; }; + /** + * Gets or sets a value indicating whether the route matching supports + * default parameter values + */ + supportsDefaults: boolean; + /** + * Registers all route configuration information + * @param dialogs Collection of Dialogs with their child State route + * information + */ + addRoutes(dialogs: Dialog[]): void; + } + + /** + * Implementation of IRouter that builds and parses State routes using the + * Navigation Router + */ + class StateRouter implements IRouter { + /** + * Gets the underlying Navigation Router + */ + router: Router; + /** + * Gets true, indicating the underlying Navigation Router supports + * defaults + */ + supportsDefaults: boolean; + /** + * Gets the matching State and data for the route + * @param route The route to match + * @returns The matched State and data + */ + getData(route: string): { state: State; data: any; }; + /** + * Gets the matching route and data for the state and data + * @param The state to match + * @param The data to match + * @returns The matched route and data + */ + getRoute(state: State, data: any): { route: string; data: any; }; + /** + * Registers all route configuration information with the underlying + * Navigation Router + * @param dialogs Collection of Dialogs with their child State route + * information + */ + addRoutes(dialogs: Dialog[]): void; + } + + /** + * Holds information about a route + */ + class Route { + /** + * Gets the path pattern of a route + */ + path: string; + /** + * Gets the default parameter values + */ + defaults: any; + /** + * Gets the list of parameters + */ + params: { name: string; optional: boolean; }[]; + /** + * Initializes a new instance of the Route class + * @param path The route pattern + */ + constructor(path: string); + /** + * Initializes a new instance of the Route class + * @param path The route pattern + * @param defaults The default parameter values + */ + constructor(path: string, defaults: any); + /** + * Gets the matching data for the path + * @param path The path to match + * @returns The matched data or null if there's no match + */ + match(path: string): any; + /** + * Gets the route populated with default values + * @returns The built route + */ + build(): string; + /** + * Gets the route populated with data and default values + * @param The data for the route parameters + * @returns The built route + */ + build(data: any): string; + } + + /** + * The default Navigation router implementation + */ + class Router { + /** + * Registers a route + * @param path The route path + * @returns The parsed Route + */ + addRoute(path: string): Route; + /** + * Registers a route with default parameters + * @param path The route path + * @param defaults The route parameter defaults + * @returns The parsed Route + */ + addRoute(path: string, defaults: any): Route; + /** + * Gets the matching route and data for the path + * @param route The path to match + * @returns The matched route and data + */ + match(path: string): { route: Route; data: any; }; + } + + /** + * Gets the Navigation settings + */ + export var settings: NavigationSettings; + + /** + * Initializes the history manager and navigates to the current location. + * If used outside of a browser environment, pass in the Url to navigate to + * @param url If used outside of a browser, the url to navigate to + */ + export var start: (url?: string) => void; +} \ No newline at end of file From a89eb5c302cd3faa50844a0ed677941e510b9623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20H=C3=A4berle?= Date: Tue, 2 Jun 2015 20:12:44 +0200 Subject: [PATCH 136/137] Fixed typing issu --- wolfy87-eventemitter/wolfy87-eventemitter-test.ts | 2 +- wolfy87-eventemitter/wolfy87-eventemitter.d.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfy87-eventemitter/wolfy87-eventemitter-test.ts b/wolfy87-eventemitter/wolfy87-eventemitter-test.ts index adef23a39..d2d4e6f0c 100644 --- a/wolfy87-eventemitter/wolfy87-eventemitter-test.ts +++ b/wolfy87-eventemitter/wolfy87-eventemitter-test.ts @@ -1,6 +1,6 @@ /// -//import EventEmitter = require("wolfy87-eventemitter"); +import EventEmitter = require("wolfy87-eventemitter"); var emitter = new EventEmitter(); diff --git a/wolfy87-eventemitter/wolfy87-eventemitter.d.ts b/wolfy87-eventemitter/wolfy87-eventemitter.d.ts index 59c17284a..95cf32ea7 100644 --- a/wolfy87-eventemitter/wolfy87-eventemitter.d.ts +++ b/wolfy87-eventemitter/wolfy87-eventemitter.d.ts @@ -505,8 +505,9 @@ declare module Wolfy87EventEmitter { } declare module "wolfy87-eventemitter" { + class EventEmitter extends Wolfy87EventEmitter.EventEmitter {} export = EventEmitter; } -declare var EventEmitter: typeof Wolfy87EventEmitter.EventEmitter; +//declare var EventEmitter: typeof Wolfy87EventEmitter.EventEmitter; From eb7a5d41278dfee57bb8bb4ddb325b39c0e745d1 Mon Sep 17 00:00:00 2001 From: Horiuchi_H Date: Wed, 3 Jun 2015 10:31:30 +0900 Subject: [PATCH 137/137] add `delete` method --- superagent/superagent-tests.ts | 4 ++++ superagent/superagent.d.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/superagent/superagent-tests.ts b/superagent/superagent-tests.ts index 436874aaf..eaefbf473 100644 --- a/superagent/superagent-tests.ts +++ b/superagent/superagent-tests.ts @@ -52,6 +52,10 @@ request .del('/user/1') .end(callback); +request + .delete('/user/1') + .end(callback); + request('/search') .end(callback); diff --git a/superagent/superagent.d.ts b/superagent/superagent.d.ts index ef477e16a..6944fcceb 100644 --- a/superagent/superagent.d.ts +++ b/superagent/superagent.d.ts @@ -26,6 +26,7 @@ declare module "superagent" { put(url: string, callback?: CallbackHandler): Req; head(url: string, callback?: CallbackHandler): Req; del(url: string, callback?: CallbackHandler): Req; + delete(url: string, callback?: CallbackHandler): Req; options(url: string, callback?: CallbackHandler): Req; trace(url: string, callback?: CallbackHandler): Req; copy(url: string, callback?: CallbackHandler): Req;