diff --git a/docs/edit-layer.md b/docs/edit-layer.md index 84037e1..c2ca2c2 100644 --- a/docs/edit-layer.md +++ b/docs/edit-layer.md @@ -84,7 +84,7 @@ From the WMS Details panel, you can modify the following attributes: #### Opacity -`Opacity` adjust how transparent the layer is by default. Making a layer 100% Opaque will prevent users from seeing feaures covered by this layer. Setting a layer to 0% Opaque will prevent it from displaying on the map at all, but it will still be identifiable and selectable (just invisible). +`Opacity` adjusts how transparent the layer is by default. Making a layer 100% Opaque will prevent users from seeing feaures covered by this layer. Setting a layer to 0% Opaque will prevent it from displaying on the map at all, but it will still be identifiable and selectable (just invisible). #### Display Range @@ -100,11 +100,11 @@ From the WMS Details panel, you can modify the following attributes: #### Style Name -`Style Name` Is the name of the WMS Service layer style you are presenting to your users. This should not be modified unless you are certain of a change to source layer styles (confirmed by a review of the WMS Service GetCapabilities). Usually, it's easier to simply re-add the layer. +`Style Name` is the name of the WMS Service layer style you are presenting to your users. This should not be modified unless you are certain of a change to source layer styles (confirmed by a review of the WMS Service GetCapabilities). Usually, it's easier to simply re-add the layer. #### Metadata URL -`Metadata URL` is A supplied URL for the layers metadata. By default this is empty for WMS layers, but can be supplied if desired. This is useful for providing users with links to data sources or specific external resources related to the data displayed in your application. +`Metadata URL` is a supplied URL for the layer's metadata. By default this is empty for WMS layers, but can be supplied if desired. This is useful for providing users with links to data sources or specific external resources related to the data displayed in your application. ### Vector Layer Details @@ -118,6 +118,7 @@ From the Vector Details panel, you can modify the following attributes: - Display Range - Data URL - How should the Data be Displayed? +- Show Cluster Bounds on Hover - Metadata URL Note that the Vector Details panel is the same if you've imported vector data directly into your application, or if you're using a URL. @@ -132,7 +133,7 @@ Note that the Vector Details panel is the same if you've imported vector data di #### Opacity -`Opacity` adjust how transparent the layer is by default. Making a layer 100% Opaque will prevent users from seeing feaures covered by this layer. Setting a layer to 0% Opaque will prevent it from displaying on the map at all, but it will still be identifiable and selectable (just invisible). +`Opacity` adjusts how transparent the layer is by default. Making a layer 100% opaque will prevent users from seeing features covered by this layer. Setting a layer to 0% opaque will prevent it from displaying on the map at all, but it will still be identifiable and selectable (just invisible). #### Display Range @@ -140,11 +141,11 @@ Note that the Vector Details panel is the same if you've imported vector data di #### Data URL -`Data URL` Is the URL location for your vector data. If you've imported a vector file into your application, this will be a local path to your applications source folder. Do not modify this URL unless you are sure you want to direct the application to search a specific location for the vector data. +`Data URL` is the URL location for your vector data. If you've imported a vector file into your application, this will be a local path to your application's source folder. Do not modify this URL unless you are sure you want to direct the application to search a specific location for the vector data. #### How should the Data be Displayed -`How should the Data be Displayed?` Is a styling override for your vector data. This is a dropdown select box that contains three options: +`How should the Data be Displayed?` is a styling override for your vector data. This is a dropdown select box that contains three options: - Show Feature as Styled (Default) - Show Features in Clusters @@ -152,13 +153,19 @@ Note that the Vector Details panel is the same if you've imported vector data di `Show Feature as Styled` will use the supplied vector styling for the layer. This is the default setting for vector layers. -`Show Features in Clusters` Will still use your default layer styling, but it will show the features clustered on the map, expanding them as you zoom in. This is very useful for dense sets of vector point data. +`Show Features in Clusters` will still use your default layer styling, but it will show the features clustered on the map, expanding them as you zoom in. This is very useful for dense sets of vector point data. -`Show Features as a Heatmap` Will remove your default styling and convert the data into a heatmap display. This is very useful for point data sets. +`Show Features as a Heatmap` will remove your default styling and convert the data into a heatmap display. This is very useful for point data sets. + +#### Show Cluster Bounds on Hover + +`Show Cluster Bounds on Hover` shows the bounds of a cluster's markers when you mouse over the cluster. + +> __Note:__ This option only appears when `Show Features in Clusters` is selected for `How should the Data be Displayed?`. #### Metadata URL -`Metadata URL` is A supplied URL for the layers metadata. By default this is empty for WMS layers, but can be supplied if desired. This is useful for providing users with links to data sources or specific external resources related to the data displayed in your application. +`Metadata URL` is a supplied URL for the layer's metadata. By default this is empty for WMS layers, but can be supplied if desired. This is useful for providing users with links to data sources or specific external resources related to the data displayed in your application. ### Vector Styling diff --git a/package-lock.json b/package-lock.json index e35edaf..3044ca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@bcgov/smk-cli", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bcgov/smk-cli", - "version": "1.0.1", + "version": "1.0.2", "license": "(MIT OR Apache-2.0)", "dependencies": { - "@bcgov/smk": "^1.0.2", + "@bcgov/smk": ">=1.0.6", "@tmcw/togeojson": "^4.1.0", "chalk": "^4.1.0", "cors": "^2.8.5", @@ -46,9 +46,9 @@ } }, "node_modules/@bcgov/smk": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@bcgov/smk/-/smk-1.0.5.tgz", - "integrity": "sha512-USxTYj1kGRP0L29meTs+gDWmQZUUY3p1lZI6SPe1L2ftjRTRBKtD2OUwfoC94CxLDQIoiVvpY2Ee5jUjKKOtdA==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@bcgov/smk/-/smk-1.0.6.tgz", + "integrity": "sha512-+KDt6AouL7cOvJloSg4nPnwMXlLzE9A+GmJx2/ieG2XaHEQ2XmmtcOyDW0sRVYR/kgc/JeBp9XH+Uo7VztyvJg==" }, "node_modules/@tmcw/togeojson": { "version": "4.5.0", @@ -3072,9 +3072,9 @@ }, "dependencies": { "@bcgov/smk": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@bcgov/smk/-/smk-1.0.5.tgz", - "integrity": "sha512-USxTYj1kGRP0L29meTs+gDWmQZUUY3p1lZI6SPe1L2ftjRTRBKtD2OUwfoC94CxLDQIoiVvpY2Ee5jUjKKOtdA==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@bcgov/smk/-/smk-1.0.6.tgz", + "integrity": "sha512-+KDt6AouL7cOvJloSg4nPnwMXlLzE9A+GmJx2/ieG2XaHEQ2XmmtcOyDW0sRVYR/kgc/JeBp9XH+Uo7VztyvJg==" }, "@tmcw/togeojson": { "version": "4.5.0", diff --git a/package.json b/package.json index 5b6c2d3..4abfc51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bcgov/smk-cli", - "version": "1.0.1", + "version": "1.0.2", "description": "A utility for creating and configuring a Simple Map Kit project", "main": "index.js", "author": "Ben Jubb ", @@ -16,7 +16,7 @@ "debug": "./index.js edit --open no --base build/test-app --ping 300000" }, "dependencies": { - "@bcgov/smk": "^1.0.2", + "@bcgov/smk": ">=1.0.6", "@tmcw/togeojson": "^4.1.0", "chalk": "^4.1.0", "cors": "^2.8.5", diff --git a/smk-edit/static/components/edit-item-details-layer-vector.html b/smk-edit/static/components/edit-item-details-layer-vector.html index 5b04ac4..84cbb5c 100644 --- a/smk-edit/static/components/edit-item-details-layer-vector.html +++ b/smk-edit/static/components/edit-item-details-layer-vector.html @@ -16,4 +16,10 @@ + +
+ Show the bounds of a cluster on hover +
\ No newline at end of file diff --git a/smk-edit/static/components/edit-item-details-layer-vector.js b/smk-edit/static/components/edit-item-details-layer-vector.js index ee4b791..0eef1be 100644 --- a/smk-edit/static/components/edit-item-details-layer-vector.js +++ b/smk-edit/static/components/edit-item-details-layer-vector.js @@ -27,6 +27,18 @@ export default importComponents( [ } ) } }, + showCoverageOnHover: { + get: function () { + var layer = this.$store.getters.configLayer( this.itemId ) + return layer.clusterOption && !!layer.clusterOption.showCoverageOnHover + }, + set: function ( val ) { + var layer = this.$store.getters.configLayer( this.itemId ) + if ( !layer.clusterOption ) layer.clusterOption = {} + layer.clusterOption.showCoverageOnHover = !!val + this.$store.dispatch( 'configLayer', layer ) + } + } }, mounted: function () { },