diff --git a/base/static/base/script/map.js b/base/static/base/script/map.js index f0b29ff..273f43a 100644 --- a/base/static/base/script/map.js +++ b/base/static/base/script/map.js @@ -21,7 +21,7 @@ function initMap(id, type) { var tMl = new ol.layer.Tile({ title: "天地图路网", source: new ol.source.XYZ({ - url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}" + url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b" }) }); map.addLayer(tMl); @@ -30,7 +30,7 @@ function initMap(id, type) { var tAL = new ol.layer.Tile({ title: "天地图文字标注", source: new ol.source.XYZ({ - url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}' + url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b' }) }); map.addLayer(tAL); diff --git a/graphics/static/graphics/script/map.js b/graphics/static/graphics/script/map.js index 40a0cfe..3e53bec 100644 --- a/graphics/static/graphics/script/map.js +++ b/graphics/static/graphics/script/map.js @@ -274,7 +274,7 @@ var initTianDiTuMapLayer = function (map) { var tMl = new ol.layer.Tile({ title: "天地图路网", source: new ol.source.XYZ({ - url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}" + url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b" }) }); map.addLayer(tMl); @@ -287,7 +287,7 @@ var initTianDiTuSatelliteLayer = function (map) { visible: false, title: "天地图卫星影像", source: new ol.source.XYZ({ - url: 'http://t0.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}' + url: 'http://t0.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b' }) }); map.addLayer(tSL); @@ -299,7 +299,7 @@ var initTianDiTuAnnotationLayer = function (map) { var tAL = new ol.layer.Tile({ title: "天地图文字标注", source: new ol.source.XYZ({ - url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}' + url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b' }) }); map.addLayer(tAL); diff --git a/graphics/templates/graphics/openlayers.html b/graphics/templates/graphics/openlayers.html index 0a2ac9a..a41ecb3 100644 --- a/graphics/templates/graphics/openlayers.html +++ b/graphics/templates/graphics/openlayers.html @@ -124,7 +124,7 @@ title: "天地图路网", source: new ol.source.XYZ({ - url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}" + url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b" }), }); @@ -134,7 +134,7 @@ var tian_di_tu_annotation = new ol.layer.Tile({ title: "天地图文字标注", source: new ol.source.XYZ({ - url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}' + url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b' }) }); @@ -150,7 +150,7 @@ var tian_di_tu_satellite_layer = new ol.layer.Tile({ title: "天地图卫星影像", source: new ol.source.XYZ({ - url: 'http://t0.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}' + url: 'http://t0.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b' }) }); diff --git a/metadata/models.py b/metadata/models.py index 1aa6a24..d97cca3 100644 --- a/metadata/models.py +++ b/metadata/models.py @@ -202,7 +202,7 @@ class LineItem(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) quantity = models.IntegerField(default=0) cart = models.ForeignKey(Cart, null=True) - metadata = models.ForeignKey(Metadata, on_delete=models.SET_NULL) + metadata = models.ForeignKey(Metadata, on_delete=models.CASCADE) order = models.ForeignKey(Order, null=True) diff --git a/metadata/static/metadata/script/map.js b/metadata/static/metadata/script/map.js index 57a8ee3..c9ebe65 100644 --- a/metadata/static/metadata/script/map.js +++ b/metadata/static/metadata/script/map.js @@ -20,7 +20,7 @@ function initMap() { var tMl = new ol.layer.Tile({ title: "天地图路网", source: new ol.source.XYZ({ - url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}" + url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b" }) }); map.addLayer(tMl); @@ -29,7 +29,7 @@ function initMap() { var tAL = new ol.layer.Tile({ title: "天地图文字标注", source: new ol.source.XYZ({ - url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}' + url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b' }) }); map.addLayer(tAL); diff --git a/metadata/templates/metadata/detail.html b/metadata/templates/metadata/detail.html index 8a9b0c7..fa25100 100644 --- a/metadata/templates/metadata/detail.html +++ b/metadata/templates/metadata/detail.html @@ -245,7 +245,7 @@ title: "天地图路网", source: new ol.source.XYZ({ - url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}" + url: "http://t4.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b" }), }); @@ -255,7 +255,7 @@ var tian_di_tu_annotation = new ol.layer.Tile({ title: "天地图文字标注", source: new ol.source.XYZ({ - url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}' + url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=16d2779796f67de83223d5d3ec42d34b' }) });