Closed ghost closed 3 years ago
Although it's possible the map preview isn't supposed to work for the example record, as that record relies on the order filler interface, I can see that the issue described above occurs whenever an invalid lat,lon,zoom triplet is provided through the smk-center parameter of the preview page.
Updating the code so as to not pass values which will trigger the above error is a simple path forward, but with the status quo it's possible that preview windows will in many cases load a regular blank map with no extra layers, so I'd like to investigate further to get a better understanding of the problem and alternate solutions.
Per conversation offline, proceeding with a fix to simply remove the error message. Logic to enable/disable the preview button depending on whether a preview is available is TBD via another ticket post MVP.
With the way the preview button is engineered currently, logic to disable it where it is not applicable is relatively straightforward to implement, at least in the majority of cases. I've written some code to accomplish this and can send it through to code review if the team is amenable.
Annika/Joe to follow up on logic
We've decided to move this forward but will revisit whether some preview windows are hidden that shouldn't be at the UAT stage.
Feature to disable the preview button for records it doesn't apply for is ready for code and UAT review.
The latest changes haven't been merged to toyger yet.
Testing - Resource Data Type = arcgis_rest
Testing - Resource Data Type = csv
Testing - Resource Data Type = e00 (mapped to Other)
Testing - Resource Data Type = fgdb (mapped to Other)
Testing - Resource Data Type = geojson
Testing - Resource Data Type = html
Testing - Resource Data Type = json
Testing - Resource Data Type = kml
Testing - Resource Data Type = kmz
Testing - Resource Data Type = Multiple
Testing - Resource Data Type = openapi-json
Testing - Resource Data Type = other
Testing - Resource Data Type = pdf
Testing - Resource Data Type = shp
Testing - Resource Data Type = txt
Testing - Resource Data Types = wms
Testing - Resource Data Type = xls
Testing - Resource Data Type = xlsx
Testing - Resource Data Type = xml
Testing - Resource Data Type = zip
Action thoughts:
Please note that QA was undertaken before code changes were pushed through to toyger so while there may be useful information about errors overlooked before this is not a review of recent work completed.
This has been migrated to toyger but you may need to clear your browsers cache or hold shift and click reload to get the changes to show up.
Not logged in to do this testing.
Resource Data Type = _arcgisrest (Geographic Data) Dataset: https://toyger.data.gov.bc.ca/dataset/stand-level-biodiversity-frep-data-sampling-up-to-2019- Resource: https://toyger.data.gov.bc.ca/dataset/stand-level-biodiversity-frep-data-sampling-up-to-2019-/resource/060981fa-33bc-4383-b598-d844e205023e _[Preview]_button enabled Results:
Resource Data Type = csv Dataset: https://toyger.data.gov.bc.ca/dataset/hunter-sample-moose-survey-estimates-1976-to-current Resource: https://toyger.data.gov.bc.ca/dataset/hunter-sample-moose-survey-estimates-1976-to-current/resource/fdec42f4-4883-43f4-95af-8a8fcb4ba504 _[Preview]_button disabled Results:
Resource Data Type = e00 (mapped to other) Dataset: https://toyger.data.gov.bc.ca/dataset/bc-canadian-aquatic-biomonitoring-network-cabin-sites-and-models-web-app Resource: https://toyger.data.gov.bc.ca/dataset/bc-canadian-aquatic-biomonitoring-network-cabin-sites-and-models-web-app/resource/151c7801-a738-48bf-8fce-c9106d694575 [Preview] button disabled Results: as expected
Resource Data Type = fgdb (mapped to other) Dataset: https://toyger.data.gov.bc.ca/dataset/internet-connectivity-in-relation-to-b-c-health-geographies-map Resource: https://toyger.data.gov.bc.ca/dataset/internet-connectivity-in-relation-to-b-c-health-geographies-map/resource/ca6b7e94-c9d6-4654-9cf9-b26bce39ec37 [Preview] button disabled Results: as expected
Resource Data Type = geojson Dataset: https://toyger.data.gov.bc.ca/dataset/translink-major-road-network Resource: https://toyger.data.gov.bc.ca/dataset/translink-major-road-network/resource/f2cbf48b-3217-4dd3-a2b1-97709467cee0 [Preview] button enabled Results:
Resource Data Type = geojson Dataset: https://toyger.data.gov.bc.ca/dataset/translink-major-road-network Resource: https://toyger.data.gov.bc.ca/dataset/translink-major-road-network/resource/f2cbf48b-3217-4dd3-a2b1-97709467cee0 [Preview] button enabled Results:
Resource Data Type = html Dataset: https://toyger.data.gov.bc.ca/dataset/forest-inventory-ground-sample-data-and-interactive-map Resource: https://toyger.data.gov.bc.ca/dataset/forest-inventory-ground-sample-data-and-interactive-map/resource/9af955f4-83ba-4b26-a6c5-e9f8dcaec147 [Preview] button disabled Results: as expected
Resource Data Type = json Dataset: https://toyger.data.gov.bc.ca/dataset/howe-sound-cumulative-effects-project-area-data-howe-sound-cumulative-effects Resource: https://toyger.data.gov.bc.ca/dataset/howe-sound-cumulative-effects-project-area-data-howe-sound-cumulative-effects/resource/8eca5485-8f58-4665-94fd-52ba5d0959de [Preview] button disabled Results: as expected
Resource Data Type = kml Dataset: https://toyger.data.gov.bc.ca/dataset/natural-disturbance-type-map Resource: https://toyger.data.gov.bc.ca/dataset/natural-disturbance-type-map/resource/263926a8-c3db-4480-ac90-b52067f9e42e [Preview] button enabled Results:
Resource Data Type = kmz Dataset: https://toyger.data.gov.bc.ca/dataset/meteorological-monitoring-sites Resource: https://toyger.data.gov.bc.ca/dataset/meteorological-monitoring-sites/resource/a2085229-e5f5-4c21-a5ec-dcf4867b6e02 [Preview] button enabled Results:
Resource Data Type = mulitple (Geographic Data) Dataset: https://toyger.data.gov.bc.ca/dataset/archaeology-known-sites Resource: https://toyger.data.gov.bc.ca/dataset/archaeology-known-sites/resource/548bc387-0726-4036-bf09-f0cb067e0774 [Preview] button enabled Results:
QUESTION: Should [Preview] button be disabled for this Resource Data Type? (@TerryLanktree , @annikaLiving , @joe-taylor , @adodge-bcg )
Resource Data Type = openapi-json Dataset: https://toyger.data.gov.bc.ca/dataset/common-document-generation-service-api Resource: https://toyger.data.gov.bc.ca/dataset/common-document-generation-service-api/resource/3ab4504d-7647-427a-9f0d-7c1f75b6da90 [Preview] button disabled Results: as expected
Resource Data Type = other (Application) Dataset: https://toyger.data.gov.bc.ca/dataset/muskwa-kechika-report-to-the-premier-and-public-of-bc-web-viewer-2018 Resource: https://toyger.data.gov.bc.ca/dataset/muskwa-kechika-report-to-the-premier-and-public-of-bc-web-viewer-2018/resource/4f12e518-5127-4a2d-9f55-a1b545019bf0 [Preview] button disabled Results: as expected
Resource Data Type = other (Geographic Data) Dataset: https://toyger.data.gov.bc.ca/dataset/census-profile-key-facts-for-bc-census-divisions-2016-census Resource: https://toyger.data.gov.bc.ca/dataset/census-profile-key-facts-for-bc-census-divisions-2016-census/resource/765dbbf3-5c30-4b45-9ab3-90d503f15c6b [Preview] button enabled Results:
Resource Data Type = pdf Dataset: https://toyger.data.gov.bc.ca/dataset/graduation-assessments Resource: https://toyger.data.gov.bc.ca/dataset/graduation-assessments/resource/be0e7d05-11ba-4883-a57a-900a0c3ed5e6 [Preview] button disabled Results: as expected
Resource Data Type = shp Dataset: https://toyger.data.gov.bc.ca/dataset/hexagonal-polygon-grid-resolution-4096-hectare-cell Resource: https://toyger.data.gov.bc.ca/dataset/hexagonal-polygon-grid-resolution-4096-hectare-cell/resource/5b3cd331-7b22-47b0-9397-57833b33941d [Preview] button enabled Results:
QUESTION: When I filtered by shp, the result set looks confusing. I am seeing more than that type returned. I also noticed that there is no way for me to provide the link to the result set like I can in Production. I will add this an enhancement. (@TerryLanktree , @annikaLiving , @joe-taylor , @adodge-bcg )
Resource Data Type = txt (Geographic Data) Dataset: https://toyger.data.gov.bc.ca/dataset/urgent-and-primary-care-centres Resource: https://toyger.data.gov.bc.ca/dataset/urgent-and-primary-care-centres/resource/5c1bd7aa-48f1-403a-aa6d-aae08e971d33 [Preview] button enabled Results:
QUESTION: Is this correct? Could be a data migration issue. Why would a txt resource Geographic Data resource and not a Tabular Data. (@TerryLanktree , @annikaLiving , @joe-taylor , @adodge-bcg )
Resource Data Type = wms (Webservice/API) Dataset: https://toyger.data.gov.bc.ca/dataset/natural-disturbance-type-map Resource: https://toyger.data.gov.bc.ca/dataset/natural-disturbance-type-map/resource/3a61e42c-18dc-4bcb-977d-479a9e5e945a [Preview] button enabled Results:
Resource Data Type = xls Dataset: https://toyger.data.gov.bc.ca/dataset/bc-finance-budget-2019 Resource: https://toyger.data.gov.bc.ca/dataset/bc-finance-budget-2019/resource/974e8efe-e786-4079-aab3-ba426a3383a2 [Preview] button disabled Results: as expected
Resource Data Type = xlsx Dataset: https://toyger.data.gov.bc.ca/dataset/bc-finance-budget-2019 Resource: https://toyger.data.gov.bc.ca/dataset/bc-finance-budget-2019/resource/687a51ff-5b62-4f33-b895-f1202759f741 [Preview] button disabled Results: as expected
Resource Data Type = xml (Geographic Data) Dataset: https://toyger.data.gov.bc.ca/dataset/bedrock-geology Resource: https://toyger.data.gov.bc.ca/dataset/bedrock-geology/resource/31f6fbb1-fa5c-477e-b252-0ddfe4201f3f [Preview] button enabled Results:
Resource Data Type = zip (Geographic Data) Dataset: https://toyger.data.gov.bc.ca/dataset/province-of-british-columbia-boundary-terrestrial Resource: https://toyger.data.gov.bc.ca/dataset/province-of-british-columbia-boundary-terrestrial/resource/3d72cf36-ab53-4a2a-9988-a883d7488384 [Preview] button enabled Results:
Testing in https://beta-catalogue.data.gov.bc.ca/datasets
Resource Data Type =arcgis_rest Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/bc-drought-levels-time-lapse-2020 Resource: https://beta-catalogue.data.gov.bc.ca/dataset/bc-drought-levels-time-lapse-2020/resource/4c6662f8-5497-46d4-9fe0-a7306ca0d76d [Preview] button enabled Results: as expected
Resource Data Type = csv Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/bc-public-service-workforce-profiles Resource: https://beta-catalogue.data.gov.bc.ca/dataset/bc-public-service-workforce-profiles/resource/f13a27fd-bf54-4222-a546-1a6b5abec39a [Preview] button disabled Results: as expected
Resource Data Type = e00 (mapped to other) Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/multiple-resource-value-assessment-coast-mountains-district-skeena-region-web-viewer Resource: https://beta-catalogue.data.gov.bc.ca/dataset/multiple-resource-value-assessment-coast-mountains-district-skeena-region-web-viewer/resource/c356cb0a-14bc-4c76-b833-1afee49645e3 [Preview] button disabled Results: as expected
Resource Data Type = fgdb Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/terrain-mapping-ter-project-boundaries Resource: https://beta-catalogue.data.gov.bc.ca/dataset/terrain-mapping-ter-project-boundaries/resource/247e7804-95c2-4ef9-955d-204a312d3bac [Preview] button enabled Results: as expected (View iMapBC button)
Resource Data Type = geojson Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/translink-major-road-network Resource: https://beta-catalogue.data.gov.bc.ca/dataset/translink-major-road-network/resource/f2cbf48b-3217-4dd3-a2b1-97709467cee0 [Preview] button enabled Results: as expected
Resource Data Type = html Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/census-profiles-for-bc-census-subdivisions-2016-census Resource: https://beta-catalogue.data.gov.bc.ca/dataset/census-profiles-for-bc-census-subdivisions-2016-census/resource/97522a75-43e3-42e7-bbb9-3b85759b1b2d [Preview] button enabled Results: as expected (View iMapBC button)
Resource Data Type = json Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/howe-sound-cumulative-effects-project-area-data-howe-sound-cumulative-effects Resource: https://beta-catalogue.data.gov.bc.ca/dataset/howe-sound-cumulative-effects-project-area-data-howe-sound-cumulative-effects/resource/8eca5485-8f58-4665-94fd-52ba5d0959de [Preview] button disabled Results: as expected
Resource Data Type = kml Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/terrestrial-protected-areas-representation-by-biogeoclimatic-zone-parc- Resource: https://beta-catalogue.data.gov.bc.ca/dataset/terrestrial-protected-areas-representation-by-biogeoclimatic-zone-parc-/resource/f658405b-2050-4db8-b8cd-ce76889862ab [Preview] button enabled Results: as expected (View in iMapBC button)
Resource Data Type = kmz Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/meteorological-monitoring-sites Resource: https://beta-catalogue.data.gov.bc.ca/dataset/meteorological-monitoring-sites/resource/a2085229-e5f5-4c21-a5ec-dcf4867b6e02 [Preview] button enabled Results: as expected (View in iMapBC button)
Resource Data Type = openapi-json Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/common-document-generation-service-api Resource: https://beta-catalogue.data.gov.bc.ca/dataset/common-document-generation-service-api/resource/3ab4504d-7647-427a-9f0d-7c1f75b6da90 [Preview] button disabled Results: as expected
Resource Data Type = other Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/lidarbc-open-lidar-data-portal Resource: https://beta-catalogue.data.gov.bc.ca/dataset/lidarbc-open-lidar-data-portal/resource/a21bdeda-a376-45a1-8076-c09b5e70d0d8 [Preview] button disabled Results: as expected
Resource Data Type = pdf (type = geographic data) Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/census-profiles-for-bc-census-subdivisions-2016-census Resource: https://beta-catalogue.data.gov.bc.ca/dataset/census-profiles-for-bc-census-subdivisions-2016-census/resource/fd2b538d-b5f9-4e45-8396-5385feae89ff [Preview] button enabled Results: as expected (View in iMapBC button)
Resource Data Type = shp Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/bc-drought-levels-time-lapse-2020 Resource: https://beta-catalogue.data.gov.bc.ca/dataset/bc-drought-levels-time-lapse-2020/resource/f4b6fd5d-363d-424c-81fe-61b4acf90593 [Preview] button enabled Results: as expected
Resource Data Type = txt Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/contraventions-data Resource: https://beta-catalogue.data.gov.bc.ca/dataset/contraventions-data/resource/dbebfeb0-e545-4b95-9a04-81329b9a091a [Preview] button disabled Results: as expected
Resource Data Type = wms Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/terrestrial-protected-areas-representation-by-biogeoclimatic-zone-parc- Resource: https://beta-catalogue.data.gov.bc.ca/dataset/terrestrial-protected-areas-representation-by-biogeoclimatic-zone-parc-/resource/af59ed04-ccc7-41ba-9064-f42acd9983c4 [Preview] button enabled Results: as expected (View in iMapBC button)
Resource Data Type = xls Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/bc-finance-budget-2019 Resource: https://beta-catalogue.data.gov.bc.ca/dataset/bc-finance-budget-2019/resource/974e8efe-e786-4079-aab3-ba426a3383a2 [Preview] button disabled Results: as expected
Resource Data Type = xlsx Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/bc-finance-budget-2019 Resource: https://beta-catalogue.data.gov.bc.ca/dataset/bc-finance-budget-2019/resource/687a51ff-5b62-4f33-b895-f1202759f741 [Preview] button disabled Results: as expected
Resource Data Type = xml Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/bc-assessment-data-advice Resource: https://beta-catalogue.data.gov.bc.ca/dataset/bc-assessment-data-advice/resource/90b76f20-89f5-4ef8-9e49-6d18409b89baf42acd9983c4 [Preview] button enabled Results: as expected
Resource Data Type = zip Dataset: https://beta-catalogue.data.gov.bc.ca/dataset/bc-assessment-data-advice Resource: https://beta-catalogue.data.gov.bc.ca/dataset/bc-assessment-data-advice/resource/2502029a-9425-463c-8181-776c4c00cb1e [Preview] button enabled Results: as expected
Tested and PASSED
From Colin Newell:
Resource: https://beta-catalogue.data.gov.bc.ca/dataset/parcelmap-bc-parcel-polygons/resource/ab87d159-a059-4dbf-9da5-221c37e5f63e
Press “preview” to get error message.
From: DataBC CITZ:EX Data@gov.bc.ca Sent: July 20, 2021 6:43 AM To: Newall, Colin G CITZ:EX Colin.Newall@gov.bc.ca Cc: CITZ DPD DSS Data Discovery Services DPDDSDDS@Victoria1.gov.bc.ca Subject: RE: BETA - catalogue
New Catalogue looks awesome! Great work!
I clicked “preview” for the PMBC record and this error appeared – is it supposed to work?
Thank you,
Colin Newall Team Lead, Data Management