bcgov / smk-legacy-ui

Legacy Admin UI for the SMK has been de-supported. Please see the CLI under https://github.com/bcgov/smk for an alternative.
Apache License 2.0
8 stars 3 forks source link

MPCM layers and some tools not showing up in an exported map & export bloat #170

Open NicoledeGreef opened 6 years ago

NicoledeGreef commented 6 years ago

What behaviour I'm expecting and which behaviour I'm seeing

A map is configured using MPCM layer and a subset of available tools then exported. Once the export is viewed the layers are not rendering on the map; the mouse scroll has no effect on the zoom level and the tools such as identify are not available.

The features are all available if the map is launched via the authoring tool.

Minimal example reproducing the issue

newly created site "cfis2"; exported and viewed as deployed on apache tomcat 7.0.53: http://nc051110.idir.bcgov:8080/cfis2/ image If I double click the HTML file as opposed to rendering it via the server call the following presents:

SMK Client Initialization failed Error: failed to load template from file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2/smk-tags.json, for tag "smk-tags" at XMLHttpRequest. (file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2//lib/include.js:146:26) at file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2//lib/include.js:150:21 at new Promise () at Object.loader.template (file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2//lib/include.js:136:20) at Object.loader.tags (file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2//lib/include.js:46:21) at file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2//lib/include.js:251:38 at new Promise () at _include (file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2//lib/include.js:250:15) at file:///C:/apps/apache-tomcat-7.0.53/webapps/cfis2//lib/include.js:184:65

ghost commented 6 years ago

other observations on the exported results:

dhlevi commented 6 years ago

the standalone html is included with the export. There is an html file at the root of the export called "index.html" which enables the same functionality.

Export does contain all uploaded data, as geojson only (and of course any uploaded images). The SMK application converts any supplied KML or shapefile data into geojson. These are exported in an "attachments" folder. SMK does not retain copies of the original source file.

Regarding the Test folder, that's included as an artifact of our test environment, and we won't include that in a production release. Though it is useful for examples, we intend on including more useful general examples with the export instead of our testing components.

ghost commented 6 years ago

When I tried the index.html exported it does not read or reference the map_config.json file in the same location.. (it looks like it has a dump of the json file within the html file though) - see http://delivery.maps.gov.bc.ca/smk/smkclient/index.html.

Unless it has changed recently, the geojson file I uploaded was not found in my exported copy (only pngs were in the attachment folder). - just tested this.. and did get the geojson file that time..

cpspicer commented 6 years ago

Assigned to Michelle for QA of export structure and content

cpspicer commented 6 years ago

Moving to complete based on new structure. Should review in line with the documentation.