Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@

# jsdoc linting updates
f39996085682acc91ef3474bb2c3732dd9646c04
# linting updates
f5a6b86a4cafd83f39be6b9a32e27f7856bfc8a3
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ repos:
- id: forbid-new-submodules
- id: mixed-line-ending
- id: trailing-whitespace
- id: pretty-format-json
args:
- '--autofix'
- '--no-sort-keys'
exclude: (package-lock|capitals|proj|states|data)\.json
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand Down
8 changes: 6 additions & 2 deletions examples/animation/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Animate Features",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to animate features by updating styles."
}
Expand Down
8 changes: 6 additions & 2 deletions examples/annotations/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Annotation Layer",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"thumbquery": "labels=false&geojson=%7B%22type%22%3A%22FeatureCollection%22%2C%22features%22%3A%5B%7B%22type%22%3A%22Feature%22%2C%22geometry%22%3A%7B%22type%22%3A%22Point%22%2C%22coordinates%22%3A%5B-118.8726%2C36.6962%5D%7D%2C%22properties%22%3A%7B%22annotationType%22%3A%22point%22%2C%22fillColor%22%3A%22%2300ff00%22%2C%22fillOpacity%22%3A0.25%2C%22radius%22%3A10%2C%22strokeWidth%22%3A3%7D%7D%2C%7B%22type%22%3A%22Feature%22%2C%22geometry%22%3A%7B%22type%22%3A%22Point%22%2C%22coordinates%22%3A%5B-119.7193%2C36.7762%5D%7D%2C%22properties%22%3A%7B%22annotationType%22%3A%22point%22%2C%22fillColor%22%3A%22%2300ff00%22%2C%22fillOpacity%22%3A0.25%2C%22radius%22%3A10%2C%22strokeWidth%22%3A3%7D%7D%2C%7B%22type%22%3A%22Feature%22%2C%22geometry%22%3A%7B%22type%22%3A%22Polygon%22%2C%22coordinates%22%3A%5B%5B%5B-118.9165%2C36.5975%5D%2C%5B-118.8952%2C36.5788%5D%2C%5B-118.9068%2C36.5624%5D%2C%5B-118.8786%2C36.5398%5D%2C%5B-118.8796%2C36.4883%5D%2C%5B-118.7641%2C36.4867%5D%2C%5B-118.7689%2C36.3508%5D%2C%5B-118.7340%2C36.3453%5D%2C%5B-118.7116%2C36.3414%5D%2C%5B-118.6912%2C36.3531%5D%2C%5B-118.6893%2C36.3938%5D%2C%5B-118.5873%2C36.3953%5D%2C%5B-118.5504%2C36.4078%5D%2C%5B-118.5397%2C36.3899%5D%2C%5B-118.4825%2C36.3578%5D%2C%5B-118.4922%2C36.3476%5D%2C%5B-118.4815%2C36.3265%5D%2C%5B-118.4504%2C36.3085%5D%2C%5B-118.4135%2C36.3343%5D%2C%5B-118.3844%2C36.3633%5D%2C%5B-118.3737%2C36.3860%5D%2C%5B-118.3601%2C36.4383%5D%2C%5B-118.3319%2C36.4493%5D%2C%5B-118.2475%2C36.4828%5D%2C%5B-118.2358%2C36.4969%5D%2C%5B-118.2426%2C36.5242%5D%2C%5B-118.2630%2C36.5507%5D%2C%5B-118.2892%2C36.5554%5D%2C%5B-118.2882%2C36.5850%5D%2C%5B-118.2766%2C36.5960%5D%2C%5B-118.2873%2C36.6053%5D%2C%5B-118.3193%2C36.6287%5D%2C%5B-118.3368%2C36.6591%5D%2C%5B-118.3300%2C36.6645%5D%2C%5B-118.3397%2C36.6739%5D%2C%5B-118.3465%2C36.6731%5D%2C%5B-118.3815%2C36.7019%5D%2C%5B-118.4310%2C36.6957%5D%2C%5B-118.4320%2C36.6801%5D%2C%5B-118.4465%2C36.6863%5D%2C%5B-118.4747%2C36.6684%5D%2C%5B-118.4747%2C36.6529%5D%2C%5B-118.4863%2C36.6490%5D%2C%5B-118.4834%2C36.6365%5D%2C%5B-118.5252%2C36.5983%5D%2C%5B-118.5310%2C36.5936%5D%2C%5B-118.5563%2C36.5983%5D%2C%5B-118.5687%2C36.5967%5D%2C%5B-118.5842%2C36.6045%5D%2C%5B-118.5813%2C36.6139%5D%2C%5B-118.6017%2C36.6108%5D%2C%5B-118.6163%2C36.6279%5D%2C%5B-118.6396%2C36.6388%5D%2C%5B-118.6473%2C36.6318%5D%2C%5B-118.6580%2C36.6326%5D%2C%5B-118.6609%2C36.6396%5D%2C%5B-118.6716%2C36.6373%5D%2C%5B-118.6794%2C36.6357%5D%2C%5B-118.6978%2C36.6404%5D%2C%5B-118.7066%2C36.6645%5D%2C%5B-118.7454%2C36.6786%5D%2C%5B-118.7755%2C36.6786%5D%2C%5B-118.7978%2C36.6770%5D%2C%5B-118.8202%2C36.6684%5D%2C%5B-118.8211%2C36.6599%5D%2C%5B-118.8367%2C36.6505%5D%2C%5B-118.8474%2C36.6513%5D%2C%5B-118.8542%2C36.6419%5D%2C%5B-118.8697%2C36.6334%5D%2C%5B-118.8804%2C36.6225%5D%2C%5B-118.9024%2C36.6209%5D%2C%5B-118.9121%2C36.6084%5D%2C%5B-118.9165%2C36.5975%5D%5D%5D%7D%2C%22properties%22%3A%7B%22annotationType%22%3A%22polygon%22%2C%22fillColor%22%3A%22%2300ff00%22%2C%22fillOpacity%22%3A0.25%2C%22strokeColor%22%3A%22%23000000%22%2C%22strokeWidth%22%3A3%7D%7D%5D%7D",
"about": {
"text": "This example shows how to add annotations, such as marked rectangles, to a map."
Expand Down
8 changes: 6 additions & 2 deletions examples/blog-lines/example.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"title": "Blog entry on line drawing",
"hideNavbar": true,
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"about": {
"text": "This is used to show comparisons for the blog post on lines."
},
Expand Down
4 changes: 3 additions & 1 deletion examples/choropleth/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"title": "Choropleth plot",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to add choropleth features to a map. Choropleths color each region in a set of regions based on a scalar value for each region."
}
Expand Down
8 changes: 6 additions & 2 deletions examples/cluster/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Cluster points",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"about": {
"text": "Cluster nearby points on a map."
}
Expand Down
4 changes: 3 additions & 1 deletion examples/color-legend/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"title": "Color legends",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to create a discrete or continuous color legends."
},
Expand Down
45 changes: 27 additions & 18 deletions examples/contour/example.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
{
"title": "Contour plot",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to add contour features to a map. Contours color a region based on an array of scalar values. If stepped colors are used, these are called isobands."
},
"tests": [{
"description": "contour feature loads small dataset",
"query": "url=../../data/oahu.json",
"wait": ["example.ready"],
"tests": [
"example.contour instanceof geo.contourFeature",
"example.contour._createContours().value.length === 1953"
]
}, {
"description": "contour feature loads dense dataset",
"query": "url=../../data/oahu-dense.json",
"wait": ["example.ready"],
"tests": [
"example.contour instanceof geo.contourFeature",
"example.contour._createContours().value.length === 194770"
]
}]
"tests": [
{
"description": "contour feature loads small dataset",
"query": "url=../../data/oahu.json",
"wait": [
"example.ready"
],
"tests": [
"example.contour instanceof geo.contourFeature",
"example.contour._createContours().value.length === 1953"
]
},
{
"description": "contour feature loads dense dataset",
"query": "url=../../data/oahu-dense.json",
"wait": [
"example.ready"
],
"tests": [
"example.contour instanceof geo.contourFeature",
"example.contour._createContours().value.length === 194770"
]
}
]
}
22 changes: 14 additions & 8 deletions examples/deepzoom/example.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"title": "Deep Zoom tiled image example",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "Rendering a tiled image using the Deep Zoom protocol."
},
"disable-tests": [{
"description": "data is loaded from the Deep Zoom server",
"idle": ["$('#map.geojs-map').data('data-geojs-map').onIdle"],
"tests": [
"Object.keys($('#map.geojs-map').data('data-geojs-map').layers()[0]._activeTiles).length === 11"
]
}],
"disable-tests": [
{
"description": "data is loaded from the Deep Zoom server",
"idle": [
"$('#map.geojs-map').data('data-geojs-map').onIdle"
],
"tests": [
"Object.keys($('#map.geojs-map').data('data-geojs-map').layers()[0]._activeTiles).length === 11"
]
}
],
"disabled": true
}
5 changes: 4 additions & 1 deletion examples/dynamicData/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"title": "Dynamic Data",
"exampleJs": ["main.js", "clock.js"],
"exampleJs": [
"main.js",
"clock.js"
],
"about": {
"text": "Rendering data that changes with time."
},
Expand Down
12 changes: 9 additions & 3 deletions examples/flights/example.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"title": "Flight tracking data",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"docJs": ["worker.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"docJs": [
"worker.js"
],
"about": {
"text": "Recent flights from The OpenSky Network on an interactive map."
},
Expand Down
8 changes: 6 additions & 2 deletions examples/geoJSON/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "GeoJSON file reader",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"about": {
"text": "Shows how to use the included geoJSON reader, and how to use the properties to adjust the style of the features. In this example, you can edit the json file while the features on the map update in response. You can also drop a new geoJSON file onto the text editor to load it."
}
Expand Down
8 changes: 6 additions & 2 deletions examples/heatmap/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Heatmap Feature",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to add a heatmap to a map."
}
Expand Down
8 changes: 6 additions & 2 deletions examples/hurricanes/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Hurricane tracking data",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"level": 0,
"order": 0,
"about": {
Expand Down
24 changes: 15 additions & 9 deletions examples/isoline/example.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"title": "Isolines",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to add isolines to a map."
},
"tests": [{
"description": "isoline feature is loaded and has text",
"wait": ["example.ready"],
"tests": [
"example.iso instanceof geo.isolineFeature",
"example.isolineLayer.children()[2].features()[0] instanceof geo.textFeature"
]
}]
"tests": [
{
"description": "isoline feature is loaded and has text",
"wait": [
"example.ready"
],
"tests": [
"example.iso instanceof geo.isolineFeature",
"example.isolineLayer.children()[2].features()[0] instanceof geo.textFeature"
]
}
]
}
8 changes: 6 additions & 2 deletions examples/layerEvents/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "DOM events in layers",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how native DOM events can be used within layers. SVG elements placed inside the layer will only receive mouse events when they are inside the top layer. The elements inside the current top layer can choose to block certain events to override the default mouse interaction."
},
Expand Down
8 changes: 6 additions & 2 deletions examples/layers/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Raw layer interface",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example demonstrates drawing directly into GeoJS layers without using the feature API. Layers come in two flavors, fixed and moving. Fixed layers remain in a fixed screen position, while moving layers remain fixed relative to the map. In addition, you may choose to rescale one or more properties in moving layers."
},
Expand Down
4 changes: 3 additions & 1 deletion examples/legend/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"title": "Feature legends",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to create a legend to describe feature styles on a map."
}
Expand Down
8 changes: 6 additions & 2 deletions examples/lines/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Line Feature",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"thumbquery": "lines=250000&lineCap=round&strokeWidth=%7B%22residential%22%3A1%2C%22service%22%3A0.25%2C%22other%22%3A3%7D",
"about": {
"text": "This example shows the variations that are available for line features."
Expand Down
8 changes: 6 additions & 2 deletions examples/measure/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"title": "Measure Annotations",
"exampleCss": ["main.css"],
"exampleJs": ["main.js"],
"exampleCss": [
"main.css"
],
"exampleJs": [
"main.js"
],
"thumbquery": "geojson=%7B%22type%22%3A%22FeatureCollection%22%2C%22features%22%3A%5B%7B%22type%22%3A%22Feature%22%2C%22geometry%22%3A%7B%22type%22%3A%22Polygon%22%2C%22coordinates%22%3A%5B%5B%5B-81.3097384645104%2C42.65492085605453%5D%2C%5B-81.81622784983621%2C42.38178837433503%5D%2C%5B-81.8386672529836%2C42.256164224769044%5D%2C%5B-82.01497684914128%2C42.2670773912705%5D%2C%5B-82.43749837001597%2C42.09970738252012%5D%2C%5B-82.50716685749767%2C41.91174339353861%5D%2C%5B-82.61736203222013%2C42.03878828744648%5D%2C%5B-82.92537549111928%2C41.97604892354537%5D%2C%5B-83.13053574846643%2C42.059880307328555%5D%2C%5B-83.46905017308926%2C41.74302954779669%5D%2C%5B-82.91905112680716%2C41.51494851649117%5D%2C%5B-82.83895384814592%2C41.58592790319722%5D%2C%5B-82.70553016588629%2C41.52877921728836%5D%2C%5B-82.9756092275456%2C41.46532025476897%5D%2C%5B-82.94033861894106%2C41.42223637904752%5D%2C%5B-82.48906236933666%2C41.382341348529515%5D%2C%5B-82.06370241026121%2C41.52068300446072%5D%2C%5B-81.76109103067415%2C41.48611223128468%5D%2C%5B-81.28681796221682%2C41.7597825851095%5D%2C%5B-80.110677833162%2C42.1255914727342%5D%2C%5B-79.34953504035339%2C42.485397723765615%5D%2C%5B-78.8417917871286%2C42.788087900825694%5D%2C%5B-78.90283450010408%2C42.893105848622966%5D%2C%5B-80.18819365804282%2C42.78965660572887%5D%2C%5B-80.43256221867617%2C42.61996238633441%5D%2C%5B-80.05313188825906%2C42.552990303025574%5D%2C%5B-80.10955095902953%2C42.53787529773383%5D%2C%5B-80.58273793488254%2C42.58043355589163%5D%2C%5B-80.93119651796614%2C42.66052107372758%5D%2C%5B-81.3097384645104%2C42.65492085605453%5D%5D%5D%7D%2C%22properties%22%3A%7B%22annotationType%22%3A%22polygon%22%2C%22name%22%3A%22Lake%20Erie%22%2C%22annotationId%22%3A3%2C%22fill%22%3Atrue%2C%22fillColor%22%3A%22%2300ff00%22%2C%22fillOpacity%22%3A0.25%2C%22stroke%22%3Atrue%2C%22strokeColor%22%3A%22%23000000%22%2C%22strokeOpacity%22%3A1%2C%22strokeWidth%22%3A3%2C%22labelTextAlign%22%3A%22center%22%2C%22labelTextBaseline%22%3A%22middle%22%2C%22labelColor%22%3A%22%23000000%22%2C%22labelRotateWithMap%22%3Afalse%2C%22labelShadowRotate%22%3A%22false%22%7D%7D%5D%7D&distunit=si&areaunit=si",
"about": {
"text": "Show lengths and areas of annotations. This shows how annotations can be altered while being drawn. Areas are computed using an equal-area projection."
Expand Down
4 changes: 3 additions & 1 deletion examples/osm/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"title": "Open street map layer",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "Basic map rendering tiles from an OpenStreetMap tile server. The base url for the tile server is given at initialization to provide a custom appearance."
},
Expand Down
5 changes: 4 additions & 1 deletion examples/picking/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"title": "Mouse picking for points and lines",
"exampleJs": ["main.js", "widget.js"],
"exampleJs": [
"main.js",
"widget.js"
],
"about": {
"text": "This example demonstrates how to attach handlers to various mouse interactions that allow the users to select features. Try moving the mouse over the features and clicking."
},
Expand Down
4 changes: 3 additions & 1 deletion examples/pixelmap/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"title": "Pixelmap feature",
"exampleJs": ["main.js"],
"exampleJs": [
"main.js"
],
"about": {
"text": "This example shows how to use a pixelmap feature. The pixelmap colors areas based on an index derived from an image and some data per index."
}
Expand Down
Loading