Skip to content

Commit

Permalink
psp-7590 - update moti highway/region layer to internal. Allow for so…
Browse files Browse the repository at this point in the history
…me dev overrides.
  • Loading branch information
devinleighsmith committed Jun 7, 2024
1 parent b5beebe commit 59d7e4c
Show file tree
Hide file tree
Showing 16 changed files with 88 additions and 80 deletions.
4 changes: 2 additions & 2 deletions source/frontend/public/tenants/tenant.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"municipalLayerUrl": "https://openmaps.gov.bc.ca/geo/pub/WHSE_LEGAL_ADMIN_BOUNDARIES.ABMS_MUNICIPALITIES_SP/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_LEGAL_ADMIN_BOUNDARIES.ABMS_MUNICIPALITIES_SP",
"parcelsLayerUrl": "https://openmaps.gov.bc.ca/geo/pub/WHSE_CADASTRE.PMBC_PARCEL_FABRIC_POLY_SVW/wfs?service=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_CADASTRE.PMBC_PARCEL_FABRIC_POLY_SVW",
"regionalLayerUrl": "https://openmaps.gov.bc.ca/geo/pub/WHSE_LEGAL_ADMIN_BOUNDARIES.ABMS_REGIONAL_DISTRICTS_SP/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_LEGAL_ADMIN_BOUNDARIES.ABMS_REGIONAL_DISTRICTS_SP",
"motiRegionLayerUrl": "https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY",
"hwyDistrictLayerUrl": "https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY",
"motiRegionLayerUrl": "https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_REGION_BOUNDARY",
"hwyDistrictLayerUrl": "https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_DISTRICT_BOUNDARY",
"alrLayerUrl": "https://openmaps.gov.bc.ca/geo/pub/WHSE_LEGAL_ADMIN_BOUNDARIES.OATS_ALR_POLYS/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_LEGAL_ADMIN_BOUNDARIES.OATS_ALR_POLYS",
"reservesLayerUrl": "https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.ADM_INDIAN_RESERVES_BANDS_SP/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.ADM_INDIAN_RESERVES_BANDS_SP",
"boundaryLayerUrl": "/ogs-internal/ows?service=wfs&request=GetFeature&typeName=PIMS_PROPERTY_BOUNDARY_VW&outputformat=json&version=2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const useLocationFeatureLoader = () => {

// call these APIs in parallel - notice there is no "await"
const fullyAttributedTask = fullyAttributedServiceFindOne(latLng);
const regionTask = adminBoundaryLayerServiceFindRegion(latLng, 'GEOMETRY');
const districtTask = adminBoundaryLayerServiceFindDistrict(latLng, 'GEOMETRY');
const regionTask = adminBoundaryLayerServiceFindRegion(latLng, 'SHAPE');
const districtTask = adminBoundaryLayerServiceFindDistrict(latLng, 'SHAPE');

const [parcelFeature, regionFeature, districtFeature] = await Promise.all([
fullyAttributedTask,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ export const layersTree: ILayerItem[] = [
maxZoom: MAP_MAX_ZOOM,
},
{
// only works on the vpn
key: 'moti',
label: 'MOTI Regions (multiple colors)',
on: false,
url: 'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY/ows?',
layers: 'pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY',
url: 'https://maps.th.gov.bc.ca/geoV05/ows?',
layers: 'hwy:DSA_REGION_BOUNDARY',
transparent: true,
opacity: 0.9,
format: 'image/png',
Expand All @@ -37,11 +38,12 @@ export const layersTree: ILayerItem[] = [
maxZoom: MAP_MAX_ZOOM,
},
{
// only works on the vpn
key: 'motiHighwayDistricts',
label: 'MOTI Highway Districts (multiple colors)',
on: false,
url: 'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY/ows?',
layers: 'pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY',
url: 'https://maps.th.gov.bc.ca/geoV05/ows?',
layers: 'hwy:DSA_DISTRICT_BOUNDARY',
transparent: true,
opacity: 0.9,
format: 'image/png',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WmsHeaders extends L.TileLayer.WMS {
const url = this.getTileUrl(coords);
const img = document.createElement('img');
const axios = CustomAxios();
axios.get<Blob>(url, { responseType: 'blob' }).then(response => {
axios.get<Blob>(url, { responseType: 'blob', withCredentials: true }).then(response => {
if (response.headers['content-type'] === 'image/png') {
img.src = URL.createObjectURL(response.data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ describe('PropertySelectorSearchContainer component', () => {
);
// calls the region and district layers
expect(mockAxios.history.get[1].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_REGION_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
expect(mockAxios.history.get[2].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_DISTRICT_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
});
});
Expand All @@ -139,10 +139,10 @@ describe('PropertySelectorSearchContainer component', () => {

// calls the region and district layers
expect(mockAxios.history.get[1].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_REGION_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
expect(mockAxios.history.get[2].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_DISTRICT_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
});
});
Expand All @@ -166,10 +166,10 @@ describe('PropertySelectorSearchContainer component', () => {
);
// calls the region and district layers
expect(mockAxios.history.get[1].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_REGION_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
expect(mockAxios.history.get[2].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_DISTRICT_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
});
});
Expand Down Expand Up @@ -200,10 +200,10 @@ describe('PropertySelectorSearchContainer component', () => {

// calls the region and district layers
expect(mockAxios.history.get[1].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_REGION_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
expect(mockAxios.history.get[2].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_DISTRICT_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);

// calls the geocoder nearest api to retrieve address
Expand Down Expand Up @@ -244,10 +244,10 @@ describe('PropertySelectorSearchContainer component', () => {
);
// calls the region and district layers
expect(mockAxios.history.get[3].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_REGION_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
expect(mockAxios.history.get[4].url).toBe(
'https://openmaps.gov.bc.ca/geo/pub/WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=pub:WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(GEOMETRY,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
'https://maps.th.gov.bc.ca/geoV05/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.3.0&outputFormat=application/json&typeNames=hwy:DSA_DISTRICT_BOUNDARY&srsName=EPSG:4326&count=1&cql_filter=CONTAINS(SHAPE,SRID=4326;POINT ( -123.46163749999998 48.76613749999999))',
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ async function matchRegionAndDistrict(
};

// call these APIs in parallel - notice there is no "await"
const regionTask = regionSearch(latLng, 'GEOMETRY');
const districtTask = districtSearch(latLng, 'GEOMETRY');
const regionTask = regionSearch(latLng, 'SHAPE');
const districtTask = districtSearch(latLng, 'SHAPE');

const regionFeature = await regionTask;
const districtFeature = await districtTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export const useQueryMapLayersByLocation = () => {
try {
// We are using spatial reference = 3005 (BC Albers) here because that's how the backend is returning spatial location
const alrFeature = await findOneAgriculturalReserve(location, 'GEOMETRY', 3005);
const motiRegionFeature = await findRegion(location, 'GEOMETRY', 3005);
const highwaysDistrictFeature = await findDistrict(location, 'GEOMETRY', 3005);
const motiRegionFeature = await findRegion(location, 'SHAPE', 3005);
const highwaysDistrictFeature = await findDistrict(location, 'SHAPE', 3005);
const electoralDistrictFeature = await findElectoralDistrict(location);
const firstNationsFeature = await findOnefirstNation(location, 'GEOMETRY', 3005);

Expand Down
26 changes: 7 additions & 19 deletions source/frontend/src/mocks/districtLayerResponse.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,29 @@ export const mockDistrictLayerResponse = {
features: [
{
type: 'Feature',
id: 'WHSE_ADMIN_BOUNDARIES.TADM_MOT_DISTRICT_BNDRY_POLY.2',
id: 'DSA_DISTRICT_BOUNDARY.2',
geometry: {
type: 'Polygon',
coordinates: [
[
[-122.64209928, 49.10436194],
[-122.64211348, 49.10396936],
[-122.64085839, 49.10394959],
[-122.64083912, 49.10447851],
[-122.64201075, 49.10449689],
[-122.64201384, 49.10441544],
[-122.64209928, 49.10436194],
],
],
coordinates: [],
},
geometry_name: 'GEOMETRY',
geometry_name: 'SHAPE',
properties: {
OBJECTID: 2,
DISTRICT_NUMBER: 2,
DISTRICT_NAME: 'Vancouver Island',
FEATURE_CODE: null,
OBJECTID: 30215,
SE_ANNO_CAD_DATA: null,
FEATURE_AREA_SQM: 65831400828.9239,
FEATURE_LENGTH_M: 1340187.9529,
},
bbox: [-129.43013603, 48.22452676, -123.00728678, 51.00005479],
},
],
totalFeatures: 1,
numberMatched: 1,
numberReturned: 1,
timeStamp: '2022-06-16T22:38:59.099Z',
timeStamp: '2024-05-31T23:46:24.270Z',
crs: {
type: 'name',
properties: {
name: 'urn:ogc:def:crs:EPSG::4326',
},
},
bbox: [-129.43013603, 48.22452676, -123.00728678, 51.00005479],
};
31 changes: 31 additions & 0 deletions source/frontend/src/mocks/motiHwyRegion.mock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export const getMockMotiHwy = () => ({
type: 'FeatureCollection',
features: [
{
type: 'Feature',
id: 'DSA_REGION_BOUNDARY.1',
geometry: {
type: 'Polygon',
coordinates: [[]],
},
geometry_name: 'SHAPE',
properties: {
OBJECTID: 1,
REGION_NUMBER: 1,
REGION_NAME: 'South Coast',
},
bbox: [-129.43013603, 48.22452676, -120.49999404, 52.00000245],
},
],
totalFeatures: 1,
numberMatched: 1,
numberReturned: 1,
timeStamp: '2024-05-31T23:46:24.229Z',
crs: {
type: 'name',
properties: {
name: 'urn:ogc:def:crs:EPSG::4326',
},
},
bbox: [-129.43013603, 48.22452676, -120.49999404, 52.00000245],
});
26 changes: 7 additions & 19 deletions source/frontend/src/mocks/motiRegionLayerResponse.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,29 @@ export const mockMotiRegionLayerResponse = {
features: [
{
type: 'Feature',
id: 'WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY.1',
id: 'DSA_REGION_BOUNDARY.1',
geometry: {
type: 'Polygon',
coordinates: [
[
[-122.64209928, 49.10436194],
[-122.64211348, 49.10396936],
[-122.64085839, 49.10394959],
[-122.64083912, 49.10447851],
[-122.64201075, 49.10449689],
[-122.64201384, 49.10441544],
[-122.64209928, 49.10436194],
],
],
coordinates: [[]],
},
geometry_name: 'GEOMETRY',
geometry_name: 'SHAPE',
properties: {
OBJECTID: 1,
REGION_NUMBER: 1,
FEATURE_CODE: null,
REGION_NAME: 'South Coast',
OBJECTID: 12270,
SE_ANNO_CAD_DATA: null,
FEATURE_AREA_SQM: 151439012177.005,
FEATURE_LENGTH_M: 2098978.5042,
},
bbox: [-129.43013603, 48.22452676, -120.49999404, 52.00000245],
},
],
totalFeatures: 1,
numberMatched: 1,
numberReturned: 1,
timeStamp: '2022-06-16T22:38:59.141Z',
timeStamp: '2024-05-31T23:46:24.229Z',
crs: {
type: 'name',
properties: {
name: 'urn:ogc:def:crs:EPSG::4326',
},
},
bbox: [-129.43013603, 48.22452676, -120.49999404, 52.00000245],
};
11 changes: 11 additions & 0 deletions source/frontend/src/mocks/msw/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {
getMockValues,
} from '@/mocks/bcAssessment.mock';

import { mockDistrictLayerResponse } from '../districtLayerResponse.mock';
import { mockMotiRegionLayerResponse } from '../index.mock';

export const handlers = [
http.get('https://delivery.apps.gov.bc.ca/ext/sgw/geo.bca', ({ request }) => {
const search = new URL(request.url).search;
Expand All @@ -26,4 +29,12 @@ export const handlers = [
return HttpResponse.json(getMockLandChars(), { status: 200 });
}
}),
http.get('https://maps.th.gov.bc.ca/geoV05', ({ request }) => {
const search = new URL(request.url).search;
if (search.includes('hwy:DSA_REGION_BOUNDARY')) {
return HttpResponse.json(mockMotiRegionLayerResponse, { status: 200 });
} else if (search.includes('hwy:DSA_DISTRICT_BOUNDARY')) {
return HttpResponse.json(mockDistrictLayerResponse, { status: 200 });
}
}),
];
4 changes: 0 additions & 4 deletions source/frontend/src/models/layers/motDistrictBoundary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
export interface MOT_DistrictBoundary_Feature_Properties {
readonly DISTRICT_NUMBER: number | null;
readonly DISTRICT_NAME: string | null;
readonly FEATURE_CODE: string | null;
readonly OBJECTID: number | null;
readonly SE_ANNO_CAD_DATA: Blob | null;
readonly FEATURE_AREA_SQM: number | null;
readonly FEATURE_LENGTH_M: number | null;
}
8 changes: 0 additions & 8 deletions source/frontend/src/models/layers/motRegionalBoundary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@
// Api: WHSE_ADMIN_BOUNDARIES.TADM_MOT_REGIONAL_BNDRY_POLY
export interface MOT_RegionalBoundary_Feature_Properties {
readonly REGION_NUMBER: number | null;
readonly FEATURE_CODE: string | null;
readonly REGION_NAME: string | null;
readonly OBJECTID: number | null;
readonly SE_ANNO_CAD_DATA: Blob | null;
readonly FEATURE_AREA_SQM: number | null;
readonly FEATURE_LENGTH_M: number | null;
}

export const emptyRegion: MOT_RegionalBoundary_Feature_Properties = {
REGION_NUMBER: null,
FEATURE_CODE: null,
REGION_NAME: null,
OBJECTID: null,
SE_ANNO_CAD_DATA: null,
FEATURE_AREA_SQM: null,
FEATURE_LENGTH_M: null,
};
Loading

0 comments on commit 59d7e4c

Please sign in to comment.