Skip to content

Commit fb841df

Browse files
Hardcode URL test
1 parent aa6c8b6 commit fb841df

File tree

4 files changed

+38
-58
lines changed

4 files changed

+38
-58
lines changed

application/settings.py

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class Settings(BaseSettings):
1616
RELEASE_TAG: Optional[str] = None
1717
ENVIRONMENT: str
1818
DATASETTE_URL: HttpUrl
19-
DATASETTE_TILES_URL: Optional[HttpUrl] = "https://www.development.digital-land.info"
2019
DATA_FILE_URL: HttpUrl
2120
GA_MEASUREMENT_ID: Optional[str] = None
2221
OS_CLIENT_KEY: Optional[str] = None

application/templates/components/map/macro.jinja

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353
params = {
5454
...params,
5555
baseTileStyleFilePath: "/static/javascripts/base-tile.json",
56-
vectorSource: "{{ params.DATASETTE_TILES_URL }}/tiles/{z}/{x}/{y}.vector.pbf",
57-
datasetVectorUrl: "{{ params.DATASETTE_TILES_URL }}/tiles/",
56+
vectorSource: "https://www.development.digital-land.info/tiles/{z}/{x}/{y}.vector.pbf",
57+
datasetVectorUrl: "https://www.development.digital-land.info/tiles/",
5858
datasets: {{layers|tojson}}.map(d => d.dataset),
5959
vectorTileSources: {{layers|tojson}}.map(d => {
6060
d.paint_options = d.paint_options || {};
6161
return {
6262
name: d.dataset,
63-
vectorSource: "{{ params.DATASETTE_TILES_URL }}/tiles/" + d.dataset + "/{z}/{x}/{y}.vector.pbf",
63+
vectorSource: "https://www.development.digital-land.info/tiles/" + d.dataset + "/{z}/{x}/{y}.vector.pbf",
6464
dataType: d.paint_options.type,
6565
styleProps: {
6666
colour: d.paint_options.colour,
+34-53
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,39 @@
1-
{% extends "layouts/layout--full-width.html" %}
2-
{% set templateName = "dl-info/national-map.html" %}
3-
4-
{%- from "components/map/macro.jinja" import map %}
5-
6-
{% set containerClasses = 'dl-container--full-width' %}
7-
{% set fullWidthHeader = true %}
8-
9-
{% set includesMap = true %}
10-
{% block pageTitle %}Map of planning data for England | Planning Data{% endblock %}
11-
12-
{%
13-
set notePanel = '<p>Find, understand and download the <a href="/dataset" class="govuk-link">datasets used to create this map</a>.</p>'
14-
%}
15-
16-
{%- block mapAssets %}
17-
<script src='/static/javascripts/maplibre-gl.js'></script>
18-
<link href='/static/stylesheets/maplibre-gl.css' rel='stylesheet' />
19-
{{ super() }}
20-
{% endblock -%}
21-
22-
{%- from "components/back-button/macro.jinja" import dlBackButton %}
23-
{% block breadcrumbs%}
24-
{{ dlBackButton({
25-
"parentHref": '/'
26-
})}}
27-
{% endblock %}
28-
29-
{% block content %}
30-
<div class="govuk-grid-row">
31-
<div class="govuk-grid-column-full">
32-
<h1 class="govuk-heading-xl govuk-!-margin-bottom-4">Map of planning data for England</h1>
33-
</div>
1+
{% extends "layouts/layout--full-width.html" %} {% set templateName =
2+
"dl-info/national-map.html" %} {%- from "components/map/macro.jinja" import map
3+
%} {% set containerClasses = 'dl-container--full-width' %} {% set
4+
fullWidthHeader = true %} {% set includesMap = true %} {% block pageTitle %}Map
5+
of planning data for England | Planning Data{% endblock %} {% set notePanel = '
6+
<p>
7+
Find, understand and download the
8+
<a href="/dataset" class="govuk-link">datasets used to create this map</a>.
9+
</p>
10+
' %} {%- block mapAssets %}
11+
<script src="/static/javascripts/maplibre-gl.js"></script>
12+
<link href="/static/stylesheets/maplibre-gl.css" rel="stylesheet" />
13+
{{ super() }} {% endblock -%} {%- from "components/back-button/macro.jinja"
14+
import dlBackButton %} {% block breadcrumbs%} {{ dlBackButton({ "parentHref":
15+
'/' })}} {% endblock %} {% block content %}
16+
<div class="govuk-grid-row">
17+
<div class="govuk-grid-column-full">
18+
<h1 class="govuk-heading-xl govuk-!-margin-bottom-4">
19+
Map of planning data for England
20+
</h1>
3421
</div>
22+
</div>
3523

36-
<p id="aria-label-national-map" class="govuk-body-l">See the data we've collected and collated on a map.</p>
37-
38-
{{
39-
map({
40-
'height': 700,
41-
'layers': layers,
42-
'DATASETTE_TILES_URL': settings.DATASETTE_TILES_URL,
43-
'notePanel': notePanel,
44-
'enableZoomControls': true,
45-
'enableLayerControls': true,
46-
'enableZoomCounter': true,
47-
})
48-
}}
49-
50-
<p class="govuk-body govuk-!-margin-bottom-0 govuk-!-width-two-thirds">This prototype map is automatically created using data from planning.data.gov.uk. Find out more <a href="/about">about the Planning Data Platform</a></p>
51-
52-
{% endblock %}
24+
<p id="aria-label-national-map" class="govuk-body-l">
25+
See the data we've collected and collated on a map.
26+
</p>
5327

54-
{% block bodyEnd %}
55-
{{ super() }}
28+
{{ map({ 'height': 700, 'layers': layers, 'DATASETTE_TILES_URL':
29+
"https://www.development.digital-land.info", 'notePanel': notePanel,
30+
'enableZoomControls': true, 'enableLayerControls': true, 'enableZoomCounter':
31+
true, }) }}
5632

33+
<p class="govuk-body govuk-!-margin-bottom-0 govuk-!-width-two-thirds">
34+
This prototype map is automatically created using data from
35+
planning.data.gov.uk. Find out more
36+
<a href="/about">about the Planning Data Platform</a>
37+
</p>
5738

58-
{% endblock %}
39+
{% endblock %} {% block bodyEnd %} {{ super() }} {% endblock %}

assets/javascripts/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import MapController from "./MapController.js";
22

33
export const newMapController = (params = { layers: [] }) => {
4-
const datasetUrl = params.DATASETTE_TILES_URL || "";
4+
const datasetUrl = "https://www.development.digital-land.info";
55

66
let mapParams = {
77
...params,

0 commit comments

Comments
 (0)