-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-heatmap-docs
- Loading branch information
Showing
104 changed files
with
16,356 additions
and
6,927 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
src/vgl/** | ||
src/version.js | ||
src/sha.js | ||
src/util/wigglemaps.js | ||
src/util/distanceGrid.js | ||
dist/** | ||
testing/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"title": "Isolines", | ||
"exampleJs": ["main.js"], | ||
"about": { | ||
"text": "This example shows how to add isolines to a map." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Run after the DOM loads | ||
$(function () { | ||
'use strict'; | ||
|
||
// Create a map object with the OpenStreetMaps base layer. | ||
var map = geo.map({ | ||
node: '#map', | ||
center: { | ||
x: -157.965, | ||
y: 21.482 | ||
}, | ||
zoom: 11 | ||
}); | ||
|
||
// Add a faint osm layer | ||
map.createLayer('osm', {opacity: 0.5}); | ||
|
||
// Create a feature layer that supports contours | ||
var isolineLayer = map.createLayer('feature', { | ||
features: ['isoline'] | ||
}); | ||
|
||
// Load the data | ||
$.get('../../data/oahu-dense.json').done(function (data) { | ||
// Create an isoline feature | ||
var iso = isolineLayer.createFeature('isoline', { | ||
isoline: { | ||
// Specify our grid data | ||
gridWidth: data.gridWidth, | ||
gridHeight: data.gridHeight, | ||
x0: data.x0, | ||
y0: data.y0, | ||
dx: data.dx, | ||
dy: data.dy, | ||
// Don't plot any values less than zero | ||
min: 0, | ||
// Create a contour line every 50 meters | ||
spacing: 50, | ||
// Make every 4th line heavier and every 4*5 = 20th line heavier yet | ||
levels: [4, 5] | ||
}, | ||
style: { | ||
// The data uses -9999 to represent no value; modify it to return null | ||
// instead. | ||
value: function (d) { return d > -9999 ? d : null; }, | ||
// level relates to the isoline importance, with 0 being the most | ||
// common and, using the levels specified, a level of 1 being every | ||
// fourth, and 2 every twentieth line. Color the lines differently | ||
// depending on the level | ||
strokeColor: function (v, vi, d) { | ||
return ['grey', 'mediumblue', 'blue'][d.level]; | ||
} | ||
} | ||
}).data(data.values).draw(); | ||
// Make some values available in the global context so curious people can | ||
// play with them. | ||
window.example = { | ||
map: map, | ||
isolineLayer: isolineLayer, | ||
iso: iso | ||
}; | ||
}); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.