├── .editorconfig
├── .github
├── dependabot.yml
└── workflows
│ ├── commitlint.yml
│ └── main.yml
├── .gitignore
├── .npmignore
├── .nvmrc
├── .pre-commit-config.yaml
├── .pug-lintrc
├── CHANGELOG.md
├── LICENSE
├── NOTICE
├── README.md
├── codecov.yml
├── commitlint.config.js
├── dist
├── .gitignore
└── index.html
├── docs
├── developers.rst
├── images
│ └── osmmap.png
├── index.rst
├── provisioning.rst
├── quickstart.rst
└── users.rst
├── eslint.config.js
├── examples
├── animation
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── annotations
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── blog-lines
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ └── main.js
├── build-utils.js
├── build-website.js
├── build.js
├── choropleth
│ ├── example.json
│ ├── main.js
│ ├── states.json
│ └── thumb.jpg
├── cluster
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── color-legend
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── common
│ ├── examples.css
│ ├── examples.js
│ ├── index.pug
│ ├── thumb.jpg
│ └── utils.js
├── contour
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── deepzoom
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── dynamicData
│ ├── clock.js
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── flights
│ ├── example.json
│ ├── main.css
│ ├── main.js
│ └── worker.js
├── geoJSON
│ ├── data.json
│ ├── example.json
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── heatmap
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── hurricanes
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── index-website.js
├── index.js
├── index.pug
├── isoline
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── layerEvents
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── layers
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── legend
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── lines
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── main.css
├── main.js
├── measure
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── osm
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── picking
│ ├── example.json
│ ├── main.js
│ ├── thumb.jpg
│ └── widget.js
├── pixelmap
│ ├── example.json
│ ├── main.js
│ ├── pixelmap.json
│ ├── pixelmap.png
│ └── thumb.jpg
├── points
│ ├── example.json
│ ├── main.js
│ ├── thumb.jpg
│ └── white.jpg
├── polygons
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── quads
│ ├── example.json
│ ├── flower1.jpg
│ ├── flower2.jpg
│ ├── flower3.jpg
│ ├── main.js
│ └── thumb.jpg
├── rainfall
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── reprojection
│ ├── capitals.json
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ ├── proj.json
│ └── thumb.jpg
├── sld
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── tiles
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── transitions
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── twomaps
│ ├── example.json
│ ├── index.pug
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
├── ui
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── vectors
│ ├── example.json
│ └── main.js
├── vtkjs
│ ├── example.json
│ └── main.js
├── widgets
│ ├── chart.js
│ ├── example.json
│ ├── main.css
│ ├── main.js
│ └── thumb.jpg
└── wms
│ ├── example.json
│ ├── main.js
│ └── thumb.jpg
├── jsdoc.conf.json
├── jsdoc
├── plugins
│ ├── dot_in_name.js
│ ├── events.js
│ └── typedef_augments.js
└── template
│ ├── layout.tmpl
│ ├── mainpage.tmpl
│ ├── publish.js
│ └── style.css
├── karma-base.js
├── karma-cov.conf.js
├── karma.conf.js
├── package-lock.json
├── package.json
├── scripts
├── datastore.js
├── fetch_noaa.py
├── get_tiles.py
├── make_thumbnails.py
├── preprocess_glsl.py
└── update_hurricane_demo.py
├── src
├── action.js
├── annotation
│ ├── annotation.js
│ ├── circleAnnotation.js
│ ├── ellipseAnnotation.js
│ ├── index.js
│ ├── lineAnnotation.js
│ ├── pointAnnotation.js
│ ├── polygonAnnotation.js
│ ├── rectangleAnnotation.js
│ └── squareAnnotation.js
├── annotationLayer.js
├── camera.js
├── canvas
│ ├── canvasRenderer.js
│ ├── heatmapFeature.js
│ ├── index.js
│ ├── isolineFeature.js
│ ├── lineFeature.js
│ ├── object.js
│ ├── pixelmapFeature.js
│ ├── quadFeature.js
│ ├── textFeature.js
│ ├── tileLayer.js
│ └── trackFeature.js
├── choroplethFeature.js
├── contourFeature.js
├── css
│ ├── cursor-crosshair-difference.svg
│ ├── cursor-crosshair-intersect.svg
│ ├── cursor-crosshair-union.svg
│ └── cursor-crosshair-xor.svg
├── domRenderer.js
├── event.js
├── feature.js
├── featureLayer.js
├── fetchQueue.js
├── fileReader.js
├── geojsonReader.js
├── graphFeature.js
├── gridFeature.js
├── heatmapFeature.js
├── imageTile.js
├── index.js
├── inherit.js
├── isolineFeature.js
├── layer.js
├── lineFeature.js
├── main.styl
├── map.js
├── mapInteractor.js
├── markerFeature.js
├── meshFeature.js
├── object.js
├── osmLayer.js
├── pathFeature.js
├── pixelmapFeature.js
├── pixelmapLayer.js
├── pointFeature.js
├── polygonFeature.js
├── quadFeature.js
├── registry.js
├── renderer.js
├── sceneObject.js
├── sha.js
├── svg
│ ├── graphFeature.js
│ ├── index.js
│ ├── lineFeature.js
│ ├── object.js
│ ├── pathFeature.js
│ ├── pointFeature.js
│ ├── quadFeature.js
│ ├── rescale.js
│ ├── svgRenderer.js
│ ├── tileLayer.js
│ ├── trackFeature.js
│ ├── uniqueID.js
│ └── vectorFeature.js
├── textFeature.js
├── tile.js
├── tileCache.js
├── tileLayer.js
├── timestamp.js
├── trackFeature.js
├── transform.js
├── typedef.js
├── ui
│ ├── colorLegendWidget.js
│ ├── colorLegendWidget.styl
│ ├── domWidget.js
│ ├── index.js
│ ├── legendWidget.js
│ ├── scaleWidget.js
│ ├── scaleWidget.styl
│ ├── sliderWidget.js
│ ├── svgWidget.js
│ ├── uiLayer.js
│ └── widget.js
├── util
│ ├── clustering.js
│ ├── color.js
│ ├── common.js
│ ├── distanceGrid.js
│ ├── index.js
│ ├── mesh.js
│ ├── mockVGL.js
│ ├── polyops.js
│ └── throttle.js
├── vectorFeature.js
├── vendor.js
├── version.js
├── vgl
│ ├── GL.js
│ ├── actor.js
│ ├── blend.js
│ ├── boundingObject.js
│ ├── camera.js
│ ├── data.js
│ ├── event.js
│ ├── geomData.js
│ ├── graphicsObject.js
│ ├── groupNode.js
│ ├── index.js
│ ├── mapper.js
│ ├── material.js
│ ├── materialAttribute.js
│ ├── node.js
│ ├── object.js
│ ├── renderWindow.js
│ ├── renderer.js
│ ├── shader.js
│ ├── shaderProgram.js
│ ├── texture.js
│ ├── uniform.js
│ ├── vertexAttribute.js
│ ├── vgl.js
│ └── viewer.js
├── vtkjs
│ ├── index.js
│ ├── object.js
│ ├── pointFeature.js
│ └── vtkjsRenderer.js
└── webgl
│ ├── choroplethFeature.js
│ ├── contourFeature.js
│ ├── gridFeature.js
│ ├── index.js
│ ├── isolineFeature.js
│ ├── layer.js
│ ├── lineFeature.frag
│ ├── lineFeature.js
│ ├── lineFeature.vert
│ ├── lineFeatureDebug.frag
│ ├── lookupTable2D.js
│ ├── markerFeature.js
│ ├── markerFeatureFS.glsl
│ ├── markerFeaturePoly.frag
│ ├── markerFeaturePoly.vert
│ ├── markerFeatureSprite.frag
│ ├── markerFeatureSprite.vert
│ ├── markerFeatureVS.glsl
│ ├── meshColored.frag
│ ├── meshColored.js
│ ├── meshColored.vert
│ ├── object.js
│ ├── pixelmapFeature.frag
│ ├── pixelmapFeature.js
│ ├── pointFeature.js
│ ├── pointFeatureFS.glsl
│ ├── pointFeaturePoly.frag
│ ├── pointFeaturePoly.vert
│ ├── pointFeatureSprite.frag
│ ├── pointFeatureSprite.vert
│ ├── pointFeatureVS.glsl
│ ├── pointUtil.js
│ ├── polygonFeature.frag
│ ├── polygonFeature.js
│ ├── polygonFeature.vert
│ ├── quadFeature.js
│ ├── quadFeatureColor.frag
│ ├── quadFeatureColor.vert
│ ├── quadFeatureImage.frag
│ ├── quadFeatureImage.vert
│ ├── tileLayer.js
│ ├── trackFeature.js
│ └── webglRenderer.js
├── tests
├── all.js
├── cases
│ ├── annotation.js
│ ├── annotationLayer.js
│ ├── camera.js
│ ├── choroplethFeature.js
│ ├── clustering.js
│ ├── colorLegend.js
│ ├── colors.js
│ ├── contourFeature.js
│ ├── deferred.js
│ ├── discreteZoom.js
│ ├── domWidget.js
│ ├── events.js
│ ├── feature.js
│ ├── featureLayer.js
│ ├── fetchQueue.js
│ ├── fileReader.js
│ ├── geojsonReader.js
│ ├── gridFeature.js
│ ├── heatmap.js
│ ├── isolineFeature.js
│ ├── layer.js
│ ├── layerReorder.js
│ ├── lineFeature.js
│ ├── map.js
│ ├── mapAttribution.js
│ ├── mapInteractor.js
│ ├── markerFeature.js
│ ├── object.js
│ ├── osmLayer.js
│ ├── pathFeature.js
│ ├── pixelmapFeature.js
│ ├── pointFeature.js
│ ├── polygonFeature.js
│ ├── polyops.js
│ ├── quadFeature.js
│ ├── registry.js
│ ├── renderers.js
│ ├── scaleWidget.js
│ ├── sceneObject.js
│ ├── sliderWidget.js
│ ├── svgGraphFeature.js
│ ├── svgPointFeature.js
│ ├── svgVectorFeature.js
│ ├── svgWidget.js
│ ├── textFeature.js
│ ├── throttle.js
│ ├── tile.js
│ ├── tileCache.js
│ ├── tileLayer.js
│ ├── timestamp.js
│ ├── trackFeature.js
│ ├── transform.js
│ ├── util.js
│ ├── version.js
│ └── widget.js
├── data
│ ├── proxy-for-tests.pac
│ ├── sample.json
│ ├── test.css
│ ├── weather.png
│ └── white.jpg
├── gl-cases
│ ├── choropleth.js
│ ├── d3Vectors.js
│ ├── layerReorder.js
│ ├── map.js
│ ├── osmLayer.js
│ ├── pixelAlignment.js
│ ├── pixelmapLayer.js
│ ├── points.js
│ ├── quadFeatureVideo.js
│ ├── svgGeoJson.js
│ ├── svgGraph.js
│ ├── svgLines.js
│ ├── svgStickyLayer.js
│ ├── ui.js
│ ├── vtkjsPointFeature.js
│ ├── webglContour.js
│ ├── webglGrid.js
│ ├── webglLines.js
│ ├── webglLinesSpeed.js
│ ├── webglPointsSpeed.js
│ ├── webglPolygons.js
│ └── webglQuad.js
├── headed-cases
│ ├── blog-lines.js
│ ├── examples.js
│ ├── lines.js
│ └── map.js
├── image-test.js
├── runners
│ ├── baseline_images.py
│ └── server.js
├── test-common.js
├── test-gl.js
├── test-headed.js
├── test-unit.js
├── test-utils.js
└── tutorials.js
├── tutorials
├── annotation
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── basic
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── build-website.js
├── build.js
├── choropleth
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── common
│ ├── index-website.pug
│ ├── index.pug
│ ├── thumb.png
│ ├── tutorials.css
│ └── tutorials.js
├── contour
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── editor
│ ├── editor.js
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── editor3
│ ├── editor.js
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── grid
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── index-website.js
├── index.js
├── index.pug
├── isoline
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── large_image
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── lines
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── main.css
├── main.js
├── marker
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── multiframe
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── pixelmap
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── scale
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── simple_point
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── text
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── tile_source
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── tiled-pixelmap
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── tracks
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── video_on_map
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── video_single
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── video_transport
│ ├── index.pug
│ ├── media-back.png
│ ├── media-ff.png
│ ├── media-pause.png
│ ├── media-play.png
│ ├── media-rewind.png
│ ├── media-step.png
│ ├── thumb.jpg
│ └── tutorial.json
└── wms
│ ├── index.pug
│ ├── thumb.jpg
│ └── tutorial.json
├── webpack-examples.config.js
├── webpack-lean.config.js
├── webpack-tutorials.config.js
├── webpack-website-examples.config.js
├── webpack-website-tutorials.config.js
├── webpack.base.config.js
├── webpack.config.js
└── website
├── .gitignore
├── README.md
├── _config.yml
├── package.json
├── source
├── 404.html
├── download
│ └── index.html
├── examples
│ └── index.html
├── favicon
│ ├── android-icon-144x144.png
│ ├── android-icon-192x192.png
│ ├── android-icon-36x36.png
│ ├── android-icon-48x48.png
│ ├── android-icon-72x72.png
│ ├── android-icon-96x96.png
│ ├── apple-icon-114x114.png
│ ├── apple-icon-120x120.png
│ ├── apple-icon-144x144.png
│ ├── apple-icon-152x152.png
│ ├── apple-icon-180x180.png
│ ├── apple-icon-57x57.png
│ ├── apple-icon-60x60.png
│ ├── apple-icon-72x72.png
│ ├── apple-icon-76x76.png
│ ├── apple-icon-precomposed.png
│ ├── apple-icon.png
│ ├── browserconfig.xml
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── favicon-96x96.png
│ ├── favicon.ico
│ ├── manifest.json
│ ├── ms-icon-144x144.png
│ ├── ms-icon-150x150.png
│ ├── ms-icon-310x310.png
│ └── ms-icon-70x70.png
├── index.html
└── tutorials
│ └── index.html
└── themes
└── agency
├── _config.yml
├── layout
├── example.ejs
├── examples.ejs
├── index.ejs
├── layout.ejs
├── page.ejs
├── tutorial.ejs
└── tutorials.ejs
├── scripts
└── helper.js
└── source
├── css
├── agency.css
├── download.scss
├── example.scss
├── highlight.css
├── logo-zoom.scss
├── main.scss
├── syntax.css
└── tutorial.scss
├── images
├── GEO_Logo_Full.svg
├── GEO_Logo_Mark.svg
├── bg_hr.png
├── blacktocat.png
├── icon_download.png
├── logo.png
├── logo_128.png
├── logo_256.png
├── logo_transparent.png
└── sprite_download.png
├── js
├── agency.js
├── example.js
└── logo-zoom.js
└── vendor
├── bootstrap
├── css
│ ├── bootstrap.css
│ └── bootstrap.min.css
├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
└── js
│ ├── bootstrap.js
│ └── bootstrap.min.js
├── font-awesome
├── css
│ ├── font-awesome.css
│ └── font-awesome.min.css
├── fonts
│ ├── FontAwesome.otf
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ └── fontawesome-webfont.woff2
├── less
│ ├── animated.less
│ ├── bordered-pulled.less
│ ├── core.less
│ ├── fixed-width.less
│ ├── font-awesome.less
│ ├── icons.less
│ ├── larger.less
│ ├── list.less
│ ├── mixins.less
│ ├── path.less
│ ├── rotated-flipped.less
│ ├── screen-reader.less
│ ├── stacked.less
│ └── variables.less
└── scss
│ ├── _animated.scss
│ ├── _bordered-pulled.scss
│ ├── _core.scss
│ ├── _fixed-width.scss
│ ├── _icons.scss
│ ├── _larger.scss
│ ├── _list.scss
│ ├── _mixins.scss
│ ├── _path.scss
│ ├── _rotated-flipped.scss
│ ├── _screen-reader.scss
│ ├── _stacked.scss
│ ├── _variables.scss
│ └── font-awesome.scss
└── jquery
├── jquery.js
└── jquery.min.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 | [*]
3 | end_of_line = lf
4 | insert_final_newline = true
5 | charset = utf-8
6 |
7 | [*.js]
8 | indent_style = space
9 | indent_size = 2
10 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | ---
2 | version: 2
3 | updates:
4 | - package-ecosystem: "github-actions"
5 | directory: "/"
6 | schedule:
7 | interval: "weekly"
8 |
--------------------------------------------------------------------------------
/.github/workflows/commitlint.yml:
--------------------------------------------------------------------------------
1 | name: Lint Commit Messages
2 | on: [pull_request, push]
3 |
4 | jobs:
5 | commitlint:
6 | runs-on: ubuntu-latest
7 | steps:
8 | - uses: actions/checkout@v4
9 | with:
10 | fetch-depth: 0
11 | - uses: wagoid/commitlint-github-action@v6
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /build/*
2 | /_build/*
3 | /Testing/Temporary/*
4 | .DS_Store
5 | .*.swp
6 | /node_modules/*
7 | .vimrc
8 | /geo.min.js
9 | *.py[ocd]
10 | /docs/_*
11 | /docs/*.py
12 | !/docs/conf.py
13 | !/docs/parse.py
14 | .eslintcache
15 | /lcov
16 | /notes
17 | /jsdoc/template/tmpl
18 | /jsdoc/template/static
19 | /images/*
20 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | *build*/
2 | cmake/
3 | CMakeLists.txt
4 | codecov.yml
5 | CTestConfig.cmake
6 | dashboard/
7 | dist/
8 | .dockerignore
9 | Dockerfile*
10 | docs/
11 | .editorconfig
12 | .eslint*
13 | examples/
14 | external.config.js
15 | .git/
16 | .gitignore
17 | images/
18 | jsdoc*
19 | karma*
20 | lcov/
21 | notes/
22 | .pug*
23 | scripts/
24 | tests/
25 | .travis.yml
26 | tutorials/
27 | webpack*
28 | website/
29 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | v14.18.3
2 |
--------------------------------------------------------------------------------
/.pug-lintrc:
--------------------------------------------------------------------------------
1 | {
2 | "disallowAttributeInterpolation": true,
3 | "disallowClassAttributeWithStaticValue": true,
4 | "disallowDuplicateAttributes": true,
5 | "disallowIdAttributeWithStaticValue": true,
6 | "disallowLegacyMixinCall": true,
7 | "disallowMultipleLineBreaks": true,
8 | "disallowSpacesInsideAttributeBrackets": true,
9 | "requireClassLiteralsBeforeAttributes": true,
10 | "requireIdLiteralsBeforeAttributes": true,
11 | "requireLowerCaseTags": true,
12 | "requireSpaceAfterCodeOperator": true,
13 | "requireStrictEqualityOperators": true,
14 | "validateAttributeSeparator": { "separator": ", ", "multiLineSeparator": ",\n " },
15 | "validateDivTags": true,
16 | "validateTemplateString": true
17 | }
18 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright 2012 Kitware, Inc.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | See accompanying LICENSE file. You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | comment: false
2 | coverage:
3 | status:
4 | # We have some variation in tests due to variations in the test runs. We
5 | # want to ignore these changes, but not let code coverage slip too much.
6 | project:
7 | default:
8 | threshold: 0.3
9 | # This applies to the changed code. We allow it to be much less covered
10 | # than the main code, since we use the project threshold for that.
11 | patch:
12 | default:
13 | threshold: 25
14 | only_pulls: true
15 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: ['@commitlint/config-conventional'],
3 | rules: {
4 | // 0-disable, 1-warn, 2-error
5 | 'subject-case': [0],
6 | // These are the standard values, but are listed here for easier reference
7 | 'type-enum': [
8 | 2,
9 | 'always',
10 | [
11 | 'build',
12 | 'chore',
13 | 'ci',
14 | 'docs',
15 | 'feat',
16 | 'fix',
17 | 'perf',
18 | 'refactor',
19 | 'revert',
20 | 'style',
21 | 'test'
22 | ]
23 | ],
24 | 'body-max-line-length': [
25 | 2,
26 | 'always',
27 | Infinity
28 | ]
29 | }
30 | };
31 |
--------------------------------------------------------------------------------
/dist/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !index.html
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/docs/images/osmmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/docs/images/osmmap.png
--------------------------------------------------------------------------------
/docs/index.rst:
--------------------------------------------------------------------------------
1 | =====
2 | GeoJS
3 | =====
4 |
5 | GeoJS is a flexible library for all kinds of geospatial and 2-D visualizations
6 | from traditional point markers to 3D climatological simulations. It is
7 | designed for displaying large datasets (over 1,000,000 points) leveraging
8 | the power of WebGL. The programming interface was inspired by the widely
9 | used `d3 `_ and allows the user to generate features from
10 | arbitrary data objects with custom accessors. The API also provides
11 | custom mouse events that mimic browser level events, but work with
12 | WebGL features and even through active layers.
13 |
14 | See the growing list of `examples `_
15 | for a live demonstration of GeoJS's features or go to our Github
16 | `repository `_ to start experimenting.
17 |
18 | .. toctree::
19 | :maxdepth: 2
20 |
21 | quickstart
22 | users
23 | developers
24 | provisioning
25 | API Reference
26 |
--------------------------------------------------------------------------------
/examples/animation/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Animate Features",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "This example shows how to animate features by updating styles."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/animation/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | overflow-x: hidden;
3 | overflow-y: auto;
4 | position: absolute;
5 | left: 10px;
6 | top: 80px;
7 | z-index: 1;
8 | border-radius: 5px;
9 | border: 1px solid grey;
10 | box-shadow: 1px 1px 3px black;
11 | opacity: 0.5;
12 | transition: opacity 250ms ease;
13 | background: #CCC;
14 | color: black;
15 | padding: 4px;
16 | font-size: 14px;
17 | max-height: calc(100% - 100px);
18 | min-width: 310px;
19 | }
20 | #controls:hover {
21 | opacity: 1;
22 | }
23 | #controls .form-group {
24 | margin-bottom: 0;
25 | }
26 | #controls label {
27 | min-width: 120px;
28 | }
29 | #controls #points {
30 | width: 100px;
31 | }
32 | #controls #points-loaded,#controls #points-shown {
33 | display: inline-block;
34 | font-size: 11px;
35 | padding-left: 5px;
36 | }
37 | #controls table input {
38 | width: 55px;
39 | }
40 | #controls table th {
41 | text-align: center;
42 | }
43 | span.timing-group {
44 | font-size: 11px;
45 | padding-right: 10px;
46 | }
47 | #controls .style-list {
48 | max-width: 320px;
49 | font-size: 12px;
50 | }
51 | #controls .style-list span {
52 | padding-right: 5px;
53 | }
54 | #controls .style-list label {
55 | min-width: 0;
56 | max-width: none;
57 | }
58 |
--------------------------------------------------------------------------------
/examples/animation/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/animation/thumb.jpg
--------------------------------------------------------------------------------
/examples/annotations/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/annotations/thumb.jpg
--------------------------------------------------------------------------------
/examples/blog-lines/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Blog entry on line drawing",
3 | "hideNavbar": true,
4 | "exampleCss": ["main.css"],
5 | "exampleJs": ["main.js"],
6 | "about": {
7 | "text": "This is used to show comparisons for the blog post on lines."
8 | },
9 | "disabled": true
10 | }
11 |
--------------------------------------------------------------------------------
/examples/blog-lines/main.css:
--------------------------------------------------------------------------------
1 | #map {
2 | display: none;
3 | width: 100%;
4 | height: 100%;
5 | }
6 | table {
7 | border-collapse: collapse;
8 | border: 1px solid black;
9 | color: black;
10 | }
11 | table td, table th {
12 | border: 1px solid black !important;
13 | }
14 | table tr th {
15 | min-width: 240px;
16 | text-align: center;
17 | }
18 | .unsupported:after {
19 | content: 'Unsupported';
20 | }
21 | .unsupported {
22 | text-align: center;
23 | }
24 | .leaflet div,.mapbox div {
25 | overflow: hidden;
26 | }
27 | table tr>td:first-child {
28 | padding: 10px;
29 | }
30 | #lines_list {
31 | display: none;
32 | }
33 | #lines_list #info {
34 | min-height: 65px;
35 | }
36 | #main_list span {
37 | display: inline-block;
38 | width: 322px;
39 | height: 266px;
40 | overflow: hidden;
41 | }
42 | #main_list span .entry {
43 | border: 1px solid black;
44 | width: 322px;
45 | height: 242px;
46 | }
47 | #main_list span .entry.unsupported {
48 | line-height: 240px;
49 | }
50 | #main_list span .title {
51 | font-weight: bold;
52 | width: 322px;
53 | height: 24px;
54 | }
55 | #feature-div {
56 | height: 27px;
57 | }
58 |
--------------------------------------------------------------------------------
/examples/choropleth/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Choropleth plot",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "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."
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/choropleth/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/choropleth/thumb.jpg
--------------------------------------------------------------------------------
/examples/cluster/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Cluster points",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "Cluster nearby points on a map."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/cluster/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | #controls
5 | .form-group(title="The data set to plot.")
6 | label(for="dataset") Data Set
7 | select#dataset(param-name="dataset", placeholder="Activity")
8 | option(value="adderall", url="AdderallCities2015.csv", title="9555 points") Adderall
9 | option(value="cities", url="cities.csv", title="30101 points") U.S. Cities
10 | option(value="earthquakes", url="earthquakes.json", title="1.3 million points") Earthquakes
11 | span#points-loaded
12 | .form-group(title="Number of points. Leave blank for the entire original data set. If a smaller number, only a subset of points will be shown. If a larger number, some of the data will be duplicated with random offsets.")
13 | label(for="points") Number of Points
14 | input#points(type="number", min="1", step="100")
15 | span#points-shown
16 |
--------------------------------------------------------------------------------
/examples/cluster/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | overflow-x: hidden;
3 | overflow-y: auto;
4 | position: absolute;
5 | left: 10px;
6 | top: 80px;
7 | z-index: 1;
8 | border-radius: 5px;
9 | border: 1px solid grey;
10 | box-shadow: 1px 1px 3px black;
11 | opacity: 0.5;
12 | transition: opacity 250ms ease;
13 | background: #CCC;
14 | color: black;
15 | padding: 4px;
16 | font-size: 14px;
17 | max-height: calc(100% - 100px);
18 | min-width: 310px;
19 | }
20 | #controls:hover {
21 | opacity: 1;
22 | }
23 | #controls .form-group {
24 | margin-bottom: 0;
25 | }
26 | #controls label {
27 | min-width: 120px;
28 | }
29 | #controls #points {
30 | width: 100px;
31 | }
32 | #controls #points-loaded,#controls #points-shown {
33 | display: inline-block;
34 | font-size: 11px;
35 | padding-left: 5px;
36 | }
37 | #controls table input {
38 | width: 55px;
39 | }
40 | #controls table th {
41 | text-align: center;
42 | }
43 |
--------------------------------------------------------------------------------
/examples/cluster/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/cluster/thumb.jpg
--------------------------------------------------------------------------------
/examples/color-legend/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Color legends",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "This example shows how to create a discrete or continuous color legends."
6 | },
7 | "disabled": false
8 | }
9 |
--------------------------------------------------------------------------------
/examples/color-legend/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/color-legend/thumb.jpg
--------------------------------------------------------------------------------
/examples/common/examples.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | height: 100%;
3 | width: 100%;
4 | -webkit-touch-callout: none;
5 | -webkit-user-select: none;
6 | -khtml-user-select: none;
7 | -moz-user-select: none;
8 | -ms-user-select: none;
9 | user-select: none;
10 | }
11 |
12 | .jumbotron p {
13 | font-weight: normal;
14 | }
15 |
16 | .navbar {
17 | margin: 0;
18 | }
19 |
20 | #map {
21 | width: 100%;
22 | height: calc(100% - 60px);
23 | overflow: hidden;
24 | z-index: 0;
25 | }
26 |
27 | .gj-screenshot-link {
28 | cursor: pointer;
29 | }
30 | li.gj-screenshot-result,li.gj-screenshot-waiting {
31 | display: none;
32 | }
33 | li a.gj-screenshot-download {
34 | padding: 0;
35 | }
36 | li.gj-screenshot-result img {
37 | max-height: 60px;
38 | max-width: 120px;
39 | }
40 |
--------------------------------------------------------------------------------
/examples/common/examples.js:
--------------------------------------------------------------------------------
1 | window.utils = require('./utils');
2 |
3 | /* Add a function to take a screenshot. Show the screenshot so that a user can
4 | * click on it to save it or right-click to copy it. */
5 | $(function () {
6 | $('.gj-screenshot-link').on('click', function () {
7 | $('.gj-screenshot-result').hide();
8 | $('.gj-screenshot-waiting').show();
9 | var map = $('#map').data('data-geojs-map');
10 | map.screenshot({wait:'idle'}).then(function (res) {
11 | $('.gj-screenshot-waiting').hide();
12 | $('.gj-screenshot-result img').attr({src: res});
13 | $('.gj-screenshot-download').attr({href: res});
14 | $('.gj-screenshot-result').show();
15 | /* If you want to trigger an automatic download, enable this line (and,
16 | * perhaps, always hide the waiting and result elements).
17 | $('.gj-screenshot-download')[0].click();
18 | */
19 | });
20 | });
21 | $('.gj-screenshot-link').keypress(function (evt) {
22 | if (evt.which === 13) {
23 | $('.gj-screenshot-link').click();
24 | return false;
25 | }
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/examples/common/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/common/thumb.jpg
--------------------------------------------------------------------------------
/examples/common/utils.js:
--------------------------------------------------------------------------------
1 | var exampleUtils = {
2 | /* Decode query components into a dictionary of values.
3 | *
4 | * @returns {object}: the query parameters as a dictionary.
5 | */
6 | getQuery: function () {
7 | var query = document.location.search.replace(/(^\?)/, '').split(
8 | '&').map(function (n) {
9 | n = n.split('=');
10 | if (n[0]) {
11 | this[decodeURIComponent(n[0].replace(/\+/g, '%20'))] = decodeURIComponent(n[1].replace(/\+/g, '%20'));
12 | }
13 | return this;
14 | }.bind({}))[0];
15 | return query;
16 | },
17 |
18 | /* Encode a dictionary of parameters to the query string, setting the window
19 | * location and history. This will also remove undefined values from the
20 | * set properties of params.
21 | *
22 | * @param {object} params The query parameters as a dictionary.
23 | * @param {boolean} [updateHistory] If true, update the browser history. If
24 | * falsy, replace the history state.
25 | */
26 | setQuery: function (params, updateHistory) {
27 | $.each(params, function (key, value) {
28 | if (value === undefined) {
29 | delete params[key];
30 | }
31 | });
32 | var newurl = window.location.protocol + '//' + window.location.host +
33 | window.location.pathname + '?' + $.param(params);
34 | if (updateHistory) {
35 | window.history.pushState(params, '', newurl);
36 | } else {
37 | window.history.replaceState(params, '', newurl);
38 | }
39 | }
40 | };
41 |
42 | module.exports = exampleUtils;
43 |
--------------------------------------------------------------------------------
/examples/contour/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Contour plot",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "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."
6 | },
7 | "tests": [{
8 | "description": "contour feature loads small dataset",
9 | "query": "url=../../data/oahu.json",
10 | "wait": ["example.ready"],
11 | "tests": [
12 | "example.contour instanceof geo.contourFeature",
13 | "example.contour._createContours().value.length === 1953"
14 | ]
15 | }, {
16 | "description": "contour feature loads dense dataset",
17 | "query": "url=../../data/oahu-dense.json",
18 | "wait": ["example.ready"],
19 | "tests": [
20 | "example.contour instanceof geo.contourFeature",
21 | "example.contour._createContours().value.length === 194770"
22 | ]
23 | }]
24 | }
25 |
--------------------------------------------------------------------------------
/examples/contour/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/contour/thumb.jpg
--------------------------------------------------------------------------------
/examples/deepzoom/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Deep Zoom tiled image example",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "Rendering a tiled image using the Deep Zoom protocol."
6 | },
7 | "disable-tests": [{
8 | "description": "data is loaded from the Deep Zoom server",
9 | "idle": ["$('#map.geojs-map').data('data-geojs-map').onIdle"],
10 | "tests": [
11 | "Object.keys($('#map.geojs-map').data('data-geojs-map').layers()[0]._activeTiles).length === 11"
12 | ]
13 | }],
14 | "disabled": true
15 | }
16 |
--------------------------------------------------------------------------------
/examples/deepzoom/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/deepzoom/thumb.jpg
--------------------------------------------------------------------------------
/examples/dynamicData/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Dynamic Data",
3 | "exampleJs": ["main.js", "clock.js"],
4 | "about": {
5 | "text": "Rendering data that changes with time."
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/dynamicData/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/dynamicData/thumb.jpg
--------------------------------------------------------------------------------
/examples/flights/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Flight tracking data",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "docJs": ["worker.js"],
6 | "about": {
7 | "text": "Recent flights from The OpenSky Network on an interactive map."
8 | },
9 | "disabled": true
10 | }
11 |
--------------------------------------------------------------------------------
/examples/flights/main.css:
--------------------------------------------------------------------------------
1 | #map.dark {
2 | background: black;
3 | }
4 | .dark .geo-attribution {
5 | background: none;
6 | color: white;
7 | }
8 |
--------------------------------------------------------------------------------
/examples/geoJSON/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "GeoJSON file reader",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "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."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/geoJSON/main.css:
--------------------------------------------------------------------------------
1 | .CodeMirror {
2 | position: absolute !important;
3 | left: 10px;
4 | top: 80px;
5 | width: calc(50% - 10px);
6 | height: calc(87% - 80px) !important;
7 | z-index: 50;
8 | border-radius: 5px;
9 | border: 1px solid grey;
10 | box-shadow: 1px 1px 3px black;
11 | opacity: 0.5;
12 | transition: opacity 250ms ease;
13 | }
14 | .CodeMirror-focused {
15 | opacity: 1.0;
16 | }
17 |
18 | .CodeMirror:hover {
19 | opacity: 1.0;
20 | }
21 |
--------------------------------------------------------------------------------
/examples/geoJSON/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/geoJSON/thumb.jpg
--------------------------------------------------------------------------------
/examples/heatmap/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Heatmap Feature",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "This example shows how to add a heatmap to a map."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/heatmap/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | overflow-x: hidden;
3 | overflow-y: auto;
4 | position: absolute;
5 | left: 10px;
6 | top: 80px;
7 | z-index: 1;
8 | border-radius: 5px;
9 | border: 1px solid grey;
10 | box-shadow: 1px 1px 3px black;
11 | opacity: 0.5;
12 | transition: opacity 250ms ease;
13 | background: #CCC;
14 | color: black;
15 | padding: 4px;
16 | font-size: 14px;
17 | max-height: calc(100% - 100px);
18 | min-width: 310px;
19 | }
20 | #controls:hover {
21 | opacity: 1;
22 | }
23 | #controls .form-group {
24 | margin-bottom: 0;
25 | }
26 | #controls label {
27 | min-width: 120px;
28 | }
29 | #controls #points {
30 | width: 100px;
31 | }
32 | #controls #points-loaded,#controls #points-shown {
33 | display: inline-block;
34 | font-size: 11px;
35 | padding-left: 5px;
36 | }
37 | #controls table input {
38 | width: 55px;
39 | }
40 | #controls table th {
41 | text-align: center;
42 | }
43 |
--------------------------------------------------------------------------------
/examples/heatmap/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/heatmap/thumb.jpg
--------------------------------------------------------------------------------
/examples/hurricanes/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Hurricane tracking data",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "level": 0,
6 | "order": 0,
7 | "about": {
8 | "text": "Explore historic hurricane paths since 1980 on an interactive map."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/hurricanes/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | #app-hovered-info
5 |
--------------------------------------------------------------------------------
/examples/hurricanes/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | overflow: hidden;
3 | }
4 | #app-hovered-info {
5 | position: absolute;
6 | bottom: 10px;
7 | left: 10px;
8 | }
9 |
10 | .bar rect {
11 | shape-rendering: crispEdges;
12 | }
13 |
14 | .bar text {
15 | fill: black;
16 | font: 16px sans-serif;
17 | pointer-events: none;
18 | }
19 |
20 | .axis path, .axis line {
21 | fill: none;
22 | stroke: black;
23 | shape-rendering: crispEdges;
24 | }
25 |
26 | .app-background {
27 | fill: rgba(255, 255, 255, 0.5);
28 | stroke: black;
29 | stroke-width: 1.5;
30 | transition: fill 250ms;
31 | pointer-events: visible !important;
32 | }
33 |
34 | .app-info-box .axis text {
35 | font: 12px sans-serif;
36 | }
37 |
38 | path.plot-line {
39 | fill: none;
40 | stroke: black;
41 | stroke-width: 2px;
42 | }
43 |
44 | .app-histogram *,.app-info-box text {
45 | pointer-events: none;
46 | }
47 | .app-background:hover {
48 | fill: rgba(255, 255, 255, 1);
49 | }
50 |
--------------------------------------------------------------------------------
/examples/hurricanes/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/hurricanes/thumb.jpg
--------------------------------------------------------------------------------
/examples/index-website.js:
--------------------------------------------------------------------------------
1 | require('../src/vendor');
2 | window.geo = require('../src/index');
3 |
4 | // codemirror and plugins
5 | require('codemirror/lib/codemirror.css');
6 | require('codemirror/addon/lint/lint.css');
7 | require('codemirror/addon/fold/foldgutter.css');
8 |
9 | window.jsonlint = require('jsonlint-mod');
10 | require('codemirror');
11 | require('codemirror/mode/javascript/javascript');
12 | require('codemirror/addon/lint/lint');
13 | require('codemirror/addon/lint/json-lint');
14 | require('codemirror/addon/fold/brace-fold');
15 | require('codemirror/addon/fold/foldcode');
16 | require('codemirror/addon/fold/foldgutter');
17 | require('codemirror/addon/edit/matchbrackets');
18 |
19 | // Colorbrewer
20 | window.colorbrewer = require('colorbrewer/index.ts').default;
21 |
22 | // d3
23 | window.d3 = require('d3');
24 |
--------------------------------------------------------------------------------
/examples/index.js:
--------------------------------------------------------------------------------
1 | require('../src/vendor');
2 | window.geo = require('../src/index');
3 |
4 | // bootstrap and themes
5 | require('bootstrap/dist/css/bootstrap.css');
6 | require('bootswatch/flatly/bootstrap.css');
7 | require('bootstrap');
8 |
9 | // codemirror and plugins
10 | window.jsonlint = require('jsonlint-mod');
11 | require('codemirror/lib/codemirror.css');
12 | require('codemirror/addon/lint/lint.css');
13 | require('codemirror/addon/fold/foldgutter.css');
14 |
15 | require('codemirror');
16 | require('codemirror/mode/javascript/javascript');
17 | require('codemirror/addon/lint/lint');
18 | require('codemirror/addon/lint/json-lint');
19 | require('codemirror/addon/fold/brace-fold');
20 | require('codemirror/addon/fold/foldcode');
21 | require('codemirror/addon/fold/foldgutter');
22 | require('codemirror/addon/edit/matchbrackets');
23 |
24 | // Colorbrewer
25 | window.colorbrewer = require('colorbrewer/index.ts').default;
26 |
27 | // d3
28 | window.d3 = require('d3');
29 |
30 | // common example code
31 | require('./common/examples.css');
32 | require('./common/examples');
33 |
--------------------------------------------------------------------------------
/examples/index.pug:
--------------------------------------------------------------------------------
1 | extends ./common/index.pug
2 |
3 | mixin thumbnail(ex)
4 | .col-md-4
5 | .thumbnail
6 | a(href=ex.path + "/")
7 | img(src=ex.path + "/thumb.jpg", onerror="this.src='osm/thumb.jpg';")
8 | .caption
9 | h3= ex.title
10 | if ex.about.text
11 | .description
12 | p= ex.about.text
13 |
14 | block prepend headerButtons
15 | ul.nav.navbar-nav.navbar-right
16 | li.dropdown
17 | a.dropdown-toggle(href="#", data-toggle="dropdown") Resources
18 | span.caret
19 | ul.dropdown-menu(role="menu")
20 | li
21 | a(href="https://github.com/OpenGeoscience/geojs") Source
22 | a(href="https://github.com/OpenGeoscience/geojs/issues") Bugs
23 | a(href="https://opengeoscience.github.io/geojs/apidocs/") Documentation
24 |
25 | block screenShot
26 |
27 | block mainContent
28 | .jumbotron
29 | .container
30 | h1 Welcome to GeoJS
31 | p GeoJS is a javascript library for visualizing geospatial
32 | | data in a browser. Its flexible API provides users with
33 | | the ability to combine multiple visualizations drawn
34 | | in WebGL, canvas, and SVG into a single dynamic map.
35 | p What can GeoJS do for you? See the examples below.
36 |
37 | .container-fluid
38 | - var iExample = 0;
39 | while iExample < examples.length
40 | .row
41 | - var i = 0
42 | while i < 3 && iExample < examples.length
43 | if !examples[iExample].disabled
44 | - i += 1
45 | +thumbnail(examples[iExample])
46 | - iExample += 1
47 |
--------------------------------------------------------------------------------
/examples/isoline/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Isolines",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "This example shows how to add isolines to a map."
6 | },
7 | "tests": [{
8 | "description": "isoline feature is loaded and has text",
9 | "wait": ["example.ready"],
10 | "tests": [
11 | "example.iso instanceof geo.isolineFeature",
12 | "example.isolineLayer.children()[2].features()[0] instanceof geo.textFeature"
13 | ]
14 | }]
15 | }
16 |
--------------------------------------------------------------------------------
/examples/isoline/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/isoline/thumb.jpg
--------------------------------------------------------------------------------
/examples/layerEvents/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "DOM events in layers",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "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."
7 | },
8 | "disabled": true
9 | }
10 |
--------------------------------------------------------------------------------
/examples/layerEvents/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | button.btn.btn-default.layer-toggle(type="button", data-toggle="button")
5 |
--------------------------------------------------------------------------------
/examples/layerEvents/main.css:
--------------------------------------------------------------------------------
1 | .layer-toggle {
2 | position: absolute;
3 | top: 90px;
4 | right: 30px;
5 | width: 200px;
6 | z-index: 1002;
7 | }
8 |
9 | .top-layer-overlay {
10 | fill: yellow;
11 | fill-opacity: 0.05;
12 | }
13 |
14 | rect.background {
15 | fill: white;
16 | fill-opacity: 100%;
17 | display: none;
18 | }
19 |
20 | svg text {
21 | font-family: source-sans-pro, Source Sans Pro, Helvetica, sans-serif;
22 | stroke: none;
23 | font-size: 26px;
24 | }
25 |
26 | rect.evt-box {
27 | stroke: black;
28 | stroke-width: 2px;
29 | stroke-opacity: 100%;
30 | fill-opacity: 25%;
31 | }
32 |
--------------------------------------------------------------------------------
/examples/layerEvents/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/layerEvents/thumb.jpg
--------------------------------------------------------------------------------
/examples/layers/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Raw layer interface",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "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."
7 | },
8 | "disabled": true
9 | }
10 |
--------------------------------------------------------------------------------
/examples/layers/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | // Add some toggles for removing adding layers
5 |
--------------------------------------------------------------------------------
/examples/layers/main.css:
--------------------------------------------------------------------------------
1 | rect.description {
2 | stroke: black;
3 | stroke-width: 1px;
4 | fill: none;
5 | }
6 |
7 | svg text {
8 | font-family: source-sans-pro, Source Sans Pro, Helvetica, sans-serif;
9 | stroke: none;
10 | }
11 |
12 | g.fixed-layer {
13 | fill: seagreen;
14 | stroke: seagreen;
15 | }
16 |
17 | g.scaled-moving-layer {
18 | fill: firebrick;
19 | stroke: firebrick;
20 | }
21 |
22 | g.unscaled-moving-layer {
23 | fill: steelblue;
24 | stroke: steelblue;
25 | }
26 |
27 | g.layer rect {
28 | stroke: black;
29 | fill-opacity: 50%;
30 | }
31 |
32 | g.layer circle {
33 | fill-opacity: 75%;
34 | stroke: black;
35 | }
36 |
37 | g.layer path {
38 | fill: none;
39 | stroke-width: 3;
40 | }
41 |
--------------------------------------------------------------------------------
/examples/layers/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/layers/thumb.jpg
--------------------------------------------------------------------------------
/examples/legend/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Feature legends",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "This example shows how to create a legend to describe feature styles on a map."
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/legend/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/legend/thumb.jpg
--------------------------------------------------------------------------------
/examples/lines/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Line Feature",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "thumbquery": "lines=250000&lineCap=round&strokeWidth=%7B%22residential%22%3A1%2C%22service%22%3A0.25%2C%22other%22%3A3%7D",
6 | "about": {
7 | "text": "This example shows the variations that are available for line features."
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/lines/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | overflow-x: hidden;
3 | overflow-y: auto;
4 | position: absolute;
5 | left: 10px;
6 | top: 80px;
7 | z-index: 2;
8 | border-radius: 5px;
9 | border: 1px solid grey;
10 | box-shadow: 1px 1px 3px black;
11 | opacity: 0.5;
12 | transition: opacity 250ms ease;
13 | background: #CCC;
14 | color: black;
15 | padding: 4px;
16 | font-size: 14px;
17 | max-height: calc(100% - 100px);
18 | min-width: 310px;
19 | }
20 | #controls:hover {
21 | opacity: 1;
22 | }
23 | #controls .form-group {
24 | margin-bottom: 0;
25 | }
26 | #controls label {
27 | min-width: 120px;
28 | }
29 | #controls #lines {
30 | width: 100px;
31 | }
32 | #controls #lines-loaded,#controls #lines-shown,#controls #simple-lines-shown {
33 | display: inline-block;
34 | font-size: 11px;
35 | padding-left: 5px;
36 | }
37 | #controls table input {
38 | width: 55px;
39 | }
40 | #controls table th {
41 | text-align: center;
42 | }
43 | .shortlabel {
44 | margin-bottom: 5px;
45 | font-weight: bold;
46 | display: inline-block;
47 | }
48 | #tooltip {
49 | margin-left: 0px;
50 | margin-top: -20px;
51 | height: 20px;
52 | line-height: 16px;
53 | padding: 2px 5px;
54 | background: rgba(255, 255, 255, 0.75);
55 | border-radius: 10px;
56 | border-bottom-left-radius: 0;
57 | border: 1px solid rgba(0, 0, 0, 0.75);
58 | font-size: 12px;
59 | color: black;
60 | }
61 | #controls #simplify_tolerance,#controls #resimplify_delay {
62 | width: 80px;
63 | }
64 |
--------------------------------------------------------------------------------
/examples/lines/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/lines/thumb.jpg
--------------------------------------------------------------------------------
/examples/main.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | overflow: auto;
3 | }
4 |
5 | .thumbnail {
6 | position: relative;
7 | overflow: hidden;
8 | }
9 |
10 | .thumbnail .caption .description{
11 | position: absolute;
12 | top: 0px;
13 | right: 0px;
14 | background: rgba(50, 50, 50, 0.8) !important;
15 | width: 100%;
16 | padding: 2%;
17 | display: none;
18 | text-align: center;
19 | color: #fff !important;
20 | z-index: 2;
21 | border-radius: 3px;
22 | }
23 |
24 | .navbar {
25 | margin: 0;
26 | }
27 |
--------------------------------------------------------------------------------
/examples/main.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | 'use strict';
3 |
4 | $('.thumbnail').hover(
5 | function () {
6 | $(this).find('.caption .description').slideDown(250);
7 | },
8 | function () {
9 | $(this).find('.caption .description').slideUp(250);
10 | }
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/examples/measure/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/measure/thumb.jpg
--------------------------------------------------------------------------------
/examples/osm/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Open street map layer",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "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."
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/osm/main.js:
--------------------------------------------------------------------------------
1 | // Run after the DOM loads
2 | $(function () {
3 | 'use strict';
4 |
5 | // Create a map object
6 | var map = geo.map({
7 | node: '#map',
8 | center: {
9 | x: -98.0,
10 | y: 39.5
11 | },
12 | zoom: 3
13 | });
14 |
15 | // Add the osm layer with a custom tile url
16 | map.createLayer(
17 | 'osm',
18 | {
19 | url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}',
20 | attribution: 'Tile data from USGS'
21 | }
22 | );
23 | });
24 |
--------------------------------------------------------------------------------
/examples/osm/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/osm/thumb.jpg
--------------------------------------------------------------------------------
/examples/picking/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Mouse picking for points and lines",
3 | "exampleJs": ["main.js", "widget.js"],
4 | "about": {
5 | "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."
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/picking/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/picking/thumb.jpg
--------------------------------------------------------------------------------
/examples/picking/widget.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | 'use strict';
3 |
4 | function smoothFunction(n, sigma) {
5 | var p = [], q = [];
6 | var i, j, dx, ss = sigma * sigma * 2 * n * n;
7 | var c = 1 / (2 * sigma * Math.PI);
8 | var rnd = d3.randomNormal();
9 |
10 | // preallocate
11 | p.length = n;
12 | q.length = n;
13 |
14 | for (i = 0; i < n; i += 1) {
15 | p[i] = rnd() / 50;
16 | }
17 |
18 | for (i = 0; i < n; i += 1) {
19 | q[i] = 0;
20 | for (j = 0; j < n; j += 1) {
21 | dx = j - i;
22 | q[i] += c * p[j] * Math.exp(-dx * dx / ss);
23 | }
24 | }
25 | return q;
26 | }
27 |
28 | /**
29 | * Create a differential random path in R^2.
30 | *
31 | * @param {int} n Number of points
32 | * @param {float} sigma Smoothness of the line (>0)
33 | */
34 | function randomPath(n, sigma, cx, cy) {
35 | var x = smoothFunction(n, sigma);
36 | var y = smoothFunction(n, sigma);
37 |
38 | return x.map(function (d, i) {
39 | return {
40 | x: cx + (d - 0.5) * 15,
41 | y: cy + (y[i] - 0.5) * 10
42 | };
43 | });
44 | }
45 |
46 | window.randomPath = randomPath;
47 | })();
48 |
--------------------------------------------------------------------------------
/examples/pixelmap/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Pixelmap feature",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "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."
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/pixelmap/pixelmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/pixelmap/pixelmap.png
--------------------------------------------------------------------------------
/examples/pixelmap/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/pixelmap/thumb.jpg
--------------------------------------------------------------------------------
/examples/points/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Point features",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "This example shows how to add styled point features to a map. It also demonstrates attaching event handlers to add interactivity and combine events from multiple layers. Notice how GeoJS events propagate through features and layers."
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/points/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/points/thumb.jpg
--------------------------------------------------------------------------------
/examples/points/white.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/points/white.jpg
--------------------------------------------------------------------------------
/examples/polygons/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Polygon features",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "This example shows how to add polygons to a map."
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/polygons/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/polygons/thumb.jpg
--------------------------------------------------------------------------------
/examples/quads/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Quad features",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "This example shows how to add dynamic quads to a map."
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/quads/flower1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/quads/flower1.jpg
--------------------------------------------------------------------------------
/examples/quads/flower2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/quads/flower2.jpg
--------------------------------------------------------------------------------
/examples/quads/flower3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/quads/flower3.jpg
--------------------------------------------------------------------------------
/examples/quads/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/quads/thumb.jpg
--------------------------------------------------------------------------------
/examples/rainfall/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Rainfall - Annual precipitation totals",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "Show isolines and contours of annual precipitation totals in the United States and nearby areas."
7 | },
8 | "tests": [{
9 | "description": "data is loaded and has isoline, isoline text, contour, and points",
10 | "wait": ["year === 2010"],
11 | "tests": [
12 | "iso instanceof geo.isolineFeature",
13 | "layer.children().filter(function (c) { return c instanceof geo.layer; })[0].features()[0] instanceof geo.textFeature",
14 | "iso.data().length === 30706",
15 | "contour.data().length === 30706",
16 | "point.data().length === 30706"
17 | ]
18 | }]
19 | }
20 |
--------------------------------------------------------------------------------
/examples/rainfall/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | #controls
5 | img#rewind
6 | img#back
7 | img#pause
8 | img#play
9 | img#step
10 | img#ff
11 | input#scrubber(type='range', min='0', value='0')
12 | | Year:
13 | |
14 | span#info.info loading
15 |
--------------------------------------------------------------------------------
/examples/rainfall/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | position: absolute;
3 | bottom: 10px;
4 | left: 10px;
5 | user-select: none;
6 | z-index: 10;
7 | }
8 | #controls img {
9 | width: 20px;
10 | height: 20px;
11 | }
12 | #controls input {
13 | display: block;
14 | }
15 | #controls span.info {
16 | border: 1px solid black;
17 | background: rgba(255, 255, 255, 0.5);
18 | text-align: center;
19 | font-family: monospace;
20 | display: inline-block;
21 | }
22 | #controls span#info {
23 | width: 70px;
24 | }
25 | #tooltip {
26 | text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.5), 1px -1px 0 rgba(255, 255, 255, 0.5), -1px 1px 0 rgba(255, 255, 255, 0.5), 1px 1px 0 rgba(255, 255, 255, 0.5);
27 | margin-left: 15px;
28 | font-weight: bold;
29 | color: black;
30 | }
31 |
--------------------------------------------------------------------------------
/examples/rainfall/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/rainfall/thumb.jpg
--------------------------------------------------------------------------------
/examples/reprojection/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Reproject tiles",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "thumbquery": "gcs=ESRI%3A54009",
6 | "about": {
7 | "text": "This example shows how you can reproject tiles from one projection to another. The source tiles are in Web Mercator (EPSG:3857), but can be drawn in many different projections."
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/reprojection/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | #controls
5 | .form-group(title="The url used to fetch tiles. Use {x}, {y}, {z}, and {s} for templating. Example: https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")
6 | label(for="layer-url") Tile URL
7 | select#layer-url.layerparam(param-name="url", list="url-list")
8 | option(value="osm") OSM
9 | option(value="stamen-toner-lite") Stamen Toner Lite
10 | option(value="../../data/tilefancy.png") Fancy Test Tile
11 | .form-group(title="Web maps are most often rendered using a Mercator geographic coordinate system, but other projections can be used. See spatialreference.org for more information on projections.")
12 | label(for="map-gcs") Map GCS
13 | select#map-gcs.mapparam(param-name="gcs", placeholder="EPSG:3857 - Web Mercator", reload="true")
14 | option(value="EPSG:3857") EPSG:3857 - Web Mercator
15 | .form-group(title="Show capital cities of the world. Click on a city to center it.")
16 | label(for="capitals") Show Capitals
17 | input#capitals.mapparam(param-name="capitals", type="checkbox", placeholder="true", checked="checked")
18 |
--------------------------------------------------------------------------------
/examples/reprojection/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | overflow-x: hidden;
3 | overflow-y: auto;
4 | position: absolute;
5 | left: 10px;
6 | top: 80px;
7 | z-index: 10;
8 | border-radius: 5px;
9 | border: 1px solid grey;
10 | box-shadow: 1px 1px 3px black;
11 | opacity: 0.5;
12 | transition: opacity 250ms ease;
13 | background: #CCC;
14 | color: black;
15 | padding: 4px;
16 | font-size: 14px;
17 | }
18 | #controls:hover {
19 | opacity: 1;
20 | }
21 | #controls.no-controls {
22 | display: none;
23 | }
24 | #controls .form-group {
25 | margin-bottom: 0;
26 | }
27 | #controls label {
28 | min-width: 90px;
29 | }
30 | #map-gcs {
31 | width: 200px;
32 | }
33 | #tooltip {
34 | margin-left: 10px;
35 | margin-top: -10px;
36 | height: 20px;
37 | line-height: 16px;
38 | padding: 2px 5px;
39 | background: rgba(255, 255, 255, 0.5);
40 | border-radius: 10px;
41 | font-size: 12px;
42 | color: black;
43 | }
44 |
--------------------------------------------------------------------------------
/examples/reprojection/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/reprojection/thumb.jpg
--------------------------------------------------------------------------------
/examples/sld/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Styling WMS raster layers",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "Rendering tiles from a WMS server by customizing the style."
7 | },
8 | "disabled": true,
9 | "disable_tests": [{
10 | "description": "data is loaded from the WMS source",
11 | "idle": ["$('#map.geojs-map').data('data-geojs-map').onIdle"],
12 | "tests": [
13 | "Object.keys($('#map.geojs-map').data('data-geojs-map').layers()[1]._activeTiles).length === 15",
14 | "$('#map.geojs-map').data('data-geojs-map').layers()[1]._activeTiles['9_194_148']._image.naturalWidth === 256"
15 | ]
16 | }]
17 | }
18 |
--------------------------------------------------------------------------------
/examples/sld/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | #controls
5 |
6 | .form-group(title="Base URL")
7 | label(for="baseurl") Base URL
8 | input#baseurl(placeholder="https://demo.boundlessgeo.com/geoserver/ows")
9 |
10 | .form-group(title="Layer Name")
11 | label(for="name") Layer Name
12 | input#name(placeholder="usgs:ned")
13 |
14 | .form-group(title="Projection")
15 | label(for="projection") Projection
16 | input#projection(placeholder="EPSG:3785")
17 |
18 | .form-group(title="Select a color palette.")
19 | label(for="palette") Color Palette
20 | select#palette(placeholder="YlGn")
21 |
22 | .form-group(title="Select number of colors.")
23 | label(for="color-count") Number of colors
24 | select#color-count(param-name="color-count")
25 |
26 | .form-group(title="Discrete or continuous colors.")
27 | label(for="palette-type") Palette Type
28 | select#palette-type(placeholder="continuous")
29 | option(value="continuous") Continuous
30 | option(value="discrete") Discrete
31 |
32 | .form-group(title="Minimum value for your data")
33 | label(for="min") Minimum
34 | input#min(placeholder="0")
35 |
36 | .form-group(title="Maximum value for your data.")
37 | label(for="max") Maximum
38 | input#max(placeholder="300")
39 |
--------------------------------------------------------------------------------
/examples/sld/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | overflow-x: hidden;
3 | overflow-y: auto;
4 | position: absolute;
5 | left: 10px;
6 | top: 80px;
7 | z-index: 10;
8 | border-radius: 5px;
9 | border: 1px solid grey;
10 | box-shadow: 1px 1px 3px black;
11 | opacity: 0.5;
12 | transition: opacity 250ms ease;
13 | background: #CCC;
14 | color: black;
15 | padding: 4px;
16 | font-size: 14px;
17 | }
18 | #controls:hover {
19 | opacity: 1;
20 | }
21 | #controls.no-controls {
22 | display: none;
23 | }
24 | #controls .form-group {
25 | margin-bottom: 0;
26 | }
27 | #controls label {
28 | min-width: 90px;
29 | }
30 |
--------------------------------------------------------------------------------
/examples/sld/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/sld/thumb.jpg
--------------------------------------------------------------------------------
/examples/tiles/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Tile layer with controllable options",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "This example provides controls for changing many options on tile layers. The code and query parameters allow even more options to be adjusted."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/tiles/main.css:
--------------------------------------------------------------------------------
1 | #map.debug-border .geo-tile-container:before {
2 | content: "";
3 | box-sizing: inherit;
4 | border: 4px solid rgba(0,0,0,0.25);
5 | position: absolute;
6 | top: 0;
7 | left: 0;
8 | bottom: 0;
9 | right: 0;
10 | z-index: 1;
11 | }
12 | #map.debug-label .geo-tile-container:after {
13 | content: attr(tile-reference);
14 | position: absolute;
15 | top: 5px;
16 | left: 10px;
17 | font-size: 30px;
18 | line-height: 1.3em;
19 | color: black;
20 | }
21 | @keyframes imgfadein {
22 | from { opacity: 0; }
23 | to { opacity: 1; }
24 | }
25 | #map.fade-image .geo-tile-container img {
26 | animation: imgfadein 2s forwards;
27 | }
28 | #controls {
29 | overflow-x: hidden;
30 | overflow-y: auto;
31 | position: absolute;
32 | left: 10px;
33 | top: 80px;
34 | z-index: 1;
35 | border-radius: 5px;
36 | border: 1px solid grey;
37 | box-shadow: 1px 1px 3px black;
38 | opacity: 0.5;
39 | transition: opacity 250ms ease;
40 | background: #CCC;
41 | color: black;
42 | padding: 4px;
43 | font-size: 14px;
44 | max-height: calc(100% - 100px);
45 | min-width: 310px;
46 | }
47 | #controls:hover {
48 | opacity: 1;
49 | }
50 | #controls.no-controls {
51 | display: none;
52 | }
53 | #controls .form-group {
54 | margin-bottom: 0;
55 | }
56 | #controls label {
57 | min-width: 120px;
58 | }
59 | #map-gcs {
60 | max-width: 200px;
61 | }
62 |
--------------------------------------------------------------------------------
/examples/tiles/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/tiles/thumb.jpg
--------------------------------------------------------------------------------
/examples/transitions/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Using animated transitions",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "Using animations to transition between points on a map."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/transitions/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block append mainContent
4 | #controls
5 | button#pan-to-london Pan to London
6 | button#elastic-to-moscow Elastic to Moscow
7 | button#bounce-to-istanbul Bounce to Istanbul
8 | button#fly-to-bern Fly to Bern
9 | button#spin-to-budapest Spin to Budapest
10 | button#test.hidden Test
11 |
--------------------------------------------------------------------------------
/examples/transitions/main.css:
--------------------------------------------------------------------------------
1 | #controls {
2 | position: absolute;
3 | right: 30px;
4 | top: 90px;
5 | }
6 |
--------------------------------------------------------------------------------
/examples/transitions/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/transitions/thumb.jpg
--------------------------------------------------------------------------------
/examples/twomaps/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "One map set inside another.",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js"],
5 | "about": {
6 | "text": "This example show how two maps can be made to move together and show similar, but different data."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/twomaps/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block mainContent
4 | #maindiv
5 | #mapdiv
6 | #map
7 | #insetdiv
8 | #insetmap
9 |
--------------------------------------------------------------------------------
/examples/twomaps/main.css:
--------------------------------------------------------------------------------
1 | #maindiv {
2 | width: 100%;
3 | height: calc(100% - 60px);
4 | position: relative;
5 | overflow: hidden;
6 | }
7 | #mapdiv {
8 | top: 0;
9 | left: 0;
10 | bottom: 0;
11 | right: 0;
12 | position: absolute;
13 | z-index: 0;
14 | }
15 | #insetdiv {
16 | top: 25%;
17 | left: 25%;
18 | bottom: 25%;
19 | right: 25%;
20 | position: absolute;
21 | z-index: 1;
22 | }
23 | #insetdiv.circular {
24 | top: 50%;
25 | margin-top: -250px;
26 | left: 50%;
27 | margin-left: -250px;
28 | bottom: inherit;
29 | right: inherit;
30 | width: 500px;
31 | height: 500px;
32 | border-radius: 50%;
33 | overflow: hidden;
34 | }
35 | #map, #insetmap {
36 | top: 0;
37 | width: 100%;
38 | height: 100%;
39 | }
40 | #mapdiv:focus, #insetdiv:focus {
41 | outline: none;
42 | }
43 | #map:focus, #insetmap:focus {
44 | outline: none;
45 | }
46 | .geo-attribution {
47 | max-width: 50%;
48 | }
49 | #tooltip1, #tooltip2 {
50 | font-size: 14px;
51 | font-family: sans-serif;
52 | }
53 | #tooltip1 {
54 | color: black;
55 | text-shadow: 0 0 2px white;
56 | }
57 | #tooltip2 {
58 | color: white;
59 | text-shadow: 0 0 2px black;
60 | }
61 |
--------------------------------------------------------------------------------
/examples/twomaps/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/twomaps/thumb.jpg
--------------------------------------------------------------------------------
/examples/ui/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "User interface widgets",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "A basic map with user interface widgets"
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/ui/main.js:
--------------------------------------------------------------------------------
1 | // Run after the DOM loads
2 | $(function () {
3 | 'use strict';
4 |
5 | // Create a map object
6 | var map = geo.map({
7 | node: '#map',
8 | center: {
9 | x: -98.0,
10 | y: 39.5
11 | },
12 | zoom: 4
13 | });
14 |
15 | // Add the osm layer
16 | map.createLayer('osm');
17 |
18 | // Add a layer for the ui elements and create a zoom slider
19 | map.createLayer('ui')
20 | .createWidget('slider');
21 | });
22 |
--------------------------------------------------------------------------------
/examples/ui/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/ui/thumb.jpg
--------------------------------------------------------------------------------
/examples/vectors/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Vectors",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "Basic map rendering different sets of vectors with different marker styles."
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/vtkjs/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Use VTK.js along with GeoJS",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "Show national capitals as points using the vtkjs renderer."
6 | },
7 | "disabled": true
8 | }
9 |
--------------------------------------------------------------------------------
/examples/vtkjs/main.js:
--------------------------------------------------------------------------------
1 | // Fetch the dataset from the server
2 | $.ajax({url: '../reprojection/capitals.json'}).done(function (capitals) {
3 | // Create a map
4 | var map = geo.map({node: '#map'});
5 | // Add the map tile layer
6 | map.createLayer('osm');
7 | // Create a vtk point feature layer
8 | var vtkLayer = map.createLayer('feature', {renderer: 'vtkjs'});
9 | vtkLayer.createFeature('point', {
10 | selectionAPI: true,
11 | style: {
12 | radius: 5,
13 | fillColor: 'red',
14 | fillOpacity: 1
15 | }
16 | })
17 | // Bind the dataset to the vtk layer
18 | .data(capitals)
19 | .position(function (d) {
20 | return {x: d.longitude, y: d.latitude}; // position accessor
21 | })
22 | .draw();
23 | });
24 |
--------------------------------------------------------------------------------
/examples/widgets/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Map Widgets",
3 | "exampleCss": ["main.css"],
4 | "exampleJs": ["main.js", "chart.js"],
5 | "about": {
6 | "text": "This example shows how the widgets API can be used to place elements on top of the map."
7 | },
8 | "disabled": false
9 | }
10 |
--------------------------------------------------------------------------------
/examples/widgets/main.css:
--------------------------------------------------------------------------------
1 | #svg-container {
2 | background-color: #fff;
3 | width: 750px;
4 | opacity: .9;
5 | }
6 |
7 | .axis path,
8 | .axis line {
9 | fill: none;
10 | stroke: #000;
11 | shape-rendering: crispEdges;
12 | }
13 |
14 | .x.axis path {
15 | display: none;
16 | }
17 |
18 | .line {
19 | fill: none;
20 | stroke: steelblue;
21 | stroke-width: 1.5px;
22 | }
23 |
--------------------------------------------------------------------------------
/examples/widgets/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/widgets/thumb.jpg
--------------------------------------------------------------------------------
/examples/wms/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Rendering tiles from a WMS server",
3 | "exampleJs": ["main.js"],
4 | "about": {
5 | "text": "Rendering tiles from a WMS server by customizing the tile URL of an OSM layer."
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/wms/main.js:
--------------------------------------------------------------------------------
1 | // Run after the DOM loads
2 | $(function () {
3 | 'use strict';
4 |
5 | // Create a map object
6 | var map = geo.map({
7 | node: '#map',
8 | zoom: 4,
9 | center: {x: -98.0, y: 39.5}
10 | });
11 |
12 | // Add an OSM layer with a WMS server as the source of its titles
13 | var wms = map.createLayer('osm', {keepLower: false, attribution: null});
14 |
15 | var projection = 'EPSG:3857';
16 |
17 | wms.url(
18 | function (x, y, zoom) {
19 | // Compute the bounding box
20 | var bb = this.gcsTileBounds({x: x, y: y, level: zoom}, projection);
21 | var bbox_mercator = bb.left + ',' + bb.bottom + ',' + bb.right + ',' + bb.top;
22 |
23 | // Set the WMS server parameters
24 | var params = {
25 | SERVICE: 'WMS',
26 | VERSION: '1.3.0',
27 | REQUEST: 'GetMap',
28 | LAYERS: 'topp:states', // US Population
29 | STYLES: '',
30 | BBOX: bbox_mercator,
31 | WIDTH: 256, //Use 256x256 tiles
32 | HEIGHT: 256,
33 | FORMAT: 'image/png',
34 | TRANSPARENT: true,
35 | SRS: projection,
36 | TILED: true
37 | };
38 |
39 | // OpenGeo Demo Web Map Service
40 | var baseUrl = 'https://ahocevar.com/geoserver/wms';
41 | return baseUrl + '?' + $.param(params);
42 | }
43 | );
44 | });
45 |
--------------------------------------------------------------------------------
/examples/wms/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/examples/wms/thumb.jpg
--------------------------------------------------------------------------------
/jsdoc.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "opts": {
3 | "template": "jsdoc/template"
4 | },
5 | "plugins": [
6 | "jsdoc/plugins/events",
7 | "jsdoc/plugins/typedef_augments",
8 | "jsdoc/plugins/dot_in_name",
9 | "node_modules/jsdoc-autoprivate/autoprivate.js",
10 | "plugins/markdown"
11 | ],
12 | "templates": {
13 | "applicationName": "GeoJS",
14 | "linenums": true,
15 | "cleverLinks": true,
16 | "default": {
17 | "outputSourceFiles": true
18 | }
19 | },
20 | "docdash": {
21 | "static": true,
22 | "sort": true,
23 | "sectionOrder": [
24 | "Classes",
25 | "Modules",
26 | "Externals",
27 | "Events",
28 | "Namespaces",
29 | "Mixins",
30 | "Tutorials",
31 | "Interfaces"
32 | ],
33 | "search": true,
34 | "collapse": true,
35 | "wrap": false,
36 | "typedefs": true,
37 | "removeQuotes": "trim",
38 | "scopeInOutputPath": false,
39 | "nameInOutputPath": false,
40 | "versionInOutputPath": false,
41 | "menu": {
42 | "GitHub Repository": {
43 | "href": "https://github.com/OpenGeoscience/geojs",
44 | "target":"_blank",
45 | "class":"menu-item",
46 | "id":"website_link"
47 | }
48 | },
49 | "openGraph": {
50 | "title": "GeoJS"
51 | },
52 | "meta": {
53 | "title": "GeoJS"
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/jsdoc/plugins/dot_in_name.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Allow doclet names to include a dot. The text '_DOT_' is replaced by a dot
3 | * in the documentation.
4 | */
5 | var dotToken = '_DOT_';
6 |
7 | exports.handlers = {
8 | processingComplete: function (e) {
9 | e.doclets.forEach(function (doclet) {
10 | if (doclet.name.indexOf(dotToken) >= 0) {
11 | doclet.name = doclet.name.replace(new RegExp(dotToken, 'g'), '.');
12 | }
13 | });
14 | }
15 | };
16 |
--------------------------------------------------------------------------------
/jsdoc/plugins/events.js:
--------------------------------------------------------------------------------
1 | function fixEventName(event) {
2 | return event.replace('event:', '');
3 | }
4 |
5 | /**
6 | * Define a jsdoc plugin to replace the `longname` of
7 | * event doclets from `geo.event.event:pan` to `geo.event.pan`.
8 | */
9 | exports.handlers = {
10 | /**
11 | * Replace the `longname` of all event doclets.
12 | */
13 | newDoclet: function (e) {
14 | var doclet = e.doclet;
15 | if (doclet.kind === 'event') {
16 | doclet.longname = fixEventName(doclet.longname);
17 | }
18 | },
19 |
20 | /**
21 | * Replace the displayed name of events to match the changed
22 | * doclet names.
23 | */
24 | parseComplete: function (e) {
25 | e.doclets.forEach(function (doclet) {
26 | if (doclet.fires) {
27 | doclet.fires = doclet.fires.map(fixEventName);
28 | }
29 | if (doclet.listens) {
30 | doclet.listens = doclet.listens.map(fixEventName);
31 | }
32 | });
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/jsdoc/template/publish.js:
--------------------------------------------------------------------------------
1 | /*global env: true */
2 |
3 | /* This is largely copied from jaguarjs-jsdoc's publish.js file. The outdir
4 | * outdir does not have the package name and version appended to it, and we add
5 | * the git commit sha to the available information.
6 | */
7 |
8 | /* Copy the jaguarjs-jsdoc template, then add in our own files. */
9 | var fse = require('fs-extra');
10 |
11 | fse.copySync('node_modules/docdash/tmpl', 'jsdoc/template/tmpl');
12 | fse.copySync('node_modules/docdash/static', 'jsdoc/template/static');
13 |
14 | Object.values(fse.readdirSync('jsdoc/template')).forEach(file => {
15 | if (file.endsWith('.tmpl')) {
16 | fse.copySync('jsdoc/template/' + file, 'jsdoc/template/tmpl/' + file);
17 | }
18 | fse.appendFileSync('jsdoc/template/static/styles/jsdoc.css', fse.readFileSync('jsdoc/template/style.css').toString());
19 | });
20 |
21 | /* Also get the git sha, if possible */
22 |
23 | var gitsha, version;
24 | try {
25 | gitsha = require('child_process').execSync('git rev-parse HEAD').toString().trim();
26 | version = require('child_process').execSync('git describe --tags').toString().trim().substr(1);
27 | } catch (err) { }
28 | env.conf.geojs = {gitsha: gitsha, version: version};
29 |
30 | exports.publish = require('docdash/publish.js').publish;
31 |
--------------------------------------------------------------------------------
/jsdoc/template/style.css:
--------------------------------------------------------------------------------
1 | #main ul.list {
2 | column-width: 240px;
3 | padding: 0;
4 | margin: 0;
5 | }
6 | #main ul.list li {
7 | list-style-type: none;
8 | line-height: 133%;
9 | }
10 | #main .top-class-list, #main .top-typedef-list {
11 | padding-left: 30px;
12 | }
13 | nav > ul > li > a {
14 | margin-top: 5px;
15 | }
16 |
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function (config) {
2 | config.set(require('./karma-base')(config));
3 | };
4 |
--------------------------------------------------------------------------------
/scripts/preprocess_glsl.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | import argparse
4 | import os
5 | import re
6 | import sys
7 |
8 |
9 | def readSource(source):
10 | data = open(source).read()
11 | parts = re.split('(\\$[-.\\w]+)', data)
12 | for idx, chunk in enumerate(parts):
13 | if chunk.startswith('$') and len(chunk) > 1:
14 | parts[idx] = readSource(os.path.join(os.path.dirname(source), chunk[1:] + '.glsl'))
15 | return ''.join(parts)
16 |
17 |
18 | if __name__ == '__main__':
19 | parser = argparse.ArgumentParser(
20 | description='Preprocess glsl files to handle includes in the same way '
21 | 'as shader-loader. The output of this can sent to glslangValidator.')
22 | parser.add_argument('source', help='Source file')
23 | args = parser.parse_args()
24 | data = readSource(args.source)
25 | sys.stdout.write(data)
26 |
--------------------------------------------------------------------------------
/src/action.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Common object containing all action types that are provided by the GeoJS
3 | * API.
4 | *
5 | * @namespace
6 | * @alias geo.action
7 | * @enum {string}
8 | */
9 | var geo_action = {
10 | momentum: 'geo_action_momentum',
11 | pan: 'geo_action_pan',
12 | rotate: 'geo_action_rotate',
13 | select: 'geo_action_select',
14 | unzoomselect: 'geo_action_unzoomselect',
15 | zoom: 'geo_action_zoom',
16 | zoomrotate: 'geo_action_zoom_rotate',
17 | zoomselect: 'geo_action_zoomselect',
18 |
19 | // annotation actions -- some are also added by the registry
20 | annotation_edit_handle: 'geo_annotation_edit_handle',
21 | annotation_cursor: 'geo_annotation_cursor'
22 | };
23 |
24 | module.exports = geo_action;
25 |
--------------------------------------------------------------------------------
/src/annotation/circleAnnotation.js:
--------------------------------------------------------------------------------
1 | const inherit = require('../inherit');
2 | const registerAnnotation = require('../registry').registerAnnotation;
3 | const markerFeature = require('../markerFeature');
4 | const util = require('../util');
5 |
6 | const ellipseAnnotation = require('./ellipseAnnotation');
7 |
8 | /**
9 | * Circle annotation class.
10 | *
11 | * Circles are a subset of rectangles with a fixed aspect ratio.
12 | *
13 | * @class
14 | * @alias geo.circleAnnotation
15 | * @extends geo.annotation
16 | *
17 | * @param {geo.circleAnnotation.spec?} [args] Options for the annotation.
18 | * @param {string} [annotationName] Override the annotation name.
19 | */
20 | var circleAnnotation = function (args, annotationName) {
21 | 'use strict';
22 | if (!(this instanceof circleAnnotation)) {
23 | return new circleAnnotation(args, annotationName);
24 | }
25 | args = util.deepMerge({}, this.constructor.defaults, args, {constraint: 1});
26 | ellipseAnnotation.call(this, args, annotationName || 'circle');
27 | };
28 | inherit(circleAnnotation, ellipseAnnotation);
29 |
30 | /**
31 | * This object contains the default options to initialize the class.
32 | */
33 | circleAnnotation.defaults = Object.assign({}, ellipseAnnotation.defaults, {
34 | });
35 |
36 | var circleRequiredFeatures = {};
37 | circleRequiredFeatures[markerFeature.capabilities.feature] = true;
38 | registerAnnotation('circle', circleAnnotation, circleRequiredFeatures);
39 |
40 | module.exports = circleAnnotation;
41 |
--------------------------------------------------------------------------------
/src/annotation/index.js:
--------------------------------------------------------------------------------
1 | const annotation = require('./annotation');
2 |
3 | /**
4 | * @namespace geo.annotation
5 | */
6 | module.exports = {
7 | state: annotation.state,
8 | actionOwner: annotation.actionOwner,
9 | annotation: annotation.annotation,
10 | _editHandleFeatureLevel: annotation._editHandleFeatureLevel,
11 | defaultEditHandleStyle: annotation.defaultEditHandleStyle,
12 | constrainAspectRatio: annotation.constrainAspectRatio,
13 | baseAnnotation: annotation,
14 | circleAnnotation: require('./circleAnnotation'),
15 | ellipseAnnotation: require('./ellipseAnnotation'),
16 | lineAnnotation: require('./lineAnnotation'),
17 | pointAnnotation: require('./pointAnnotation'),
18 | polygonAnnotation: require('./polygonAnnotation'),
19 | rectangleAnnotation: require('./rectangleAnnotation'),
20 | squareAnnotation: require('./squareAnnotation')
21 | };
22 |
--------------------------------------------------------------------------------
/src/annotation/squareAnnotation.js:
--------------------------------------------------------------------------------
1 | const inherit = require('../inherit');
2 | const registerAnnotation = require('../registry').registerAnnotation;
3 | const polygonFeature = require('../polygonFeature');
4 | const util = require('../util');
5 |
6 | const rectangleAnnotation = require('./rectangleAnnotation');
7 |
8 | /**
9 | * Square annotation class.
10 | *
11 | * Squares are a subset of rectangles with a fixed aspect ratio.
12 | *
13 | * @class
14 | * @alias geo.squareAnnotation
15 | * @extends geo.annotation
16 | *
17 | * @param {geo.squareAnnotation.spec?} [args] Options for the annotation.
18 | * @param {string} [annotationName] Override the annotation name.
19 | */
20 | var squareAnnotation = function (args, annotationName) {
21 | 'use strict';
22 | if (!(this instanceof squareAnnotation)) {
23 | return new squareAnnotation(args, annotationName);
24 | }
25 | args = util.deepMerge({}, this.constructor.defaults, args, {constraint: 1});
26 | rectangleAnnotation.call(this, args, annotationName || 'square');
27 | };
28 | inherit(squareAnnotation, rectangleAnnotation);
29 |
30 | /**
31 | * This object contains the default options to initialize the class.
32 | */
33 | squareAnnotation.defaults = Object.assign({}, rectangleAnnotation.defaults, {
34 | });
35 |
36 | var squareRequiredFeatures = {};
37 | squareRequiredFeatures[polygonFeature.capabilities.feature] = true;
38 | registerAnnotation('square', squareAnnotation, squareRequiredFeatures);
39 |
40 | module.exports = squareAnnotation;
41 |
--------------------------------------------------------------------------------
/src/canvas/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @namespace geo.canvas
3 | */
4 | module.exports = {
5 | canvasRenderer: require('./canvasRenderer'),
6 | heatmapFeature: require('./heatmapFeature'),
7 | isolineFeature: require('./isolineFeature'),
8 | lineFeature: require('./lineFeature'),
9 | pixelmapFeature: require('./pixelmapFeature'),
10 | quadFeature: require('./quadFeature'),
11 | textFeature: require('./textFeature'),
12 | tileLayer: require('./tileLayer'),
13 | trackFeature: require('./trackFeature')
14 | };
15 |
--------------------------------------------------------------------------------
/src/canvas/isolineFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var isolineFeature = require('../isolineFeature');
4 |
5 | /**
6 | * Create a new instance of class isolineFeature.
7 | *
8 | * @class
9 | * @alias geo.canvas.isolineFeature
10 | * @extends geo.isolineFeature
11 | * @param {geo.isolineFeature.spec} arg
12 | * @returns {geo.canvas.isolineFeature}
13 | */
14 | var canvas_isolineFeature = function (arg) {
15 | 'use strict';
16 | if (!(this instanceof canvas_isolineFeature)) {
17 | return new canvas_isolineFeature(arg);
18 | }
19 |
20 | arg = arg || {};
21 | isolineFeature.call(this, arg);
22 |
23 | var object = require('./object');
24 | object.call(this);
25 |
26 | this._init(arg);
27 | return this;
28 | };
29 |
30 | inherit(canvas_isolineFeature, isolineFeature);
31 |
32 | // Now register it
33 | registerFeature('canvas', 'isoline', canvas_isolineFeature);
34 | module.exports = canvas_isolineFeature;
35 |
--------------------------------------------------------------------------------
/src/canvas/trackFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var trackFeature = require('../trackFeature');
4 |
5 | /**
6 | * Create a new instance of class trackFeature.
7 | *
8 | * @class
9 | * @alias geo.canvas.trackFeature
10 | * @extends geo.trackFeature
11 | * @param {geo.trackFeature.spec} arg
12 | * @returns {geo.canvas.trackFeature}
13 | */
14 | var canvas_trackFeature = function (arg) {
15 | 'use strict';
16 | if (!(this instanceof canvas_trackFeature)) {
17 | return new canvas_trackFeature(arg);
18 | }
19 |
20 | arg = arg || {};
21 | trackFeature.call(this, arg);
22 |
23 | var object = require('./object');
24 | object.call(this);
25 |
26 | this._init(arg);
27 | return this;
28 | };
29 |
30 | inherit(canvas_trackFeature, trackFeature);
31 |
32 | // Now register it
33 | registerFeature('canvas', 'track', canvas_trackFeature);
34 | module.exports = canvas_trackFeature;
35 |
--------------------------------------------------------------------------------
/src/css/cursor-crosshair-difference.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/css/cursor-crosshair-intersect.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/css/cursor-crosshair-union.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/css/cursor-crosshair-xor.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/domRenderer.js:
--------------------------------------------------------------------------------
1 | var inherit = require('./inherit');
2 | var renderer = require('./renderer');
3 | var registerRenderer = require('./registry').registerRenderer;
4 |
5 | /**
6 | * Create a new instance of class domRenderer.
7 | *
8 | * @class
9 | * @alias geo.domRenderer
10 | * @extends geo.renderer
11 | * @param {object} arg Options for the renderer.
12 | * @param {geo.layer} [arg.layer] Layer associated with the renderer.
13 | * @param {HTMLElement} [arg.canvas] Canvas element associated with the
14 | * renderer.
15 | * @returns {geo.domRenderer}
16 | */
17 | var domRenderer = function (arg) {
18 | 'use strict';
19 |
20 | if (!(this instanceof domRenderer)) {
21 | return new domRenderer(arg);
22 | }
23 | renderer.call(this, arg);
24 |
25 | arg = arg || {};
26 |
27 | var m_this = this;
28 |
29 | /**
30 | * Get API used by the renderer.
31 | *
32 | * @returns {string} 'dom'.
33 | */
34 | this.api = function () {
35 | return 'dom';
36 | };
37 |
38 | /**
39 | * Initialize.
40 | *
41 | * @param {object} [arg] Optional arguments.
42 | * @returns {this}
43 | */
44 | this._init = function (arg) {
45 | var layer = m_this.layer().node();
46 |
47 | if (!m_this.canvas() && layer && layer.length) {
48 | // The renderer and the UI Layer share the same canvas
49 | // at least for now. This renderer is essentially a noop renderer
50 | // designed for backwards compatibility
51 | m_this.canvas(layer[0]);
52 | }
53 | return m_this;
54 | };
55 |
56 | this._init(arg);
57 | return this;
58 | };
59 |
60 | inherit(domRenderer, renderer);
61 | registerRenderer('dom', domRenderer);
62 | module.exports = domRenderer;
63 |
--------------------------------------------------------------------------------
/src/inherit.js:
--------------------------------------------------------------------------------
1 | function newfunc() {
2 | return function () {};
3 | }
4 |
5 | /**
6 | * Convenient function to define JS inheritance.
7 | *
8 | * @param {object} C Child class instance.
9 | * @param {object} P Parent class instance.
10 | */
11 | module.exports = function (C, P) {
12 | var F = newfunc();
13 | F.prototype = P.prototype;
14 | C.prototype = new F();
15 | C.prototype.constructor = C;
16 | };
17 |
--------------------------------------------------------------------------------
/src/sha.js:
--------------------------------------------------------------------------------
1 | /* global GEO_SHA */
2 |
3 | /**
4 | * The current geojs git SHA.
5 | *
6 | * @alias geo.sha
7 | * @constant
8 | * @type {string}
9 | */
10 | module.exports = GEO_SHA;
11 |
--------------------------------------------------------------------------------
/src/svg/graphFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var graphFeature = require('../graphFeature');
4 |
5 | /**
6 | * Create a new instance of svg.graphFeature.
7 | *
8 | * @class
9 | * @alias geo.svg.graphFeature
10 | * @extends geo.graphFeature
11 | * @param {geo.graphFeature.spec} arg Feature options.
12 | * @returns {geo.graphFeature}
13 | */
14 | var svg_graphFeature = function (arg) {
15 | 'use strict';
16 |
17 | var m_this = this;
18 |
19 | if (!(this instanceof svg_graphFeature)) {
20 | return new svg_graphFeature(arg);
21 | }
22 | graphFeature.call(this, arg);
23 |
24 | /**
25 | * Return a d3 selection for the graph elements.
26 | *
27 | * @returns {object} An object with `nodes` and `links`, both d3 selectors
28 | * for the graph elements.
29 | */
30 | this.select = function () {
31 | var renderer = m_this.renderer(),
32 | selection = {},
33 | node = m_this.nodeFeature(),
34 | links = m_this.linkFeatures();
35 | selection.nodes = renderer.select(node._svgid());
36 | selection.links = links.map(function (link) {
37 | return renderer.select(link._svgid());
38 | });
39 | return selection;
40 | };
41 |
42 | return this;
43 | };
44 |
45 | inherit(svg_graphFeature, graphFeature);
46 |
47 | registerFeature('svg', 'graph', svg_graphFeature);
48 |
49 | module.exports = svg_graphFeature;
50 |
--------------------------------------------------------------------------------
/src/svg/index.js:
--------------------------------------------------------------------------------
1 | var geo_event = require('../event.js');
2 | geo_event.svg = {
3 | rescale: require('./rescale')
4 | };
5 |
6 | /**
7 | * @namespace geo.svg
8 | */
9 | module.exports = {
10 | graphFeature: require('./graphFeature'),
11 | lineFeature: require('./lineFeature'),
12 | object: require('./object'),
13 | pathFeature: require('./pathFeature'),
14 | pointFeature: require('./pointFeature'),
15 | quadFeature: require('./quadFeature'),
16 | renderer: require('./svgRenderer'),
17 | tileLayer: require('./tileLayer'),
18 | trackFeature: require('./trackFeature'),
19 | uniqueID: require('./uniqueID'),
20 | vectorFeature: require('./vectorFeature')
21 | };
22 |
--------------------------------------------------------------------------------
/src/svg/object.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SVG specific subclass of object which adds an id property for d3 selections
3 | * on groups of objects by class id.
4 | *
5 | * @class
6 | * @alias geo.svg.object
7 | * @extends geo.sceneObject
8 | * @param {object} arg Options for the object.
9 | * @returns {geo.svg.object}
10 | */
11 | var svg_object = function (arg) {
12 | 'use strict';
13 |
14 | var object = require('../object');
15 | var uniqueID = require('./uniqueID');
16 |
17 | // this is used to extend other geojs classes, so only generate
18 | // a new object when that is not the case... like if this === window
19 | if (!(this instanceof object)) {
20 | return new svg_object(arg);
21 | }
22 |
23 | var m_id = 'svg-' + uniqueID(),
24 | s_exit = this._exit,
25 | m_this = this,
26 | s_draw = this.draw;
27 |
28 | this._svgid = function () {
29 | return m_id;
30 | };
31 |
32 | /**
33 | * Returns a d3 selection for the feature elements.
34 | *
35 | * @returns {d3Selector} A d3 selector of the features in this object.
36 | */
37 | this.select = function () {
38 | return m_this.renderer().select(m_this._svgid());
39 | };
40 |
41 | /**
42 | * Redraw the object.
43 | *
44 | * @returns {this}
45 | */
46 | this.draw = function () {
47 | if (m_this.ready) {
48 | m_this._update();
49 | s_draw();
50 | }
51 | return m_this;
52 | };
53 |
54 | /**
55 | * Removes the element from the svg and the renderer.
56 | */
57 | this._exit = function () {
58 | m_this.renderer()._removeFeature(m_this._svgid());
59 | s_exit();
60 | };
61 |
62 | return this;
63 | };
64 |
65 | module.exports = svg_object;
66 |
--------------------------------------------------------------------------------
/src/svg/rescale.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @namespace geo.event.svg
3 | */
4 |
5 | /**
6 | * @event geo.event.svg.rescale
7 | * @type {geo.event.base}
8 | * @property {number} scale The scale as a ratio of the original render size.
9 | */
10 | module.exports = 'geo_svg_rescale';
11 |
--------------------------------------------------------------------------------
/src/svg/trackFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var trackFeature = require('../trackFeature');
4 |
5 | /**
6 | * Create a new instance of class trackFeature.
7 | *
8 | * @class
9 | * @alias geo.svg.trackFeature
10 | * @extends geo.trackFeature
11 | * @param {geo.trackFeature.spec} arg
12 | * @returns {geo.svg.trackFeature}
13 | */
14 | var svg_trackFeature = function (arg) {
15 | 'use strict';
16 | if (!(this instanceof svg_trackFeature)) {
17 | return new svg_trackFeature(arg);
18 | }
19 |
20 | arg = arg || {};
21 | trackFeature.call(this, arg);
22 |
23 | var object = require('./object');
24 | object.call(this);
25 |
26 | this._init(arg);
27 | return this;
28 | };
29 |
30 | inherit(svg_trackFeature, trackFeature);
31 |
32 | // Now register it
33 | registerFeature('svg', 'track', svg_trackFeature);
34 | module.exports = svg_trackFeature;
35 |
--------------------------------------------------------------------------------
/src/svg/uniqueID.js:
--------------------------------------------------------------------------------
1 | var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz',
2 | strLength = 8;
3 |
4 | /**
5 | * Get a random string to use as a div ID.
6 | *
7 | * @alias geo.svg.uniqueID
8 | * @returns {string} A random ID string.
9 | */
10 | var uniqueID = function () {
11 | var strArray = [],
12 | i;
13 | strArray.length = strLength;
14 | for (i = 0; i < strLength; i += 1) {
15 | strArray[i] = chars.charAt(Math.floor(Math.random() * chars.length));
16 | }
17 | return strArray.join('');
18 | };
19 |
20 | module.exports = uniqueID;
21 |
--------------------------------------------------------------------------------
/src/timestamp.js:
--------------------------------------------------------------------------------
1 | var m_globalTimestamp = 0;
2 |
3 | /**
4 | * Create a new instance of class timestamp. The timestamp is a globally
5 | * unique integer that monotonically increases.
6 | *
7 | * @class
8 | * @alias geo.timestamp
9 | * @returns {geo.timestamp}
10 | */
11 | var timestamp = function () {
12 | 'use strict';
13 | if (!(this instanceof timestamp)) {
14 | return new timestamp();
15 | }
16 |
17 | var m_this = this,
18 | m_timestamp = 0;
19 |
20 | /**
21 | * Update the timestamp to the next global timestamp value.
22 | *
23 | * @returns {this}
24 | */
25 | this.modified = function () {
26 | m_globalTimestamp += 1;
27 | m_timestamp = m_globalTimestamp;
28 | return m_this;
29 | };
30 |
31 | /**
32 | * Get time.
33 | *
34 | * @returns {number} The timestamp. This is 0 if the timestamp has never
35 | * been modified.
36 | */
37 | this.timestamp = function () {
38 | return m_timestamp;
39 | };
40 |
41 | // Also refer to `timestamp` under an alternate name
42 | this.getMTime = this.timestamp;
43 |
44 | return this;
45 | };
46 |
47 | module.exports = timestamp;
48 |
--------------------------------------------------------------------------------
/src/ui/colorLegendWidget.styl:
--------------------------------------------------------------------------------
1 | .color-legend-container
2 | display none
3 | padding 10px
4 | border 1.5px solid black
5 | border-radius 3px
6 | transition 250ms background linear
7 | background-color rgba(255, 255, 255, 0.75)
8 |
9 | &:hover
10 | background-color rgba(255, 255, 255, 1)
11 |
12 | .geojs-color-legends
13 |
14 | .geojs-color-legend
15 | margin-bottom 10px
16 |
17 | .geojs-title
18 | text-align center
19 |
20 | svg.svg
21 | display block
22 |
23 | .axis.x
24 | path.domain, line
25 | fill none
26 | stroke black
27 | stroke-width 0.7
28 | text
29 | font-size 12px
30 |
31 | .color-legend-popup
32 | position absolute
33 | background white
34 | height 22px
35 | font-size 14px
36 | border solid 1px black
37 | padding 0 5px
38 | pointer-events none
39 | white-space nowrap
40 | z-index 100000
41 | opacity 0
42 |
--------------------------------------------------------------------------------
/src/ui/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @namespace geo.gui
3 | */
4 | module.exports = {
5 | colorLegendWidget: require('./colorLegendWidget'),
6 | domWidget: require('./domWidget'),
7 | legendWidget: require('./legendWidget'),
8 | scaleWidget: require('./scaleWidget'),
9 | sliderWidget: require('./sliderWidget'),
10 | svgWidget: require('./svgWidget'),
11 | uiLayer: require('./uiLayer'),
12 | widget: require('./widget')
13 | };
14 |
--------------------------------------------------------------------------------
/src/ui/scaleWidget.styl:
--------------------------------------------------------------------------------
1 | .geojs-scale-widget-bar
2 | stroke black
3 | .geojs-scale-widget-text
4 | font-weight bold
5 | font-size 16px
6 | font-family serif
7 |
--------------------------------------------------------------------------------
/src/util/index.js:
--------------------------------------------------------------------------------
1 | module.exports = Object.assign(
2 | require('./common'),
3 | /* These modules are merged to a common name space */
4 | require('./color'),
5 | require('./throttle'),
6 | require('./mockVGL'),
7 | /* These modules are added under separate names */
8 | {
9 | DistanceGrid: require('./distanceGrid'),
10 | ClusterGroup: require('./clustering'),
11 | mesh: require('./mesh'),
12 | polyops: require('./polyops')
13 | }
14 | );
15 |
--------------------------------------------------------------------------------
/src/vendor.js:
--------------------------------------------------------------------------------
1 | var globals = {
2 | hammerjs: require('hammerjs')
3 | };
4 |
5 | module.exports = globals;
6 |
--------------------------------------------------------------------------------
/src/version.js:
--------------------------------------------------------------------------------
1 | /* global GEO_VERSION */
2 |
3 | /**
4 | * The current geojs version.
5 | *
6 | * @alias geo.version
7 | * @constant
8 | * @type {string}
9 | */
10 | module.exports = GEO_VERSION;
11 |
--------------------------------------------------------------------------------
/src/vgl/data.js:
--------------------------------------------------------------------------------
1 | var vgl = require('./vgl');
2 |
3 | /**
4 | * Create a new instance of class data.
5 | *
6 | * @class
7 | * @alias vgl.data
8 | * @returns {vgl.data}
9 | */
10 | vgl.data = function () {
11 | 'use strict';
12 |
13 | if (!(this instanceof vgl.data)) {
14 | return new vgl.data();
15 | }
16 |
17 | /**
18 | * Return data type. Should be implemented by the derived class.
19 | */
20 | this.type = function () {
21 | };
22 | };
23 |
24 | vgl.data.raster = 0;
25 | vgl.data.point = 1;
26 | vgl.data.lineString = 2;
27 | vgl.data.polygon = 3;
28 | vgl.data.geometry = 10;
29 |
--------------------------------------------------------------------------------
/src/vgl/event.js:
--------------------------------------------------------------------------------
1 | var vgl = require('./vgl');
2 |
3 | vgl.event = {};
4 |
5 | /**
6 | * types
7 | */
8 | vgl.event.keyPress = 'vgl.event.keyPress';
9 | vgl.event.mousePress = 'vgl.event.mousePress';
10 | vgl.event.mouseRelease = 'vgl.event.mouseRelease';
11 | vgl.event.contextMenu = 'vgl.event.contextMenu';
12 | vgl.event.configure = 'vgl.event.configure';
13 | vgl.event.enable = 'vgl.event.enable';
14 | vgl.event.mouseWheel = 'vgl.event.mouseWheel';
15 | vgl.event.keyRelease = 'vgl.event.keyRelease';
16 | vgl.event.middleButtonPress = 'vgl.event.middleButtonPress';
17 | vgl.event.startInteraction = 'vgl.event.startInteraction';
18 | vgl.event.enter = 'vgl.event.enter';
19 | vgl.event.rightButtonPress = 'vgl.event.rightButtonPress';
20 | vgl.event.middleButtonRelease = 'vgl.event.middleButtonRelease';
21 | vgl.event.char = 'vgl.event.char';
22 | vgl.event.disable = 'vgl.event.disable';
23 | vgl.event.endInteraction = 'vgl.event.endInteraction';
24 | vgl.event.mouseMove = 'vgl.event.mouseMove';
25 | vgl.event.mouseOut = 'vgl.event.mouseOut';
26 | vgl.event.expose = 'vgl.event.expose';
27 | vgl.event.timer = 'vgl.event.timer';
28 | vgl.event.leftButtonPress = 'vgl.event.leftButtonPress';
29 | vgl.event.leave = 'vgl.event.leave';
30 | vgl.event.rightButtonRelease = 'vgl.event.rightButtonRelease';
31 | vgl.event.leftButtonRelease = 'vgl.event.leftButtonRelease';
32 | vgl.event.click = 'vgl.event.click';
33 | vgl.event.dblClick = 'vgl.event.dblClick';
34 |
--------------------------------------------------------------------------------
/src/vgl/graphicsObject.js:
--------------------------------------------------------------------------------
1 | var vgl = require('./vgl');
2 | var inherit = require('../inherit');
3 |
4 | /**
5 | * Create a new instance of class graphicsObject.
6 | *
7 | * @class
8 | * @alias vgl.graphicsObject
9 | * @param {number} type A GL type.
10 | * @returns {vgl.graphicsObject}
11 | */
12 | vgl.graphicsObject = function (type) {
13 | 'use strict';
14 |
15 | if (!(this instanceof vgl.graphicsObject)) {
16 | return new vgl.graphicsObject();
17 | }
18 | vgl.object.call(this);
19 |
20 | var m_this = this;
21 |
22 | /**
23 | * Setup (initialize) the object.
24 | *
25 | * @param {vgl.renderState} renderState
26 | * @returns {boolean}
27 | */
28 | this._setup = function (renderState) {
29 | return false;
30 | };
31 |
32 | /**
33 | * Remove any resources acquired before deletion.
34 | *
35 | * @param {vgl.renderState} renderState
36 | * @returns {boolean}
37 | */
38 | this._cleanup = function (renderState) {
39 | return false;
40 | };
41 |
42 | return m_this;
43 | };
44 |
45 | inherit(vgl.graphicsObject, vgl.object);
46 |
--------------------------------------------------------------------------------
/src/vgl/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @namespace vgl
3 | */
4 | module.exports = require('./vgl');
5 |
6 | require('./GL');
7 | require('./object');
8 | require('./boundingObject'); // requires object
9 | require('./mapper'); // requires boundingObject
10 | require('./event'); // requires object
11 | require('./graphicsObject'); // requires object
12 | require('./material'); // requires graphicsObject
13 | require('./materialAttribute'); // requires graphicsObject
14 | require('./node'); // requires boundingObject
15 | require('./actor'); // requires node
16 | require('./groupNode'); // requires node
17 | require('./camera'); // requires groupNode
18 | require('./blend'); // requires materialAttribute
19 | require('./data');
20 | require('./geomData'); // requires data
21 | require('./renderWindow'); // requires graphicsObject
22 | require('./renderer'); // requires graphcisObject
23 | require('./shader'); // requires object
24 | require('./shaderProgram'); // requires materialAttribute
25 | require('./texture'); // requires materialAttributes
26 | require('./uniform');
27 | require('./vertexAttribute');
28 | require('./viewer'); // requires object
29 |
--------------------------------------------------------------------------------
/src/vgl/object.js:
--------------------------------------------------------------------------------
1 | var vgl = require('./vgl');
2 | var timestamp = require('../timestamp');
3 |
4 | /**
5 | * Create a new instance of class object.
6 | *
7 | * @class
8 | * @alias vgl.object
9 | * @returns {vgl.object}
10 | */
11 | vgl.object = function () {
12 | 'use strict';
13 |
14 | if (!(this instanceof vgl.object)) {
15 | return new vgl.object();
16 | }
17 |
18 | /** @private */
19 | var m_modifiedTime = timestamp();
20 | m_modifiedTime.modified();
21 |
22 | /**
23 | * Mark the object modified.
24 | */
25 | this.modified = function () {
26 | m_modifiedTime.modified();
27 | };
28 |
29 | /**
30 | * Return modified time of the object.
31 | *
32 | * @returns {number}
33 | */
34 | this.getMTime = function () {
35 | return m_modifiedTime.getMTime();
36 | };
37 |
38 | return this;
39 | };
40 |
--------------------------------------------------------------------------------
/src/vgl/vgl.js:
--------------------------------------------------------------------------------
1 | module.exports = {};
2 |
--------------------------------------------------------------------------------
/src/vtkjs/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @namespace geo.vtkjs
3 | */
4 | module.exports = {
5 | pointFeature: require('./pointFeature'),
6 | vtkjsRenderer: require('./vtkjsRenderer')
7 | };
8 |
--------------------------------------------------------------------------------
/src/vtkjs/object.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Vtk.js specific subclass of object which rerenders when the object is drawn.
3 | *
4 | * @class
5 | * @alias geo.vtkjs.object
6 | * @extends geo.sceneObject
7 | * @param {object} arg Options for the object.
8 | * @returns {geo.vtkjs.object}
9 | */
10 | var vtkjs_object = function (arg) {
11 | 'use strict';
12 |
13 | var object = require('../object');
14 |
15 | // this is used to extend other geojs classes, so only generate
16 | // a new object when that is not the case... like if this === window
17 | if (!(this instanceof object)) {
18 | return new vtkjs_object(arg);
19 | }
20 |
21 | var m_this = this,
22 | s_draw = this.draw;
23 |
24 | /**
25 | * Redraw the object.
26 | *
27 | * @returns {this}
28 | */
29 | this.draw = function () {
30 | if (m_this.ready) {
31 | m_this._update();
32 | m_this.renderer()._render();
33 | s_draw();
34 | }
35 | return m_this;
36 | };
37 |
38 | return this;
39 | };
40 |
41 | module.exports = vtkjs_object;
42 |
--------------------------------------------------------------------------------
/src/webgl/contourFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var contourFeature = require('../contourFeature');
4 |
5 | /**
6 | * Create a new instance of contourFeature.
7 | *
8 | * @class
9 | * @alias geo.webgl.contourFeature
10 | * @extends geo.contourFeature
11 | * @extends geo.webgl.meshColored
12 | * @param {geo.contourFeature.spec} arg
13 | * @returns {geo.webgl.contourFeature}
14 | */
15 | var webgl_contourFeature = function (arg) {
16 | 'use strict';
17 |
18 | if (!(this instanceof webgl_contourFeature)) {
19 | return new webgl_contourFeature(arg);
20 | }
21 | arg = arg || {};
22 | contourFeature.call(this, arg);
23 |
24 | var meshColored = require('./meshColored');
25 | meshColored.call(this, arg);
26 |
27 | var m_this = this;
28 |
29 | /**
30 | * Build.
31 | */
32 | this._build = function () {
33 | if (m_this.actors()[0]) {
34 | m_this.renderer().contextRenderer().removeActor(m_this.actors()[0]);
35 | }
36 |
37 | m_this.createGLMeshColored(m_this._createContours());
38 |
39 | m_this.renderer().contextRenderer().addActor(m_this.actors()[0]);
40 | m_this.buildTime().modified();
41 | };
42 |
43 | this._init(arg);
44 | return this;
45 | };
46 |
47 | inherit(webgl_contourFeature, contourFeature);
48 |
49 | // Now register it
50 | registerFeature('webgl', 'contour', webgl_contourFeature);
51 |
52 | module.exports = webgl_contourFeature;
53 |
--------------------------------------------------------------------------------
/src/webgl/gridFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var gridFeature = require('../gridFeature');
4 |
5 | /**
6 | * Create a new instance of gridFeature.
7 | *
8 | * @class
9 | * @alias geo.webgl.gridFeature
10 | * @extends geo.gridFeature
11 | * @extends geo.webgl.meshColored
12 | * @param {geo.gridFeature.spec} arg
13 | * @returns {geo.webgl.gridFeature}
14 | */
15 | var webgl_gridFeature = function (arg) {
16 | 'use strict';
17 |
18 | if (!(this instanceof webgl_gridFeature)) {
19 | return new webgl_gridFeature(arg);
20 | }
21 | arg = arg || {};
22 | gridFeature.call(this, arg);
23 |
24 | var meshColored = require('./meshColored');
25 | meshColored.call(this, arg);
26 |
27 | var m_this = this;
28 |
29 | /**
30 | * Build.
31 | */
32 | this._build = function () {
33 | if (m_this.actors()[0]) {
34 | m_this.renderer().contextRenderer().removeActor(m_this.actors()[0]);
35 | }
36 |
37 | m_this.createGLMeshColored(m_this._createGrids());
38 |
39 | m_this.renderer().contextRenderer().addActor(m_this.actors()[0]);
40 | m_this.buildTime().modified();
41 | };
42 |
43 | this._init(arg);
44 | return this;
45 | };
46 |
47 | inherit(webgl_gridFeature, gridFeature);
48 |
49 | // Now register it
50 | registerFeature('webgl', 'grid', webgl_gridFeature);
51 |
52 | module.exports = webgl_gridFeature;
53 |
--------------------------------------------------------------------------------
/src/webgl/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @namespace geo.webgl
3 | */
4 | module.exports = {
5 | choroplethFeature: require('./choroplethFeature'),
6 | contourFeature: require('./contourFeature'),
7 | gridFeature: require('./gridFeature'),
8 | isolineFeature: require('./isolineFeature'),
9 | layer: require('./layer'),
10 | lineFeature: require('./lineFeature'),
11 | lookupTable2D: require('./lookupTable2D'),
12 | markerFeature: require('./markerFeature'),
13 | meshColored: require('./meshColored'),
14 | pixelmapFeature: require('./pixelmapFeature'),
15 | pointFeature: require('./pointFeature'),
16 | polygonFeature: require('./polygonFeature'),
17 | quadFeature: require('./quadFeature'),
18 | tileLayer: require('./tileLayer'),
19 | trackFeature: require('./trackFeature'),
20 | webglRenderer: require('./webglRenderer')
21 | };
22 |
--------------------------------------------------------------------------------
/src/webgl/isolineFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var isolineFeature = require('../isolineFeature');
4 |
5 | /**
6 | * Create a new instance of isolineFeature.
7 | *
8 | * @class
9 | * @alias geo.webgl.isolineFeature
10 | * @extends geo.isolineFeature
11 | * @param {geo.isolineFeature.spec} arg
12 | * @returns {geo.webgl.isolineFeature}
13 | */
14 | var webgl_isolineFeature = function (arg) {
15 | 'use strict';
16 | if (!(this instanceof webgl_isolineFeature)) {
17 | return new webgl_isolineFeature(arg);
18 | }
19 | arg = arg || {};
20 | isolineFeature.call(this, arg);
21 |
22 | var object = require('./object');
23 | object.call(this);
24 |
25 | this._init(arg);
26 | return this;
27 | };
28 |
29 | inherit(webgl_isolineFeature, isolineFeature);
30 |
31 | // Now register it
32 | registerFeature('webgl', 'isoline', webgl_isolineFeature);
33 | module.exports = webgl_isolineFeature;
34 |
--------------------------------------------------------------------------------
/src/webgl/markerFeaturePoly.frag:
--------------------------------------------------------------------------------
1 | /* markerFeature square/triangle fragment shader */
2 |
3 | $markerFeatureFS
4 |
5 | varying vec2 unitVar; // distinct for square/triangle
6 |
7 | void main() {
8 | if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)
9 | discard;
10 | markerFeatureFragment(unitVar);
11 | }
12 |
--------------------------------------------------------------------------------
/src/webgl/markerFeaturePoly.vert:
--------------------------------------------------------------------------------
1 | /* markerFeature square/triangle vertex shader */
2 |
3 | $markerFeatureVS
4 |
5 | uniform float pixelWidth; // for non-sprite
6 | uniform float aspect; // for non-sprite
7 | attribute vec2 unit; // for non-sprite
8 | varying vec2 unitVar; // for non-sprite
9 |
10 | void main(void)
11 | {
12 | radiusVar = markerFeaturePrep();
13 | if (radiusVar == 0.0) {
14 | return;
15 | }
16 | // for non-sprite
17 | unitVar = unit * radiusVar;
18 | unitVar.y *= -1.0;
19 | vec4 p = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;
20 | if (p.w != 0.0) {
21 | p = p / p.w;
22 | }
23 | p += radiusVar * vec4(unit.x * pixelWidth, unit.y * pixelWidth * aspect, 0.0, 1.0);
24 | gl_Position = vec4(p.xyz, 1.0);
25 | }
26 |
--------------------------------------------------------------------------------
/src/webgl/markerFeatureSprite.frag:
--------------------------------------------------------------------------------
1 | /* markerFeature sprite fragment shader */
2 |
3 | $markerFeatureFS
4 |
5 | // the square/triangle shader defines unitVar
6 |
7 | void main(void) {
8 | // No stroke or fill implies nothing to draw
9 | if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)
10 | discard;
11 | // for sprites, convert the position to [-radius,radius],[-radius,radius]
12 | vec2 pos = (gl_PointCoord.xy - 0.5) * 2.0 * radiusVar;
13 | markerFeatureFragment(pos);
14 | }
15 |
--------------------------------------------------------------------------------
/src/webgl/markerFeatureSprite.vert:
--------------------------------------------------------------------------------
1 | /* markerFeature sprite vertex shader */
2 |
3 | $markerFeatureVS
4 |
5 | void main(void)
6 | {
7 | radiusVar = markerFeaturePrep();
8 | if (radiusVar == 0.0) {
9 | return;
10 | }
11 | // for sprite
12 | gl_Position = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;
13 | gl_PointSize = 2.0 * radiusVar;
14 | }
15 |
--------------------------------------------------------------------------------
/src/webgl/meshColored.frag:
--------------------------------------------------------------------------------
1 | /* contourFeature fragment shader */
2 |
3 | #ifdef GL_ES
4 | precision highp float;
5 | #endif
6 | uniform vec4 minColor;
7 | uniform vec4 maxColor;
8 | uniform float steps;
9 | uniform bool stepped;
10 | uniform sampler2D sampler2d;
11 | varying float valueVar;
12 | varying float opacityVar;
13 |
14 | void main () {
15 | vec4 clr;
16 | if (valueVar < 0.0) {
17 | clr = minColor;
18 | } else if (valueVar > steps) {
19 | clr = maxColor;
20 | } else {
21 | float step;
22 | if (stepped) {
23 | step = floor(valueVar) + 0.5;
24 | if (step > steps) {
25 | step = steps - 0.5;
26 | }
27 | } else {
28 | step = valueVar + 0.5;
29 | }
30 | // our texture is padded on either end by a repeated value to ensure
31 | // we interpolate smoothly at the ends.
32 | clr = texture2D(sampler2d, vec2((step + 1.0) / (steps + 2.0), 0.0));
33 | }
34 | gl_FragColor = vec4(clr.rgb, clr.a * opacityVar);
35 | }
36 |
--------------------------------------------------------------------------------
/src/webgl/meshColored.vert:
--------------------------------------------------------------------------------
1 | /* contourFeature vertex shader */
2 |
3 | #ifdef GL_ES
4 | precision highp float;
5 | #endif
6 | attribute vec3 pos;
7 | attribute float value;
8 | attribute float opacity;
9 | uniform mat4 modelViewMatrix;
10 | uniform mat4 projectionMatrix;
11 | varying float valueVar;
12 | varying float opacityVar;
13 |
14 | void main(void)
15 | {
16 | /* Don't use z values */
17 | vec4 scrPos = projectionMatrix * modelViewMatrix * vec4(pos.xy, 0, 1);
18 | if (scrPos.w != 0.0) {
19 | scrPos = scrPos / scrPos.w;
20 | }
21 | valueVar = value;
22 | opacityVar = opacity;
23 | gl_Position = scrPos;
24 | }
25 |
--------------------------------------------------------------------------------
/src/webgl/pointFeatureFS.glsl:
--------------------------------------------------------------------------------
1 | /* pointFeature common fragment shader */
2 |
3 | #ifdef GL_ES
4 | precision highp float;
5 | #endif
6 | varying vec4 fillColorVar;
7 | varying vec4 strokeColorVar;
8 | varying float radiusVar;
9 | varying float strokeWidthVar;
10 |
11 | void pointFeatureFragment(float rad) {
12 | vec4 strokeColor, fillColor;
13 | float endStep;
14 | // No stroke or fill implies nothing to draw
15 | if (rad > 1.0)
16 | discard;
17 | // If there is no stroke, the fill region should transition to nothing
18 | if (strokeColorVar.a == 0.0) {
19 | strokeColor = vec4(fillColorVar.rgb, 0.0);
20 | endStep = 1.0;
21 | } else {
22 | strokeColor = strokeColorVar;
23 | endStep = radiusVar / (radiusVar + strokeWidthVar);
24 | }
25 | // Likewise, if there is no fill, the stroke should transition to nothing
26 | if (fillColorVar.a == 0.0)
27 | fillColor = vec4(strokeColor.rgb, 0.0);
28 | else
29 | fillColor = fillColorVar;
30 | // Distance to antialias over. First number is in pixels
31 | float antialiasDist = 1.5 / (radiusVar + strokeWidthVar);
32 | if (rad < endStep) {
33 | float step = smoothstep(max(0.0, endStep - antialiasDist), endStep, rad);
34 | vec4 color = mix(fillColor, strokeColor, step);
35 | float step2 = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);
36 | gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);
37 | } else {
38 | float step = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);
39 | gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/webgl/pointFeaturePoly.frag:
--------------------------------------------------------------------------------
1 | /* pointFeature square/triangle fragment shader */
2 |
3 | $pointFeatureFS
4 |
5 | varying vec3 unitVar; // distinct for square/triangle
6 |
7 | void main () {
8 | if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)
9 | discard;
10 | float rad = length(unitVar.xy); // distinct for square/triangle
11 | pointFeatureFragment(rad);
12 | }
13 |
--------------------------------------------------------------------------------
/src/webgl/pointFeaturePoly.vert:
--------------------------------------------------------------------------------
1 | /* pointFeature square/triangle vertex shader */
2 |
3 | $pointFeatureVS
4 |
5 | uniform float pixelWidth; // for non-sprite
6 | uniform float aspect; // for non-sprite
7 | attribute vec2 unit; // for non-sprite
8 | varying vec3 unitVar; // for non-sprite
9 |
10 | void main(void)
11 | {
12 | radiusVar = pointFeaturePrep();
13 | if (radiusVar == 0.0) {
14 | return;
15 | }
16 | // for non-sprite
17 | unitVar = vec3(unit, 1.0);
18 | vec4 p = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;
19 | if (p.w != 0.0) {
20 | p = p / p.w;
21 | }
22 | p += (radius + strokeWidthVar) *
23 | vec4(unit.x * pixelWidth, unit.y * pixelWidth * aspect, 0.0, 1.0);
24 | gl_Position = vec4(p.xyz, 1.0);
25 | }
26 |
--------------------------------------------------------------------------------
/src/webgl/pointFeatureSprite.frag:
--------------------------------------------------------------------------------
1 | /* pointFeature sprite fragment shader */
2 |
3 | $pointFeatureFS
4 |
5 | // the square/triangle shader defines unitVar
6 |
7 | void main () {
8 | // No stroke or fill implies nothing to draw
9 | if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)
10 | discard;
11 | float rad = 2.0 * length(gl_PointCoord - vec2(0.5)); // distinct for sprite
12 | pointFeatureFragment(rad);
13 | }
14 |
--------------------------------------------------------------------------------
/src/webgl/pointFeatureSprite.vert:
--------------------------------------------------------------------------------
1 | /* pointFeature sprite vertex shader */
2 |
3 | $pointFeatureVS
4 |
5 | void main(void)
6 | {
7 | radiusVar = pointFeaturePrep();
8 | if (radiusVar == 0.0) {
9 | return;
10 | }
11 | // for sprite
12 | gl_Position = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;
13 | gl_PointSize = 2.0 * (radius + strokeWidthVar);
14 | }
15 |
--------------------------------------------------------------------------------
/src/webgl/pointFeatureVS.glsl:
--------------------------------------------------------------------------------
1 | /* pointFeature common vertex shader */
2 |
3 | #ifdef GL_ES
4 | precision highp float;
5 | #endif
6 | attribute vec3 pos;
7 | attribute float radius;
8 | attribute vec3 fillColor;
9 | attribute vec3 strokeColor;
10 | attribute float fillOpacity;
11 | attribute float strokeWidth;
12 | attribute float strokeOpacity;
13 | attribute float fill;
14 | attribute float stroke;
15 | uniform mat4 modelViewMatrix;
16 | uniform mat4 projectionMatrix;
17 | varying vec4 fillColorVar;
18 | varying vec4 strokeColorVar;
19 | varying float radiusVar;
20 | varying float strokeWidthVar;
21 |
22 | float pointFeaturePrep() {
23 | strokeWidthVar = strokeWidth;
24 | fillColorVar = vec4(fillColor, fillOpacity);
25 | strokeColorVar = vec4(strokeColor, strokeOpacity);
26 | // No stroke or fill implies nothing to draw
27 | if (stroke < 1.0 || strokeWidth <= 0.0 || strokeOpacity <= 0.0) {
28 | strokeColorVar.a = 0.0;
29 | strokeWidthVar = 0.0;
30 | }
31 | if (fill < 1.0 || radius <= 0.0 || fillOpacity <= 0.0)
32 | fillColorVar.a = 0.0;
33 | /* If the point has no visible pixels, skip doing computations on it. */
34 | if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0) {
35 | gl_Position = vec4(2, 2, 0, 1);
36 | return 0.0;
37 | }
38 | return radius;
39 | }
40 |
--------------------------------------------------------------------------------
/src/webgl/polygonFeature.frag:
--------------------------------------------------------------------------------
1 | /* polygonFeature fragment shader */
2 |
3 | #ifdef GL_ES
4 | precision highp float;
5 | #endif
6 | varying vec4 fillColorVar;
7 |
8 | void main () {
9 | gl_FragColor = fillColorVar;
10 | }
11 |
--------------------------------------------------------------------------------
/src/webgl/polygonFeature.vert:
--------------------------------------------------------------------------------
1 | /* polygonFeature vertex shader */
2 |
3 | attribute vec3 pos;
4 | attribute vec3 fillColor;
5 | attribute float fillOpacity;
6 | uniform mat4 modelViewMatrix;
7 | uniform mat4 projectionMatrix;
8 | varying vec4 fillColorVar;
9 |
10 | void main(void)
11 | {
12 | vec4 clipPos = projectionMatrix * modelViewMatrix * vec4(pos.xyz, 1.0);
13 | if (clipPos.w != 0.0) {
14 | clipPos = clipPos/clipPos.w;
15 | }
16 | fillColorVar = vec4(fillColor, fillOpacity);
17 | gl_Position = clipPos;
18 | }
19 |
--------------------------------------------------------------------------------
/src/webgl/quadFeatureColor.frag:
--------------------------------------------------------------------------------
1 | /* quadFeature Color fragment shader */
2 |
3 | varying mediump vec3 iVertexColor;
4 | uniform mediump float opacity;
5 |
6 | void main(void) {
7 | gl_FragColor = vec4(iVertexColor, opacity);
8 | }
9 |
--------------------------------------------------------------------------------
/src/webgl/quadFeatureColor.vert:
--------------------------------------------------------------------------------
1 | /* quadFeature Color vertex shader */
2 |
3 | attribute vec3 vertexPosition;
4 | uniform float zOffset;
5 | uniform vec3 vertexColor;
6 | uniform mat4 modelViewMatrix;
7 | uniform mat4 projectionMatrix;
8 | varying mediump vec3 iVertexColor;
9 |
10 | void main(void) {
11 | gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);
12 | gl_Position.z += zOffset;
13 | iVertexColor = vertexColor;
14 | }
15 |
--------------------------------------------------------------------------------
/src/webgl/quadFeatureImage.frag:
--------------------------------------------------------------------------------
1 | /* quadFeature Image fragment shader */
2 |
3 | varying highp vec2 iTextureCoord;
4 | uniform sampler2D sampler2d;
5 | uniform mediump float opacity;
6 | uniform highp vec2 crop;
7 |
8 | void main(void) {
9 | mediump vec4 color = texture2D(sampler2d, iTextureCoord);
10 | if ((crop.s < 1.0 && iTextureCoord.s > crop.s) || (crop.t < 1.0 && 1.0 - iTextureCoord.t > crop.t)) {
11 | discard;
12 | }
13 | color.w *= opacity;
14 | gl_FragColor = color;
15 | }
16 |
--------------------------------------------------------------------------------
/src/webgl/quadFeatureImage.vert:
--------------------------------------------------------------------------------
1 | /* quadFeature Image vertex shader */
2 |
3 | attribute vec3 vertexPosition;
4 | attribute vec2 textureCoord;
5 | uniform float zOffset;
6 | uniform mat4 modelViewMatrix;
7 | uniform mat4 projectionMatrix;
8 | varying highp vec2 iTextureCoord;
9 | uniform highp vec4 cropsource;
10 |
11 | void main(void) {
12 | gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);
13 | gl_Position.z += zOffset;
14 | if (cropsource.p > cropsource.s && cropsource.q > cropsource.t && (cropsource.p < 1.0 || cropsource.s > 0.0 || cropsource.q < 1.0 || cropsource.t > 0.0)) {
15 | iTextureCoord.s = textureCoord.s * (cropsource.p - cropsource.s) + cropsource.s;
16 | iTextureCoord.t = textureCoord.t * (cropsource.q - cropsource.t) + cropsource.t;
17 | } else {
18 | iTextureCoord = textureCoord;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/webgl/trackFeature.js:
--------------------------------------------------------------------------------
1 | var inherit = require('../inherit');
2 | var registerFeature = require('../registry').registerFeature;
3 | var trackFeature = require('../trackFeature');
4 |
5 | /**
6 | * Create a new instance of trackFeature.
7 | *
8 | * @class
9 | * @alias geo.webgl.trackFeature
10 | * @extends geo.trackFeature
11 | * @param {geo.trackFeature.spec} arg
12 | * @returns {geo.webgl.trackFeature}
13 | */
14 | var webgl_trackFeature = function (arg) {
15 | 'use strict';
16 | if (!(this instanceof webgl_trackFeature)) {
17 | return new webgl_trackFeature(arg);
18 | }
19 | arg = arg || {};
20 | trackFeature.call(this, arg);
21 |
22 | var object = require('./object');
23 | object.call(this);
24 |
25 | this._init(arg);
26 | return this;
27 | };
28 |
29 | inherit(webgl_trackFeature, trackFeature);
30 |
31 | // Now register it
32 | registerFeature('webgl', 'track', webgl_trackFeature);
33 | module.exports = webgl_trackFeature;
34 |
--------------------------------------------------------------------------------
/tests/all.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Entry point for all tests.
3 | */
4 |
5 | var query = require('./test-utils').getQuery();
6 |
7 | /* By default, general and gl tests are run. Set the 'test' query parameter to
8 | * 'all' to run all tests, or use a specific test group name.
9 | */
10 | var tests;
11 | if (query.test === 'all' || query.test === 'general' || query.test === undefined) {
12 | tests = require.context('./cases', true, /.*\.js$/);
13 | tests.keys().forEach(tests);
14 | }
15 | if (query.test === 'all' || query.test === 'gl' || query.test === undefined) {
16 | tests = require.context('./gl-cases', true, /.*\.js$/);
17 | tests.keys().forEach(tests);
18 | }
19 | if (query.test === 'all' || query.test === 'headed') {
20 | tests = require.context('./headed-cases', true, /.*\.js$/);
21 | tests.keys().forEach(tests);
22 | }
23 |
--------------------------------------------------------------------------------
/tests/cases/domWidget.js:
--------------------------------------------------------------------------------
1 | var $ = require('jquery');
2 | var geo = require('../test-utils').geo;
3 | var createMap = require('../test-utils').createMap;
4 |
5 | describe('geo.gui.domWidget', function () {
6 | 'use strict';
7 |
8 | describe('create', function () {
9 | it('direct create', function () {
10 | var map, layer, widget, widget2;
11 | map = createMap();
12 | layer = map.createLayer('ui');
13 |
14 | widget = geo.gui.domWidget({layer: layer});
15 | expect(widget instanceof geo.gui.domWidget).toBe(true);
16 | expect(widget.parent()).toBe(null);
17 | widget2 = geo.gui.domWidget({layer: layer, parent: widget});
18 | expect(widget2 instanceof geo.gui.domWidget).toBe(true);
19 | expect(widget2.parent()).toBe(widget);
20 | });
21 | });
22 |
23 | describe('Check private class methods', function () {
24 | var map, layer, widget, widget2;
25 |
26 | it('_init and _createCanvas', function () {
27 | map = createMap();
28 | layer = map.createLayer('ui');
29 | widget = geo.gui.domWidget({layer: layer});
30 | expect(widget._init()).toBe(widget);
31 | expect($(widget.canvas()).is('div')).toBe(true);
32 | widget2 = geo.gui.domWidget({layer: layer, parent: widget, el: 'span'});
33 | expect(widget2._init()).toBe(widget2);
34 | expect($(widget2.canvas()).is('div')).toBe(false);
35 | expect($(widget2.canvas()).is('span')).toBe(true);
36 | });
37 | });
38 | });
39 |
--------------------------------------------------------------------------------
/tests/cases/events.js:
--------------------------------------------------------------------------------
1 | describe('geo.event', function () {
2 |
3 | var geo = require('../test-utils').geo;
4 |
5 | it('Unique event names', function () {
6 | var key1, key2;
7 | for (key1 in geo.event) {
8 | if (geo.event.hasOwnProperty(key1) && typeof geo.event[key1] === 'string') {
9 | for (key2 in geo.event) {
10 | if (geo.event.hasOwnProperty(key2) &&
11 | key1 !== key2 &&
12 | typeof geo.event[key2] === 'string') {
13 | expect(geo.event[key1]).not.toEqual(geo.event[key2]);
14 | }
15 | }
16 | }
17 | }
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/tests/cases/registry.js:
--------------------------------------------------------------------------------
1 | describe('geo.registry', function () {
2 | 'use strict';
3 |
4 | var geo = require('../test-utils').geo;
5 | var mockWebglRenderer = geo.util.mockWebglRenderer;
6 | var restoreWebglRenderer = geo.util.restoreWebglRenderer;
7 |
8 | describe('Check rendererForFeatures', function () {
9 | it('specific features', function () {
10 | mockWebglRenderer();
11 | expect(geo.rendererForFeatures()).toBe('webgl');
12 | expect(geo.rendererForFeatures(['point'])).toBe('webgl');
13 | expect(geo.rendererForFeatures(['heatmap'])).toBe('canvas');
14 | expect(geo.rendererForFeatures(['point', 'graph'])).toBe('svg');
15 | expect(geo.rendererForFeatures(['contour'])).toBe('webgl');
16 | expect(geo.rendererForFeatures(['contour', 'graph'])).toBe(false);
17 | expect(geo.rendererForFeatures(['quad', 'graph'])).toBe('svg');
18 | expect(geo.rendererForFeatures([geo.quadFeature.capabilities.imageFull, 'graph'])).toBe(false);
19 | expect(geo.rendererForFeatures([geo.quadFeature.capabilities.image, 'graph'])).toBe('svg');
20 | restoreWebglRenderer();
21 | });
22 | it('unsupported webgl renderer', function () {
23 | mockWebglRenderer(false);
24 | expect(geo.rendererForFeatures()).toBe('canvas');
25 | expect(geo.rendererForFeatures(['point'])).toBe('svg');
26 | restoreWebglRenderer();
27 | });
28 | it('expose registries', function () {
29 | expect(geo.registries.unknown).toBe(undefined);
30 | expect(geo.registries.annotations).not.toBe(undefined);
31 | expect(geo.registries.features).not.toBe(undefined);
32 | });
33 | });
34 | });
35 |
--------------------------------------------------------------------------------
/tests/cases/sliderWidget.js:
--------------------------------------------------------------------------------
1 | var geo = require('../test-utils').geo;
2 | var createMap = require('../test-utils').createMap;
3 |
4 | xdescribe('zoom slider', function () {
5 | 'use strict';
6 |
7 | var d3 = require('d3');
8 | var $ = require('jquery');
9 | var map;
10 |
11 | beforeEach(function () {
12 | map = createMap({
13 | center: [0, 0],
14 | zoom: 2,
15 | clampZoom: false,
16 | clampBoundsX: false,
17 | clampBoundsY: false
18 | }, {width: '500px', height: '400px'});
19 | map.createLayer('ui').createWidget('slider');
20 | map.draw();
21 | });
22 |
23 | it('Zoom in button', function (done) {
24 | var eps;
25 | map.zoom(1);
26 | d3.select('.geo-ui-slider .geo-zoom-in').on('click')();
27 | map.geoOff(geo.event.transitionend)
28 | .geoOn(geo.event.transitionend, function () {
29 | eps = Math.abs(2 - map.zoom());
30 | expect(eps).toBeLessThan(1e-2);
31 | done();
32 | });
33 | });
34 |
35 | it('Zoom out button', function (done) {
36 | map.zoom(2);
37 | var eps;
38 | d3.select('.geo-ui-slider .geo-zoom-out').on('click')();
39 |
40 | map.geoOff(geo.event.transitionend)
41 | .geoOn(geo.event.transitionend, function () {
42 | eps = Math.abs(1 - map.zoom());
43 | expect(eps).toBeLessThan(1e-2);
44 | done();
45 | });
46 | });
47 |
48 | it('Nub responds to map', function () {
49 | map.zoom(0);
50 | var p = $('.geo-ui-slider .geo-zoom-nub').position().top;
51 |
52 | map.zoom(2);
53 | var q = $('.geo-ui-slider .geo-zoom-nub').position().top;
54 |
55 | expect(q).toBeLessThan(p);
56 | });
57 | });
58 |
--------------------------------------------------------------------------------
/tests/cases/svgGraphFeature.js:
--------------------------------------------------------------------------------
1 | describe('svg graph feature', function () {
2 | var createMap = require('../test-utils').createMap;
3 | var mockAnimationFrame = require('../test-utils').mockAnimationFrame;
4 | var stepAnimationFrame = require('../test-utils').stepAnimationFrame;
5 | var unmockAnimationFrame = require('../test-utils').unmockAnimationFrame;
6 |
7 | var map, layer, feature;
8 |
9 | it('Setup map', function () {
10 | mockAnimationFrame();
11 | map = createMap({center: [0, 0], zoom: 3});
12 | layer = map.createLayer('feature', {renderer: 'svg'});
13 | });
14 |
15 | it('Add features to a layer', function () {
16 | var selection, nodes;
17 |
18 | nodes = [
19 | {y: 0, x: 0},
20 | {y: 10, x: 0},
21 | {y: -10, x: 0},
22 | {y: 10, x: 10}
23 | ];
24 |
25 | nodes[0].children = [nodes[1], nodes[2]];
26 | nodes[1].children = [nodes[3]];
27 |
28 | feature = layer.createFeature('graph')
29 | .data(nodes)
30 | .draw();
31 | stepAnimationFrame();
32 |
33 | selection = layer.node().find('circle');
34 | expect(selection.length).toBe(4);
35 |
36 | selection = layer.node().find('path');
37 | expect(selection.length).toBe(3);
38 | });
39 |
40 | it('Remove feature from a layer', function () {
41 | var selection;
42 |
43 | layer.deleteFeature(feature).draw();
44 | stepAnimationFrame();
45 |
46 | selection = layer.node().find('circle');
47 | expect(selection.length).toBe(0);
48 |
49 | selection = layer.node().find('path');
50 | expect(selection.length).toBe(0);
51 | unmockAnimationFrame();
52 | });
53 | });
54 |
--------------------------------------------------------------------------------
/tests/cases/svgWidget.js:
--------------------------------------------------------------------------------
1 | var geo = require('../test-utils').geo;
2 | var createMap = require('../test-utils').createMap;
3 |
4 | describe('geo.gui.svgWidget', function () {
5 | 'use strict';
6 |
7 | describe('create', function () {
8 | it('direct create', function () {
9 | var map, layer, widget, widget2;
10 | map = createMap();
11 | layer = map.createLayer('ui');
12 |
13 | widget = geo.gui.svgWidget({layer: layer});
14 | expect(widget instanceof geo.gui.svgWidget).toBe(true);
15 | expect(widget.parent()).toBe(null);
16 | widget2 = geo.gui.svgWidget({layer: layer, parent: widget});
17 | expect(widget2 instanceof geo.gui.svgWidget).toBe(true);
18 | expect(widget2.parent()).toBe(widget);
19 | });
20 | });
21 |
22 | describe('Check private class methods', function () {
23 | var map, layer, widget, widget2;
24 |
25 | it('_init and _createCanvas', function () {
26 | map = createMap();
27 | layer = map.createLayer('ui');
28 | widget = geo.gui.svgWidget({layer: layer});
29 | expect(widget._init()).toBe(widget);
30 | widget2 = geo.gui.svgWidget({layer: layer, parent: widget});
31 | expect(widget2._init()).toBe(widget2);
32 | });
33 |
34 | it('_exit', function () {
35 | var count;
36 | map = createMap();
37 | layer = map.createLayer('ui');
38 | count = layer.node().children().length;
39 | widget = geo.gui.svgWidget({layer: layer});
40 | widget._init();
41 | expect(layer.node().children().length).toBe(count + 1);
42 | expect(widget._exit()).toBe(undefined);
43 | expect(layer.node().children().length).toBe(count);
44 | });
45 | });
46 | });
47 |
--------------------------------------------------------------------------------
/tests/cases/timestamp.js:
--------------------------------------------------------------------------------
1 | describe('geo.timestamp', function () {
2 | var geo = require('../test-utils').geo;
3 | it('modified', function () {
4 | var t1 = new geo.timestamp(),
5 | t2 = new geo.timestamp(),
6 | t3 = new geo.timestamp();
7 |
8 | t1.modified();
9 | t2.modified();
10 | t3.modified();
11 |
12 | expect(t1.timestamp()).toBe(t1.timestamp());
13 | expect(t1.timestamp() < t2.timestamp()).toBe(true);
14 | expect(t2.timestamp() < t3.timestamp()).toBe(true);
15 |
16 | t2.modified();
17 | t3.modified();
18 | t2.modified();
19 |
20 | expect(t2.timestamp()).toBe(t2.timestamp());
21 | expect(t1.timestamp() < t2.timestamp()).toBe(true);
22 | expect(t3.timestamp() < t2.timestamp()).toBe(true);
23 | expect(t1.timestamp() < t3.timestamp()).toBe(true);
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/tests/cases/version.js:
--------------------------------------------------------------------------------
1 | describe('geo.version', function () {
2 | var geo = require('../test-utils').geo;
3 | it('Version number is defined', function () {
4 | expect(geo.version).toMatch(/[0-9]+\.[0-9]+\.[0-9]+[_a-zA-Z]*/);
5 | });
6 | });
7 |
8 | describe('geo.version', function () {
9 | var geo = require('../test-utils').geo;
10 | it('Git SHA is defined', function () {
11 | expect(geo.sha).toMatch(/^[0-9a-f]{8,}$/);
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/tests/data/proxy-for-tests.pac:
--------------------------------------------------------------------------------
1 | /* global dnsDomainIs */
2 |
3 | function FindProxyForURL(url, host) {
4 | // Redirect tiles to our test server
5 | if (dnsDomainIs(host, '.tile.openstreetmap.org')) {
6 | return 'PROXY 127.0.0.1:9876';
7 | }
8 | if (dnsDomainIs(host, '.a.ssl.fastly.net')) {
9 | return 'PROXY 127.0.0.1:9876';
10 | }
11 | return 'DIRECT';
12 | }
13 |
--------------------------------------------------------------------------------
/tests/data/test.css:
--------------------------------------------------------------------------------
1 | .image-background {
2 | background-image: url('white.jpg');
3 | }
4 |
--------------------------------------------------------------------------------
/tests/data/weather.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tests/data/weather.png
--------------------------------------------------------------------------------
/tests/data/white.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tests/data/white.jpg
--------------------------------------------------------------------------------
/tests/gl-cases/d3Vectors.js:
--------------------------------------------------------------------------------
1 | describe('svgLines', function () {
2 | var imageTest = require('../image-test');
3 | var common = require('../test-common');
4 | var geo = require('../test-utils').geo;
5 | var d3 = require('d3');
6 |
7 | var myMap;
8 |
9 | beforeEach(function () {
10 | imageTest.prepareImageTest();
11 | });
12 |
13 | afterEach(function () {
14 | myMap.exit();
15 | });
16 |
17 | it('line test', function (done) {
18 | var mapOptions = {center: {x: -105.0, y: 40.0}, zoom: 3.5};
19 | myMap = common.createOsmMap(mapOptions, {}, true);
20 | common.loadCitiesData(function (citieslatlon) {
21 | var layer = myMap.createLayer('feature', {renderer: 'svg'});
22 |
23 | var color = d3.scaleOrdinal(d3.schemeCategory10).domain(d3.range(10));
24 |
25 | var vectors = layer.createFeature('vector')
26 | .data(citieslatlon)
27 | .origin(function (d) { return { x: d.lon, y: d.lat }; })
28 | .style('strokeColor', function (d, i) {
29 | return color(i % 10);
30 | })
31 | .style('strokeWidth', 2.5);
32 |
33 | function setDelta() {
34 | var center = myMap.center();
35 | vectors.delta(function (d) {
36 | return {
37 | x: center.x - d.lon,
38 | y: center.y - d.lat
39 | };
40 | }).draw();
41 | }
42 |
43 | setDelta();
44 | layer.geoOn(geo.event.pan, setDelta);
45 | myMap.draw();
46 |
47 | imageTest.imageTest('svgVectors', null, 0.0015, done, myMap.onIdle, 0, 2);
48 | }, 30);
49 | });
50 | });
51 |
--------------------------------------------------------------------------------
/tests/gl-cases/map.js:
--------------------------------------------------------------------------------
1 | describe('map', function () {
2 | var imageTest = require('../image-test');
3 | var common = require('../test-common');
4 |
5 | var myMap;
6 |
7 | beforeEach(function () {
8 | imageTest.prepareImageTest();
9 | });
10 |
11 | afterEach(function () {
12 | myMap.exit();
13 | });
14 |
15 | it('map bounds', function (done) {
16 | myMap = common.createOsmMap({
17 | center: {x: -80, y: 30},
18 | zoom: 2,
19 | clampZoom: true,
20 | clampBoundsX: false,
21 | clampBoundsY: false,
22 | maxZoom: 4
23 | }, {});
24 | myMap.draw();
25 | myMap.bounds({left: 113, right: 153, bottom: -45, top: -5});
26 |
27 | imageTest.imageTest('mapBounds', null, 0.0015, done, myMap.onIdle, 0, 2);
28 | });
29 |
30 | it('map center', function (done) {
31 | myMap = common.createOsmMap({center: {x: -78, y: 21}}, {});
32 | myMap.draw();
33 | myMap.center({x: 60, y: 20});
34 |
35 | imageTest.imageTest('mapCenter', null, 0.0015, done, myMap.onIdle, 0, 2);
36 | });
37 |
38 | it('map center and zoom', function (done) {
39 | myMap = common.createOsmMap({center: {x: -78, y: 21}}, {});
40 | myMap.draw();
41 | myMap.center({x: 60, y: 20}).zoom(3);
42 |
43 | imageTest.imageTest('mapZoom', null, 0.0015, done, myMap.onIdle, 0, 2);
44 | });
45 | });
46 |
--------------------------------------------------------------------------------
/tests/gl-cases/pixelAlignment.js:
--------------------------------------------------------------------------------
1 | describe('Pixel Alignment', function () {
2 | var imageTest = require('../image-test');
3 | var common = require('../test-common');
4 |
5 | var myMap;
6 |
7 | beforeEach(function () {
8 | imageTest.prepareImageTest();
9 | });
10 |
11 | afterEach(function () {
12 | myMap.exit();
13 | });
14 |
15 | it('pixel alignment', function (done) {
16 | var mapOptions = {
17 | center: {x: -105.0, y: 40.0},
18 | zoom: 8,
19 | discreteZoom: true
20 | };
21 | myMap = common.createOsmMap(mapOptions, {url: '/data/tilefancy.png'});
22 |
23 | myMap.draw();
24 |
25 | imageTest.imageTest('pixelAlignment', null, 0, done, myMap.onIdle, 0, 2);
26 | }, 30000);
27 | });
28 |
--------------------------------------------------------------------------------
/tests/gl-cases/svgGraph.js:
--------------------------------------------------------------------------------
1 | describe('svgGraph', function () {
2 | var imageTest = require('../image-test');
3 | var common = require('../test-common');
4 |
5 | var myMap;
6 |
7 | beforeEach(function () {
8 | imageTest.prepareImageTest();
9 | });
10 |
11 | afterEach(function () {
12 | myMap.exit();
13 | });
14 |
15 | it('graph test', function (done) {
16 | var mapOptions = {center: {x: -105.0, y: 40.0}, zoom: 3.5};
17 | myMap = common.createOsmMap(mapOptions, {}, true);
18 | common.loadCitiesData(function (citieslatlon) {
19 | citieslatlon.forEach(function (c, i) {
20 | c.children = [
21 | citieslatlon[(i + 1) % citieslatlon.length],
22 | citieslatlon[(i + 2) % citieslatlon.length]
23 | ];
24 | c.x = c.lon;
25 | c.y = c.lat;
26 | });
27 |
28 | var layer = myMap.createLayer('feature', {renderer: 'svg'});
29 | layer.createFeature('graph')
30 | .data(citieslatlon)
31 | .style({
32 | nodes: {
33 | stroke: false,
34 | fillOpacity: 0.5
35 | },
36 | linkType: 'path'
37 | });
38 | myMap.draw();
39 |
40 | imageTest.imageTest('svgGraph', null, 0.0015, done, myMap.onIdle, 0, 2);
41 | }, 10); // just load 10 cities
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/tests/gl-cases/svgLines.js:
--------------------------------------------------------------------------------
1 | describe('svgLines', function () {
2 | var imageTest = require('../image-test');
3 | var common = require('../test-common');
4 |
5 | var myMap;
6 |
7 | beforeEach(function () {
8 | imageTest.prepareImageTest();
9 | });
10 |
11 | afterEach(function () {
12 | myMap.exit();
13 | });
14 |
15 | it('line test', function (done) {
16 | var mapOptions = {center: {x: -105.0, y: 40.0}};
17 | myMap = common.createOsmMap(mapOptions, {}, true);
18 | common.loadCitiesData(function (citieslatlon) {
19 | var layer = myMap.createLayer('feature', {renderer: 'svg'});
20 | var n = citieslatlon.length / 2;
21 | var group1 = citieslatlon.filter(function (d, i) { return i < n; })
22 | .sort(function (d1, d2) {
23 | return d1.lon < d2.lon ? 1 : -1;
24 | });
25 |
26 | var group2 = citieslatlon.filter(function (d, i) { return i >= n; })
27 | .sort(function (d1, d2) {
28 | return d1.lat < d2.lat ? 1 : -1;
29 | });
30 |
31 | layer.createFeature('line')
32 | .data([group1, group2])
33 | .style('strokeColor', function (d, i, e, j) {
34 | if (j === 0) {
35 | return 'red';
36 | } else {
37 | return 'blue';
38 | }
39 | })
40 | .style('strokeOpacity', 0.5)
41 | .style('strokeWidth', 4)
42 | .position(function (d) {
43 | return { x: d.lon, y: d.lat };
44 | });
45 |
46 | myMap.draw();
47 |
48 | imageTest.imageTest('svgLines', null, 0.0015, done, myMap.onIdle, 0, 2);
49 | });
50 | }, 30000);
51 | });
52 |
--------------------------------------------------------------------------------
/tests/gl-cases/ui.js:
--------------------------------------------------------------------------------
1 | describe('ui', function () {
2 | var imageTest = require('../image-test');
3 | var common = require('../test-common');
4 |
5 | var map;
6 |
7 | beforeEach(function () {
8 | imageTest.prepareImageTest();
9 | });
10 |
11 | afterEach(function () {
12 | map.exit();
13 | });
14 |
15 | it('ui layers', function (done) {
16 | map = common.createOsmMap({center: {x: -70, y: 40}}, {}, true);
17 |
18 | // we should see two sliders on a solid blue background
19 | map.createLayer('osm', {url: '/data/white.jpg', attribution: null});
20 | map.createLayer('ui').createWidget('slider');
21 | map.createLayer('osm', {url: '/data/red.jpg', attribution: null});
22 | map.createLayer('ui').createWidget('slider', {position: {bottom: 0}});
23 | map.createLayer('osm', {url: '/data/blue.jpg', attribution: null});
24 |
25 | map.draw();
26 | imageTest.imageTest('uiLayer', null, 0.0015, done, map.onIdle, 0, 2);
27 | }, 30000);
28 | });
29 |
--------------------------------------------------------------------------------
/tests/gl-cases/vtkjsPointFeature.js:
--------------------------------------------------------------------------------
1 | var $ = require('jquery');
2 | var createMap = require('../test-utils').createMap;
3 | var destroyMap = require('../test-utils').destroyMap;
4 | var waitForIt = require('../test-utils').waitForIt;
5 |
6 | /* This is a basic integration test of geo.gvtkjs.pointFeature. */
7 | describe('geo.vtkjs.pointFeature', function () {
8 | var testPoints = [
9 | {x: 20, y: 10}, {x: 25, y: 10}, {x: 30, y: 10}, {x: 35, y: 12},
10 | {x: 32, y: 15}, {x: 30, y: 20}, {x: 35, y: 22}, {x: 32, y: 25},
11 | {x: 30, y: 30}, {x: 35, y: 32}, {x: 32, y: 35}, {x: 30, y: 30},
12 | {x: 40, y: 20, radius: 10}, {x: 42, y: 20, radius: 5},
13 | {x: 44, y: 20, radius: 2}, {x: 46, y: 20, radius: 2},
14 | {x: 50, y: 10}, {x: 50, y: 10}, {x: 60, y: 10}
15 | ];
16 |
17 | var map, layer, point, calledRadius;
18 | it('basic usage', function () {
19 | map = createMap();
20 | layer = map.createLayer('feature', {renderer: 'vtkjs'});
21 | point = layer.createFeature('point', {
22 | style: {
23 | strokeWidth: 2,
24 | radius: function (d) {
25 | calledRadius = true;
26 | return d.radius ? d.radius : 5;
27 | }
28 | }
29 | }).data(testPoints);
30 | sinon.spy(point, '_update');
31 | point.draw();
32 | expect(point._update.calledOnce).toBe(true);
33 | point._update.restore();
34 | expect($('#map div canvas').length).toBe(1);
35 | });
36 | waitForIt('points to be generated', function () {
37 | return calledRadius;
38 | });
39 | it('exit', function () {
40 | destroyMap();
41 | expect(true).toBe(true);
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/tests/headed-cases/lines.js:
--------------------------------------------------------------------------------
1 | var $ = require('jquery');
2 |
3 | describe('lines example', function () {
4 | var imageTest = require('../image-test');
5 | var base$;
6 |
7 | beforeAll(function () {
8 | imageTest.prepareIframeTest();
9 | });
10 |
11 | it('basic', function (done) {
12 | // use a local url for the map for the test
13 | $('#map').attr('src', '/examples/lines/index.html?url=/data/tiles/{z}/{x}/{y}.png');
14 | imageTest.imageTest('exampleLines', '#map', 0.0015, done, null, 0, 2, '#map.ready');
15 | }, 10000);
16 | it('more lines', function (done) {
17 | base$ = $('iframe#map')[0].contentWindow.jQuery;
18 | base$('#lines').val(100000).trigger('change');
19 | window.setTimeout(function () {
20 | imageTest.imageTest('exampleLines100k', '#map', 0.0015, done, null, 0, 2, '#map.ready[segments="100000"]');
21 | }, 100);
22 | }, 10000);
23 | it('thin preset', function (done) {
24 | base$('button.preset').eq(1).trigger('click');
25 | window.setTimeout(function () {
26 | imageTest.imageTest('exampleLinesThin', '#map', 0.0015, done, null, 0, 2, '#map.ready');
27 | }, 100);
28 | }, 10000);
29 | });
30 |
--------------------------------------------------------------------------------
/tests/headed-cases/map.js:
--------------------------------------------------------------------------------
1 | describe('two maps', function () {
2 | var imageTest = require('../image-test');
3 | var common = require('../test-common');
4 | var $ = require('jquery');
5 |
6 | var map1, map2;
7 |
8 | beforeEach(function () {
9 | var twomap = $('').css({width: '320px', height: '480px'});
10 | $('#map').remove();
11 | $('body').prepend(twomap);
12 | twomap.append($('').css({width: '100%', height: '50%'}));
13 | twomap.append($('').css({width: '100%', height: '50%'}));
14 | });
15 | afterEach(function () {
16 | map1.exit();
17 | map2.exit();
18 | $('#twomap').remove();
19 | });
20 |
21 | it('two maps', function (done) {
22 | map1 = common.createOsmMap({node: '#map1', center: {x: -70, y: 40}, zoom: 3});
23 | map2 = common.createOsmMap({node: '#map2', center: {x: 70, y: 40}, zoom: 3});
24 | map1.draw();
25 | map2.draw();
26 |
27 | var idle = function (callback) {
28 | window.setTimeout(function () {
29 | map1.onIdle(function () {
30 | map2.onIdle(callback);
31 | });
32 | }, 100);
33 | };
34 |
35 | imageTest.imageTest('mapTwo', '#twomap', 0.0015, done, idle, 0, 2);
36 | });
37 | });
38 |
--------------------------------------------------------------------------------
/tests/test-gl.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Entry point for all tests in ./gl-cases/*
3 | * This is here to prevent webpack from creating a separate bundle for each
4 | * test case. See: https://github.com/webpack/karma-webpack/issues/23
5 | */
6 |
7 | var tests = require.context('./gl-cases', true, /.*\.js$/);
8 | tests.keys().forEach(tests);
9 |
--------------------------------------------------------------------------------
/tests/test-headed.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Entry point for all tests in ./headed-cases/*
3 | * This is here to prevent webpack from creating a separate bundle for each
4 | * test case. See: https://github.com/webpack/karma-webpack/issues/23
5 | */
6 |
7 | var tests = require.context('./headed-cases', true, /.*\.js$/);
8 | tests.keys().forEach(tests);
9 |
--------------------------------------------------------------------------------
/tests/test-unit.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Entry point for all tests in ./cases/*
3 | * This is here to prevent webpack from create a separate bundle for each
4 | * test case. See: https://github.com/webpack/karma-webpack/issues/23
5 | */
6 | var tests = require.context('./cases', true, /.*\.js$/);
7 | tests.keys().forEach(tests);
8 |
--------------------------------------------------------------------------------
/tutorials/annotation/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/annotation/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/annotation/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Annotations",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "tutorialCss": [],
6 | "tutorialJs": [],
7 | "about": {
8 | "text": "Draw different annotations, optionally setting the aspect ratio for rectangles and ellipses"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/basic/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/basic/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/basic/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Simple Map",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "order": 0,
6 | "tutorialCss": [],
7 | "tutorialJs": [],
8 | "about": {
9 | "text": "Make a simple map. Includes HTML, CSS, and Javascript."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tutorials/build-website.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var fs = require('fs-extra');
3 | var pug = require('pug');
4 |
5 | var buildUtils = require('../examples/build-utils');
6 |
7 | // generate the tutorials
8 | fs.ensureDirSync('website/source/tutorials');
9 | var tutorials = buildUtils.getList('tutorials', 'tutorial', path.resolve('website', 'source'));
10 |
11 | tutorials.forEach(function (json) {
12 | var pugTemplate = fs.readFileSync(path.relative('.', path.resolve(json.dir, 'index.pug')), 'utf8');
13 | pugTemplate = pugTemplate.replace('extends ../common/index.pug', 'extends ../common/index-website.pug');
14 |
15 | var fn = pug.compile(pugTemplate, {
16 | pretty: false,
17 | filename: path.relative('.', path.resolve(json.dir, 'index.pug'))
18 | });
19 | var html = fn(json);
20 | html = html.replace(/<=/g, '<=').replace(/>=/g, '>=');
21 | html = `---
22 | layout: tutorial
23 | title: ${json.title}
24 | about: ${json.about.text}
25 | tutorialCss: ${JSON.stringify(json.tutorialCss)}
26 | tutorialJs: ${JSON.stringify(json.tutorialJs)}
27 | ---
28 | ` + html;
29 | fs.writeFileSync(path.resolve(json.output, 'index.html'), html);
30 | });
31 |
32 | // copy common files
33 | fs.copySync('tutorials/common', 'website/source/tutorials/common');
34 |
35 | buildUtils.writeYamlList(path.resolve('website', 'source', '_data'), 'tutorials.yml', tutorials);
36 |
--------------------------------------------------------------------------------
/tutorials/build.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var fs = require('fs-extra');
3 | var pug = require('pug');
4 |
5 | var buildUtils = require('../examples/build-utils');
6 |
7 | // generate the tutorials
8 | fs.ensureDirSync('dist/tutorials');
9 | var tutorials = buildUtils.getList('tutorials', 'tutorial', 'dist');
10 |
11 | tutorials.forEach(function (json) {
12 | var fn = pug.compileFile(path.relative('.', path.resolve(json.dir, 'index.pug')), {pretty: true});
13 | fs.writeFileSync(path.resolve(json.output, 'index.html'), fn(json));
14 | });
15 |
16 | // copy common files
17 | fs.copySync('tutorials/common', 'dist/tutorials/common');
18 |
19 | // create the main tutorial page
20 | var data = {
21 | hideNavbar: false,
22 | tutorialCss: ['main.css'],
23 | tutorialJs: ['main.js'],
24 | tutorials: tutorials,
25 | bundle: './bundle.js',
26 | about: {hidden: true},
27 | title: 'GeoJS'
28 | };
29 |
30 | // copy assets for the main page
31 | fs.copySync('tutorials/main.js', 'dist/tutorials/main.js');
32 | fs.copySync('tutorials/main.css', 'dist/tutorials/main.css');
33 |
34 | var fn = pug.compileFile('./tutorials/index.pug', {pretty: true});
35 | fs.writeFileSync(
36 | path.resolve('dist', 'tutorials', 'index.html'),
37 | fn(data)
38 | );
39 |
--------------------------------------------------------------------------------
/tutorials/choropleth/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/choropleth/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/choropleth/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Choropleth",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "order": 3,
6 | "tutorialCss": [],
7 | "tutorialJs": [],
8 | "about": {
9 | "text": "Create a choropleth map, set the colors used, and add a legend."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tutorials/common/thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/common/thumb.png
--------------------------------------------------------------------------------
/tutorials/contour/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/contour/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/contour/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Contour Map",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "tutorialCss": [],
6 | "tutorialJs": [],
7 | "about": {
8 | "text": "Plot grid data as a color contour."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/editor/editor.js:
--------------------------------------------------------------------------------
1 | /* global start_tutorial */
2 |
3 | $(function () {
4 | /* start_tutorial has to be called explicitly when we are ready since we need
5 | * to ask it to always keep url changes. */
6 | start_tutorial(undefined, true);
7 | });
8 |
--------------------------------------------------------------------------------
/tutorials/editor/index.pug:
--------------------------------------------------------------------------------
1 | extends ../common/index.pug
2 |
3 | block mainTutorial
4 | :markdown-it
5 | # Editor
6 | Any changes made will be stored in the URL whenever the code is run. This can be sent as a link, bookmarked, or otherwise shared.
7 |
8 | You can interact with the code through the javascript console by accessing the top-level variables in the `tutorial` global parameter.
9 |
10 | +codeblock('javascript', 1, undefined, true).
11 | var map = geo.map({
12 | node: "#map",
13 | center: {x: 4.90, y: 52.37},
14 | zoom: 14
15 | });
16 | var layer = map.createLayer('osm');
17 | +codeblock_test('map has one osm layer from a known tile source', [
18 | 'map.layers().length === 1',
19 | 'map.layers()[0] instanceof geo.osmLayer',
20 | 'layer.url().match(/(openstreetmap|stamen)/)'
21 | ])
22 |
--------------------------------------------------------------------------------
/tutorials/editor/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/editor/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/editor/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Editor",
3 | "hideNavbar": true,
4 | "level": 10,
5 | "order": 0,
6 | "tutorialJs": ["editor.js"],
7 | "about": {
8 | "text": "Edit and save work in URL."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/editor3/editor.js:
--------------------------------------------------------------------------------
1 | /* global start_tutorial */
2 |
3 | $(function () {
4 | /* start_tutorial has to be called explicitly when we are ready since we need
5 | * to ask it to always keep url changes. */
6 | start_tutorial(undefined, true);
7 | });
8 |
--------------------------------------------------------------------------------
/tutorials/editor3/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/editor3/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/editor3/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Editor with HTML and CSS",
3 | "hideNavbar": true,
4 | "level": 10,
5 | "order": 1,
6 | "tutorialJs": ["editor.js"],
7 | "about": {
8 | "text": "Edit and save work in URL. Edit the HTML to try different versions of GeoJS."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/grid/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/grid/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/grid/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Grid Data",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "tutorialCss": [],
6 | "tutorialJs": [],
7 | "about": {
8 | "text": "Plot grid data where each grid element is a solid color."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/index-website.js:
--------------------------------------------------------------------------------
1 | require('../src/vendor');
2 | window.geo = require('../src/index');
3 |
4 | // codemirror and plugins
5 | require('codemirror/lib/codemirror.css');
6 | require('codemirror/addon/lint/lint.css');
7 | require('codemirror/addon/fold/foldgutter.css');
8 |
9 | window.jsonlint = require('jsonlint-mod');
10 | require('codemirror');
11 | require('codemirror/mode/javascript/javascript');
12 | require('codemirror/mode/css/css');
13 | require('codemirror/mode/htmlmixed/htmlmixed');
14 | require('codemirror/addon/lint/lint');
15 | require('codemirror/addon/lint/json-lint');
16 | require('codemirror/addon/fold/brace-fold');
17 | require('codemirror/addon/fold/foldcode');
18 | require('codemirror/addon/fold/foldgutter');
19 | require('codemirror/addon/edit/matchbrackets');
20 |
21 | // common tutorial code
22 | require('./common/tutorials.css');
23 | window.start_tutorial = require('./common/tutorials');
24 |
--------------------------------------------------------------------------------
/tutorials/index.js:
--------------------------------------------------------------------------------
1 | require('../src/vendor');
2 | window.geo = require('../src/index');
3 |
4 | // bootstrap and themes
5 | require('bootstrap/dist/css/bootstrap.css');
6 | require('bootswatch/flatly/bootstrap.css');
7 | require('bootstrap');
8 |
9 | // codemirror and plugins
10 | window.jsonlint = require('jsonlint-mod');
11 | require('codemirror/lib/codemirror.css');
12 | require('codemirror/addon/lint/lint.css');
13 | require('codemirror/addon/fold/foldgutter.css');
14 |
15 | require('codemirror');
16 | require('codemirror/mode/javascript/javascript');
17 | require('codemirror/mode/css/css');
18 | require('codemirror/mode/htmlmixed/htmlmixed');
19 | require('codemirror/addon/lint/lint');
20 | require('codemirror/addon/lint/json-lint');
21 | require('codemirror/addon/fold/brace-fold');
22 | require('codemirror/addon/fold/foldcode');
23 | require('codemirror/addon/fold/foldgutter');
24 | require('codemirror/addon/edit/matchbrackets');
25 |
26 | // common tutorial code
27 | require('./common/tutorials.css');
28 | window.start_tutorial = require('./common/tutorials');
29 |
--------------------------------------------------------------------------------
/tutorials/index.pug:
--------------------------------------------------------------------------------
1 | extends ./common/index.pug
2 |
3 | mixin thumbnail(ex)
4 | .col-md-4
5 | .thumbnail
6 | a(href=ex.path + "/")
7 | img(src=ex.path + "/" + (ex.thumb || "thumb.jpg"), onerror="var url = 'common/thumb.png'; if (this.src!=url) this.src = url;")
8 | .caption
9 | h3= ex.title
10 | if ex.about.text
11 | .description
12 | p= ex.about.text
13 |
14 | block prepend headerButtons
15 | ul.nav.navbar-nav.navbar-right
16 | li.dropdown
17 | a.dropdown-toggle(href="#", data-toggle="dropdown") Resources
18 | span.caret
19 | ul.dropdown-menu(role="menu")
20 | li
21 | a(href="https://github.com/OpenGeoscience/geojs") Source
22 | a(href="https://github.com/OpenGeoscience/geojs/issues") Bugs
23 | a(href="https://opengeoscience.github.io/geojs/apidocs/") Documentation
24 |
25 | block mainContent
26 | .jumbotron
27 | .container
28 | h1 Welcome to GeoJS
29 | p GeoJS is a javascript library for visualizing geospatial
30 | | data in a browser. Its flexible API provides users with
31 | | the ability to combine multiple visualizations drawn
32 | | in WebGL, canvas, and SVG into a single dynamic map.
33 | p It is easy to get started with GeoJS. See the tutorials below.
34 |
35 | .container-fluid
36 | - var iTutorial = 0;
37 | while iTutorial < tutorials.length
38 | .row
39 | - var i = 0
40 | while i < 3 && iTutorial < tutorials.length
41 | if !tutorials[iTutorial].disabled
42 | - i += 1
43 | +thumbnail(tutorials[iTutorial])
44 | - iTutorial += 1
45 |
--------------------------------------------------------------------------------
/tutorials/isoline/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/isoline/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/isoline/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Isolines",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "about": {
6 | "text": "Draw isolines based on scalar grid values."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/large_image/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/large_image/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/large_image/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Large Image",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "about": {
6 | "text": "Show a large image from a tile server."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/lines/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/lines/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/lines/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Lines",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "about": {
6 | "text": "Place lines with different styles in a geospatial context."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/main.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | overflow: auto;
3 | }
4 |
5 | .thumbnail {
6 | position: relative;
7 | overflow: hidden;
8 | }
9 |
10 | .thumbnail .caption .description{
11 | position: absolute;
12 | top: 0px;
13 | right: 0px;
14 | background: rgba(50, 50, 50, 0.8) !important;
15 | width: 100%;
16 | padding: 2%;
17 | display: none;
18 | text-align: center;
19 | color: #fff !important;
20 | z-index: 2;
21 | border-radius: 3px;
22 | }
23 |
24 | .navbar {
25 | margin: 0;
26 | }
27 |
--------------------------------------------------------------------------------
/tutorials/main.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | 'use strict';
3 |
4 | $('.thumbnail').hover(
5 | function () {
6 | $(this).find('.caption .description').slideDown(250);
7 | },
8 | function () {
9 | $(this).find('.caption .description').slideUp(250);
10 | }
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/tutorials/marker/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/marker/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/marker/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Markers",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "tutorialCss": [],
6 | "tutorialJs": [],
7 | "about": {
8 | "text": "Use markers with different styles."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/multiframe/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/multiframe/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/multiframe/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Multiple Frame Large Image",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "about": {
6 | "text": "Use two layers to form an A/B buffer when switching between frames of a large image from a tile server."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/pixelmap/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/pixelmap/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/pixelmap/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Pixelmap",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "tutorialCss": [],
6 | "tutorialJs": [],
7 | "about": {
8 | "text": "Render categorical data via a pixelmap."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/scale/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/scale/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/scale/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Map Scale",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "order": 4,
6 | "about": {
7 | "text": "Show scale on a map using a variety of options."
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tutorials/simple_point/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/simple_point/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/simple_point/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Simple Point",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "order": 0,
6 | "tutorialCss": [],
7 | "tutorialJs": [],
8 | "about": {
9 | "text": "Add points to a map"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tutorials/text/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/text/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/text/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Text and Points",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "thumbquery": "initial=4",
6 | "about": {
7 | "text": "Add text labels and points to a map"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tutorials/tile_source/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/tile_source/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/tile_source/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Changing Tile Source",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "tutorialCss": [],
6 | "tutorialJs": [],
7 | "about": {
8 | "text": "Make a simple map and change the tile source."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/tiled-pixelmap/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/tiled-pixelmap/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/tiled-pixelmap/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Tiled Pixelmap",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "tutorialCss": [],
6 | "tutorialJs": [],
7 | "about": {
8 | "text": "Render large categorical data via a tiled pixelmap."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tutorials/tracks/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/tracks/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/tracks/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Tracks",
3 | "hideNavbar": true,
4 | "level": 0,
5 | "about": {
6 | "text": "Track features are much like line features with a time value per vertex. A start and end time can be specified."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/video_on_map/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_on_map/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/video_on_map/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Geospatial Video",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "about": {
6 | "text": "Place a video quad on a map with the correct geospatial location. This shows how to make a video quad and start it playing from a user action."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/video_single/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_single/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/video_single/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Single Video",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "about": {
6 | "text": "Fill the complete extent of the map with a single video. Draw a polygon on it."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/video_transport/media-back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_transport/media-back.png
--------------------------------------------------------------------------------
/tutorials/video_transport/media-ff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_transport/media-ff.png
--------------------------------------------------------------------------------
/tutorials/video_transport/media-pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_transport/media-pause.png
--------------------------------------------------------------------------------
/tutorials/video_transport/media-play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_transport/media-play.png
--------------------------------------------------------------------------------
/tutorials/video_transport/media-rewind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_transport/media-rewind.png
--------------------------------------------------------------------------------
/tutorials/video_transport/media-step.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_transport/media-step.png
--------------------------------------------------------------------------------
/tutorials/video_transport/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/video_transport/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/video_transport/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Video with Transport Controls",
3 | "hideNavbar": true,
4 | "level": 1,
5 | "about": {
6 | "text": "Show a video with controls for playback speed and frame."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tutorials/wms/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/tutorials/wms/thumb.jpg
--------------------------------------------------------------------------------
/tutorials/wms/tutorial.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Using a WMS Tile Source",
3 | "hideNavbar": true,
4 | "tutorialCss": [],
5 | "tutorialJs": [],
6 | "level": 0,
7 | "about": {
8 | "text": "Make a map with a custom function for getting tiles from a WMS server. This also shows how to get tile bounds in different coordinates."
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/webpack-tutorials.config.js:
--------------------------------------------------------------------------------
1 | const WebpackStringReplacer = require('webpack-string-replacer');
2 | var TerserPlugin = require('terser-webpack-plugin');
3 |
4 | var path = require('path');
5 |
6 | var base = require('./webpack.config');
7 |
8 | var rules = base.module.rules.concat([{
9 | test: /\.pug$/,
10 | use: ['pug-load']
11 | }, {
12 | test: /\.(woff|woff2|eot|ttf|svg)(\?v=\d+\.\d+\.\d+)?$/,
13 | type: 'asset/inline'
14 | }, {
15 | test: require.resolve('codemirror'),
16 | use: [{
17 | loader: 'expose-loader',
18 | options: {exposes: 'CodeMirror'}
19 | }]
20 | }]);
21 |
22 | var plugins = base.plugins;
23 | plugins.push(new WebpackStringReplacer({
24 | rules:[{
25 | fileInclude: /bootstrap.css$/,
26 | replacements: [{
27 | pattern: /@import.*fonts.googleapis.com\/css\?family=Lato[^;]*;/g,
28 | replacement: () => '@import url(../../@fontsource/lato/index.css);'
29 | }]
30 | }]
31 | }));
32 |
33 | var resolve = {
34 | extensions: ['.js', '.css', '.pug', '...'],
35 | alias: base.resolve.alias
36 | };
37 |
38 | module.exports = {
39 | mode: 'production',
40 | performance: {hints: false},
41 | devtool: 'source-map',
42 | context: path.join(__dirname),
43 | entry: {
44 | bundle: './tutorials/index.js'
45 | },
46 | output: {
47 | path: path.join(__dirname, 'dist', 'tutorials'),
48 | publicPath: '/tutorials/',
49 | filename: '[name].js'
50 | },
51 | optimization: {
52 | minimizer: [
53 | new TerserPlugin({
54 | extractComments: false,
55 | parallel: true
56 | })
57 | ]
58 | },
59 | module: {
60 | rules: rules
61 | },
62 | resolve: resolve,
63 | plugins: plugins
64 | };
65 |
--------------------------------------------------------------------------------
/webpack-website-examples.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 |
3 | var config = require('./webpack-examples.config.js');
4 |
5 | config.entry.bundle = './examples/index-website.js';
6 | config.output.path = path.join(__dirname, 'website', 'source', 'examples');
7 |
8 | module.exports = config;
9 |
--------------------------------------------------------------------------------
/webpack-website-tutorials.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 |
3 | var config = require('./webpack-tutorials.config.js');
4 |
5 | config.entry.bundle = './tutorials/index-website.js';
6 | config.output.path = path.join(__dirname, 'website', 'source', 'tutorials');
7 |
8 | module.exports = config;
9 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var config = require('./webpack.base.config');
2 | const { merge } = require('webpack-merge');
3 |
4 | module.exports = merge(config, {
5 | entry: {
6 | geo: ['./index.js'],
7 | 'geo.min': ['./index.js']
8 | },
9 | externals: {
10 | 'vtk.js': 'vtk.js'
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/website/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Thumbs.db
3 | db.json
4 | *.log
5 | node_modules/
6 | public/
7 | .deploy*/
8 | source/_data/**
9 | source/apidocs/**
10 | source/built/**
11 | source/data/**
12 | source/examples/**
13 | source/tutorials/**
14 | package-lock.json
15 |
--------------------------------------------------------------------------------
/website/README.md:
--------------------------------------------------------------------------------
1 | Setup environment
2 | =================
3 | - Run ```npm run setup-website```
4 |
5 | Update website
6 | ==============
7 | - Run ```npm run build-website``` to build the website, the output will be available under ```website\public```
8 | - Copy ```website\public``` to ```gh-pages``` branch to update the website
9 |
10 | Develop website
11 | ===============
12 | - Run ```npm run build-website```
13 | - Run ```npm run website``` and navigate to ```localhost:4000```. The website will update when there is a file change.
14 |
--------------------------------------------------------------------------------
/website/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "geojs-site",
3 | "version": "0.0.0",
4 | "private": true,
5 | "hexo": {
6 | "version": "5.4.2"
7 | },
8 | "dependencies": {
9 | "hexo": "^7.0.0",
10 | "hexo-fs": "^5.0.0",
11 | "hexo-renderer-ejs": "^2.0.0",
12 | "hexo-renderer-marked": "^7.0.0",
13 | "hexo-renderer-sass": "^0.5.0",
14 | "hexo-renderer-stylus": "^3.0.0",
15 | "hexo-server": "^3.0.0"
16 | },
17 | "devDependencies": {
18 | "ejs-lint": "^2.0.0",
19 | "hexo-cli": "^4.3.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/website/source/404.html:
--------------------------------------------------------------------------------
1 | ---
2 | title: Page Not Found
3 | ---
4 |
5 |
6 | Page Not Found
7 |
8 |
9 |
--------------------------------------------------------------------------------
/website/source/examples/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: examples
3 | title: Examples
4 | ---
5 |
--------------------------------------------------------------------------------
/website/source/favicon/android-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/android-icon-144x144.png
--------------------------------------------------------------------------------
/website/source/favicon/android-icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/android-icon-192x192.png
--------------------------------------------------------------------------------
/website/source/favicon/android-icon-36x36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/android-icon-36x36.png
--------------------------------------------------------------------------------
/website/source/favicon/android-icon-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/android-icon-48x48.png
--------------------------------------------------------------------------------
/website/source/favicon/android-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/android-icon-72x72.png
--------------------------------------------------------------------------------
/website/source/favicon/android-icon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/android-icon-96x96.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-114x114.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-120x120.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-144x144.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-152x152.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-180x180.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-57x57.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-60x60.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-72x72.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-76x76.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon-precomposed.png
--------------------------------------------------------------------------------
/website/source/favicon/apple-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/apple-icon.png
--------------------------------------------------------------------------------
/website/source/favicon/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 | #ffffff
3 |
--------------------------------------------------------------------------------
/website/source/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/website/source/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/website/source/favicon/favicon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/favicon-96x96.png
--------------------------------------------------------------------------------
/website/source/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/favicon.ico
--------------------------------------------------------------------------------
/website/source/favicon/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "App",
3 | "icons": [
4 | {
5 | "src": "\/android-icon-36x36.png",
6 | "sizes": "36x36",
7 | "type": "image\/png",
8 | "density": "0.75"
9 | },
10 | {
11 | "src": "\/android-icon-48x48.png",
12 | "sizes": "48x48",
13 | "type": "image\/png",
14 | "density": "1.0"
15 | },
16 | {
17 | "src": "\/android-icon-72x72.png",
18 | "sizes": "72x72",
19 | "type": "image\/png",
20 | "density": "1.5"
21 | },
22 | {
23 | "src": "\/android-icon-96x96.png",
24 | "sizes": "96x96",
25 | "type": "image\/png",
26 | "density": "2.0"
27 | },
28 | {
29 | "src": "\/android-icon-144x144.png",
30 | "sizes": "144x144",
31 | "type": "image\/png",
32 | "density": "3.0"
33 | },
34 | {
35 | "src": "\/android-icon-192x192.png",
36 | "sizes": "192x192",
37 | "type": "image\/png",
38 | "density": "4.0"
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/website/source/favicon/ms-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/ms-icon-144x144.png
--------------------------------------------------------------------------------
/website/source/favicon/ms-icon-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/ms-icon-150x150.png
--------------------------------------------------------------------------------
/website/source/favicon/ms-icon-310x310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/ms-icon-310x310.png
--------------------------------------------------------------------------------
/website/source/favicon/ms-icon-70x70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/source/favicon/ms-icon-70x70.png
--------------------------------------------------------------------------------
/website/source/tutorials/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: tutorials
3 | title: Tutorials
4 | ---
5 |
--------------------------------------------------------------------------------
/website/themes/agency/_config.yml:
--------------------------------------------------------------------------------
1 | # Site
2 | title:
3 | subtitle:
4 | description:
5 | author:
6 | language:
7 | timezone:
8 |
--------------------------------------------------------------------------------
/website/themes/agency/layout/index.ejs:
--------------------------------------------------------------------------------
1 | <%- page.content %>
2 |
--------------------------------------------------------------------------------
/website/themes/agency/layout/page.ejs:
--------------------------------------------------------------------------------
1 | <%- page.content %>
2 |
--------------------------------------------------------------------------------
/website/themes/agency/layout/tutorial.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | navbar_affixed: true
3 | no_footer: true
4 | ---
5 |
6 |
7 |
8 | <%- page.content %>
9 |
10 |
--------------------------------------------------------------------------------
/website/themes/agency/scripts/helper.js:
--------------------------------------------------------------------------------
1 | hexo.extend.helper.register('page_url', function(path, options) {
2 | return this.url_for(path, options).replace(/index\.html$/, '');
3 | });
4 |
5 | var fs = require('hexo-fs');
6 | hexo.extend.helper.register('fileExists', function(path) {
7 | return fs.existsSync(path);
8 | });
9 |
--------------------------------------------------------------------------------
/website/themes/agency/source/css/download.scss:
--------------------------------------------------------------------------------
1 | .page.download {
2 | h3 {
3 | margin-bottom: 30px;
4 | }
5 |
6 | h4 {
7 | margin-top: 20px;
8 | }
9 |
10 | .highlight table {
11 | table-layout: fixed;
12 | width: 100%;
13 | }
14 |
15 | pre {
16 | border: none;
17 | }
18 |
19 | p {
20 | font-size: 15px;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/website/themes/agency/source/css/example.scss:
--------------------------------------------------------------------------------
1 | @media (min-width: 768px){
2 | html, body {
3 | height: 100%;
4 | width: 100%;
5 | }
6 |
7 | .content-wrapper{
8 | height: 100%;
9 | padding-top: 50px;
10 | }
11 |
12 | .page.example{
13 | height: 100%;
14 |
15 | #map {
16 | width: 100%;
17 | height: 87%;
18 | overflow: hidden;
19 | }
20 |
21 | .about {
22 | padding-top: 10px;
23 | }
24 | }
25 | }
26 |
27 | @media (max-width: 768px) {
28 | .content-wrapper {
29 | padding-top: 50px;
30 | }
31 |
32 | .page.example {
33 | #map{
34 | height: 70vh;
35 | }
36 |
37 | .about {
38 | padding: 25px 0 15px 0;
39 | }
40 | }
41 | }
42 |
43 | .page.example{
44 | .source-screenshot {
45 | margin-top: 2px;
46 | font-size: 13px;
47 | text-align: right;
48 |
49 | .source{
50 | margin-right: 30px;
51 | }
52 |
53 | .screenshot-loading {
54 | display: none;
55 | text-align: center;
56 | }
57 | }
58 |
59 | .screenshot-result img {
60 | width: 100%;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/website/themes/agency/source/css/highlight.css:
--------------------------------------------------------------------------------
1 | pre .comment,
2 | pre .title {
3 | color: #999;
4 | }
5 | pre .variable,
6 | pre .attribute,
7 | pre .tag,
8 | pre .regexp,
9 | pre .ruby .constant,
10 | pre .xml .tag .title,
11 | pre .xml .pi,
12 | pre .xml .doctype,
13 | pre .html .doctype,
14 | pre .css .id,
15 | pre .css .class,
16 | pre .css .pseudo {
17 | color: #f2777a;
18 | }
19 | pre .number,
20 | pre .preprocessor,
21 | pre .built_in,
22 | pre .literal,
23 | pre .params,
24 | pre .constant {
25 | color: #f99157;
26 | }
27 | pre .class,
28 | pre .ruby .class .title,
29 | pre .css .rules .attribute {
30 | color: #9c9;
31 | }
32 | pre .string,
33 | pre .value,
34 | pre .inheritance,
35 | pre .header,
36 | pre .ruby .symbol,
37 | pre .xml .cdata {
38 | color: #9c9;
39 | }
40 | pre .css .hexcolor {
41 | color: #6cc;
42 | }
43 | pre .function,
44 | pre .python .decorator,
45 | pre .python .title,
46 | pre .ruby .function .title,
47 | pre .ruby .title .keyword,
48 | pre .perl .sub,
49 | pre .javascript .title,
50 | pre .coffeescript .title {
51 | color: #69c;
52 | }
53 | pre .keyword,
54 | pre .javascript .function {
55 | color: #c9c;
56 | }
57 |
--------------------------------------------------------------------------------
/website/themes/agency/source/css/logo-zoom.scss:
--------------------------------------------------------------------------------
1 | .navbar-logo {
2 | opacity: 0;
3 | -webkit-transition: opacity 200ms;
4 | -o-transition: opacity 200ms;
5 | transition: opacity 200ms;
6 |
7 | &.zoomin {
8 | opacity: 1;
9 | }
10 | }
11 |
12 | .logo {
13 | -webkit-transition: opacity 200ms;
14 | -o-transition: opacity 200ms;
15 | transition: opacity 200ms;
16 |
17 | &.zoomout {
18 | opacity: 0;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/website/themes/agency/source/css/tutorial.scss:
--------------------------------------------------------------------------------
1 | html, body {
2 | height: 100%;
3 | width: 100%;
4 | }
5 |
6 | .content-wrapper{
7 | height: 100%;
8 | padding-top: 50px;
9 | }
10 |
11 | .page.tutorial{
12 | height: 100%;
13 | }
14 |
15 |
16 | @media (max-width: 768px) {
17 | .content-wrapper {
18 | padding-top: 50px;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/website/themes/agency/source/images/bg_hr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/bg_hr.png
--------------------------------------------------------------------------------
/website/themes/agency/source/images/blacktocat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/blacktocat.png
--------------------------------------------------------------------------------
/website/themes/agency/source/images/icon_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/icon_download.png
--------------------------------------------------------------------------------
/website/themes/agency/source/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/logo.png
--------------------------------------------------------------------------------
/website/themes/agency/source/images/logo_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/logo_128.png
--------------------------------------------------------------------------------
/website/themes/agency/source/images/logo_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/logo_256.png
--------------------------------------------------------------------------------
/website/themes/agency/source/images/logo_transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/logo_transparent.png
--------------------------------------------------------------------------------
/website/themes/agency/source/images/sprite_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/images/sprite_download.png
--------------------------------------------------------------------------------
/website/themes/agency/source/js/agency.js:
--------------------------------------------------------------------------------
1 | // Agency Theme JavaScript
2 |
3 | (function($) {
4 | "use strict"; // Start of use strict
5 |
6 | // Closes the Responsive Menu on Menu Item Click
7 | $('.navbar-collapse ul li a').click(function(){
8 | $('.navbar-toggle:visible').click();
9 | });
10 |
11 | // Offset for Main Navigation
12 | if(!$('#mainNav').hasClass('affix')){
13 | $('#mainNav').affix({
14 | offset: {
15 | top: 100
16 | }
17 | });
18 | }
19 |
20 | })(jQuery); // End of use strict
21 |
--------------------------------------------------------------------------------
/website/themes/agency/source/js/logo-zoom.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | var resumed = false;
3 |
4 | $(window).on("scroll", function () {
5 | var y = $(this).scrollTop();
6 |
7 | if (y > 180 && !resumed) {
8 | resumed = true;
9 | $('.navbar-logo').addClass('zoomin');
10 | $('.logo').addClass('zoomout');
11 | }
12 |
13 | if(y < 180 && resumed){
14 | resumed = false;
15 | $('.navbar-logo').removeClass('zoomin');
16 | $('.logo').removeClass('zoomout');
17 | }
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/font-awesome/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenGeoscience/geojs/978f782b3fa5600bbd54cc5d7b1696f5c4772cb5/website/themes/agency/source/vendor/font-awesome/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/animated.less:
--------------------------------------------------------------------------------
1 | // Animated Icons
2 | // --------------------------
3 |
4 | .@{fa-css-prefix}-spin {
5 | -webkit-animation: fa-spin 2s infinite linear;
6 | animation: fa-spin 2s infinite linear;
7 | }
8 |
9 | .@{fa-css-prefix}-pulse {
10 | -webkit-animation: fa-spin 1s infinite steps(8);
11 | animation: fa-spin 1s infinite steps(8);
12 | }
13 |
14 | @-webkit-keyframes fa-spin {
15 | 0% {
16 | -webkit-transform: rotate(0deg);
17 | transform: rotate(0deg);
18 | }
19 | 100% {
20 | -webkit-transform: rotate(359deg);
21 | transform: rotate(359deg);
22 | }
23 | }
24 |
25 | @keyframes fa-spin {
26 | 0% {
27 | -webkit-transform: rotate(0deg);
28 | transform: rotate(0deg);
29 | }
30 | 100% {
31 | -webkit-transform: rotate(359deg);
32 | transform: rotate(359deg);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/bordered-pulled.less:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em @fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .@{fa-css-prefix}-pull-left { float: left; }
11 | .@{fa-css-prefix}-pull-right { float: right; }
12 |
13 | .@{fa-css-prefix} {
14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; }
15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; }
16 | }
17 |
18 | /* Deprecated as of 4.4.0 */
19 | .pull-right { float: right; }
20 | .pull-left { float: left; }
21 |
22 | .@{fa-css-prefix} {
23 | &.pull-left { margin-right: .3em; }
24 | &.pull-right { margin-left: .3em; }
25 | }
26 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/core.less:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .@{fa-css-prefix} {
5 | display: inline-block;
6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/fixed-width.less:
--------------------------------------------------------------------------------
1 | // Fixed Width Icons
2 | // -------------------------
3 | .@{fa-css-prefix}-fw {
4 | width: (18em / 14);
5 | text-align: center;
6 | }
7 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/font-awesome.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables.less";
7 | @import "mixins.less";
8 | @import "path.less";
9 | @import "core.less";
10 | @import "larger.less";
11 | @import "fixed-width.less";
12 | @import "list.less";
13 | @import "bordered-pulled.less";
14 | @import "animated.less";
15 | @import "rotated-flipped.less";
16 | @import "stacked.less";
17 | @import "icons.less";
18 | @import "screen-reader.less";
19 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/larger.less:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .@{fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .@{fa-css-prefix}-2x { font-size: 2em; }
11 | .@{fa-css-prefix}-3x { font-size: 3em; }
12 | .@{fa-css-prefix}-4x { font-size: 4em; }
13 | .@{fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/list.less:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: @fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .@{fa-css-prefix}-li {
11 | position: absolute;
12 | left: -@fa-li-width;
13 | width: @fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.@{fa-css-prefix}-lg {
17 | left: (-@fa-li-width + (4em / 14));
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/path.less:
--------------------------------------------------------------------------------
1 | /* FONT PATH
2 | * -------------------------- */
3 |
4 | @font-face {
5 | font-family: 'FontAwesome';
6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'),
9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),
11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg');
12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
13 | font-weight: normal;
14 | font-style: normal;
15 | }
16 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/rotated-flipped.less:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); }
5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); }
6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); }
7 |
8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
10 |
11 | // Hook for IE8-9
12 | // -------------------------
13 |
14 | :root .@{fa-css-prefix}-rotate-90,
15 | :root .@{fa-css-prefix}-rotate-180,
16 | :root .@{fa-css-prefix}-rotate-270,
17 | :root .@{fa-css-prefix}-flip-horizontal,
18 | :root .@{fa-css-prefix}-flip-vertical {
19 | filter: none;
20 | }
21 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/screen-reader.less:
--------------------------------------------------------------------------------
1 | // Screen Readers
2 | // -------------------------
3 |
4 | .sr-only { .sr-only(); }
5 | .sr-only-focusable { .sr-only-focusable(); }
6 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/less/stacked.less:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; }
21 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_animated.scss:
--------------------------------------------------------------------------------
1 | // Spinning Icons
2 | // --------------------------
3 |
4 | .#{$fa-css-prefix}-spin {
5 | -webkit-animation: fa-spin 2s infinite linear;
6 | animation: fa-spin 2s infinite linear;
7 | }
8 |
9 | .#{$fa-css-prefix}-pulse {
10 | -webkit-animation: fa-spin 1s infinite steps(8);
11 | animation: fa-spin 1s infinite steps(8);
12 | }
13 |
14 | @-webkit-keyframes fa-spin {
15 | 0% {
16 | -webkit-transform: rotate(0deg);
17 | transform: rotate(0deg);
18 | }
19 | 100% {
20 | -webkit-transform: rotate(359deg);
21 | transform: rotate(359deg);
22 | }
23 | }
24 |
25 | @keyframes fa-spin {
26 | 0% {
27 | -webkit-transform: rotate(0deg);
28 | transform: rotate(0deg);
29 | }
30 | 100% {
31 | -webkit-transform: rotate(359deg);
32 | transform: rotate(359deg);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_bordered-pulled.scss:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em $fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .#{$fa-css-prefix}-pull-left { float: left; }
11 | .#{$fa-css-prefix}-pull-right { float: right; }
12 |
13 | .#{$fa-css-prefix} {
14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; }
15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; }
16 | }
17 |
18 | /* Deprecated as of 4.4.0 */
19 | .pull-right { float: right; }
20 | .pull-left { float: left; }
21 |
22 | .#{$fa-css-prefix} {
23 | &.pull-left { margin-right: .3em; }
24 | &.pull-right { margin-left: .3em; }
25 | }
26 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_core.scss:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix} {
5 | display: inline-block;
6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_fixed-width.scss:
--------------------------------------------------------------------------------
1 | // Fixed Width Icons
2 | // -------------------------
3 | .#{$fa-css-prefix}-fw {
4 | width: (18em / 14);
5 | text-align: center;
6 | }
7 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_larger.scss:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .#{$fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .#{$fa-css-prefix}-2x { font-size: 2em; }
11 | .#{$fa-css-prefix}-3x { font-size: 3em; }
12 | .#{$fa-css-prefix}-4x { font-size: 4em; }
13 | .#{$fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_list.scss:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: $fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .#{$fa-css-prefix}-li {
11 | position: absolute;
12 | left: -$fa-li-width;
13 | width: $fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.#{$fa-css-prefix}-lg {
17 | left: -$fa-li-width + (4em / 14);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_path.scss:
--------------------------------------------------------------------------------
1 | /* FONT PATH
2 | * -------------------------- */
3 |
4 | @font-face {
5 | font-family: 'FontAwesome';
6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),
9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
13 | font-weight: normal;
14 | font-style: normal;
15 | }
16 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_rotated-flipped.scss:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
7 |
8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
10 |
11 | // Hook for IE8-9
12 | // -------------------------
13 |
14 | :root .#{$fa-css-prefix}-rotate-90,
15 | :root .#{$fa-css-prefix}-rotate-180,
16 | :root .#{$fa-css-prefix}-rotate-270,
17 | :root .#{$fa-css-prefix}-flip-horizontal,
18 | :root .#{$fa-css-prefix}-flip-vertical {
19 | filter: none;
20 | }
21 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_screen-reader.scss:
--------------------------------------------------------------------------------
1 | // Screen Readers
2 | // -------------------------
3 |
4 | .sr-only { @include sr-only(); }
5 | .sr-only-focusable { @include sr-only-focusable(); }
6 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/_stacked.scss:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; }
21 |
--------------------------------------------------------------------------------
/website/themes/agency/source/vendor/font-awesome/scss/font-awesome.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables";
7 | @import "mixins";
8 | @import "path";
9 | @import "core";
10 | @import "larger";
11 | @import "fixed-width";
12 | @import "list";
13 | @import "bordered-pulled";
14 | @import "animated";
15 | @import "rotated-flipped";
16 | @import "stacked";
17 | @import "icons";
18 | @import "screen-reader";
19 |
--------------------------------------------------------------------------------