Fix bugs in map preview introduced by upgrading d3 deps; drop live examples (not maintained)

This commit is contained in:
Brendan C. Ward 2020-02-12 13:23:40 -08:00
parent d6c3465ca0
commit de40ed94a2
7 changed files with 160 additions and 355 deletions

View File

@ -318,15 +318,6 @@ This should be sufficient for use with online platforms such as [Data Basin](htt
This API is not intended for use with more full-featured ArcGIS applications such as ArcGIS Desktop.
## Live Examples
These are hosted on a free dyno by Heroku (thanks Heroku!), so there might be a small delay when you first access these.
- [List of services](http://frozen-island-41032.herokuapp.com/services)
- [TileJSON](http://frozen-island-41032.herokuapp.com/services/geography-class-png) for a PNG based tileset generated using TileMill.
- [Map Preview ](http://frozen-island-41032.herokuapp.com/services/geography-class-png/map) for a map preview of the above.
- [ArcGIS Map Service](http://frozen-island-41032.herokuapp.com/arcgis/rest/services/geography-class-png/MapServer)
## Request authorization
Providing a secret key with `-s/--secret-key` or by setting the `HMAC_SECRET_KEY` environment variable will

File diff suppressed because one or more lines are too long

View File

@ -92,7 +92,7 @@
var map = L.map("Map", {});
var layer = null;
d3.json("./", function(tileJSON) {
d3.json("./").then(function(tileJSON) {
if (tileJSON.bounds) {
var b = tileJSON.bounds;

File diff suppressed because one or more lines are too long

View File

@ -1,40 +1,35 @@
var gulp = require('gulp');
var strip = require('gulp-strip-comments');
var cleanCSS = require('gulp-clean-css');
var concat = require('gulp-concat');
var gulp = require("gulp");
var strip = require("gulp-strip-comments");
var cleanCSS = require("gulp-clean-css");
var concat = require("gulp-concat");
gulp.task('compress-css', function () {
gulp.task("compress-css", function() {
gulp.src([
'node_modules/leaflet/dist/leaflet.css',
'node_modules/leaflet-zoombox/L.Control.ZoomBox.css',
'node_modules/leaflet-basemaps/L.Control.Basemaps.css',
'node_modules/leaflet-range/L.Control.Range.css',
'node_modules/leaflet-base64-legend/L.Control.Base64Legend.css'
"node_modules/leaflet/dist/leaflet.css",
"node_modules/leaflet-zoombox/L.Control.ZoomBox.css",
"node_modules/leaflet-basemaps/L.Control.Basemaps.css",
"node_modules/leaflet-range/L.Control.Range.css",
"node_modules/leaflet-base64-legend/L.Control.Base64Legend.css"
])
.pipe(cleanCSS())
.pipe(concat('core.min.css'))
.pipe(gulp.dest('dist'))
.pipe(concat("core.min.css"))
.pipe(gulp.dest("dist"));
});
gulp.task('concat-js', function () {
gulp.task("concat-js", function() {
gulp.src([
'node_modules/d3-collection/build/d3-collection.min.js',
'node_modules/d3-dispatch/build/d3-dispatch.min.js',
'node_modules/d3-request/build/d3-request.min.js',
'node_modules/leaflet/dist/leaflet.js',
'node_modules/leaflet-zoombox/L.Control.ZoomBox.min.js',
'node_modules/leaflet-basemaps/L.Control.Basemaps-min.js',
'node_modules/leaflet-range/L.Control.Range-min.js',
'node_modules/leaflet-base64-legend/L.Control.Base64Legend-min.js',
'node_modules/leaflet-utfgrid/L.UTFGrid-min.js'
"node_modules/d3-collection/build/d3-collection.min.js",
"node_modules/d3-fetch/dist/d3-fetch.min.js",
"node_modules/leaflet/dist/leaflet.js",
"node_modules/leaflet-zoombox/L.Control.ZoomBox.min.js",
"node_modules/leaflet-basemaps/L.Control.Basemaps-min.js",
"node_modules/leaflet-range/L.Control.Range-min.js",
"node_modules/leaflet-base64-legend/L.Control.Base64Legend-min.js",
"node_modules/leaflet-utfgrid/L.UTFGrid-min.js"
])
.pipe(strip())
.pipe(concat('core.min.js'))
.pipe(gulp.dest('dist'))
.pipe(concat("core.min.js"))
.pipe(gulp.dest("dist"));
});
gulp.task('build', ['concat-js', 'compress-css'], function () {});
gulp.task("build", ["concat-js", "compress-css"], function() {});

View File

@ -1,6 +1,6 @@
{
"name": "mbtileserver",
"version": "0.2.0",
"version": "0.5.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -472,11 +472,6 @@
"resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.7.tgz",
"integrity": "sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A=="
},
"d3-dispatch": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.6.tgz",
"integrity": "sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA=="
},
"d3-dsv": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.2.0.tgz",
@ -487,15 +482,12 @@
"rw": "1"
}
},
"d3-request": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/d3-request/-/d3-request-1.0.6.tgz",
"integrity": "sha512-FJj8ySY6GYuAJHZMaCQ83xEYE4KbkPkmxZ3Hu6zA1xxG2GD+z6P+Lyp+zjdsHf0xEbp2xcluDI50rCS855EQ6w==",
"d3-fetch": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-1.1.2.tgz",
"integrity": "sha512-S2loaQCV/ZeyTyIF2oP8D1K9Z4QizUzW7cWeAOAS4U88qOt3Ucf6GsmgthuYSdyB2HyEm4CeGvkQxWsmInsIVA==",
"requires": {
"d3-collection": "1",
"d3-dispatch": "1",
"d3-dsv": "1",
"xmlhttprequest": "1"
"d3-dsv": "1"
}
},
"dateformat": {
@ -3047,11 +3039,6 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"xmlhttprequest": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
"integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw="
},
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",

View File

@ -27,8 +27,7 @@
},
"dependencies": {
"d3-collection": "^1.0.4",
"d3-dispatch": "^1.0.3",
"d3-request": "^1.0.5",
"d3-fetch": "^1.1.2",
"leaflet": "^1.1.0",
"leaflet-base64-legend": "^0.1.1",
"leaflet-basemaps": "^0.2.0",