Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/meggsimum/wegue into gene…
Browse files Browse the repository at this point in the history
…ric-window-management
  • Loading branch information
fschmenger committed May 6, 2021
2 parents 1eb2d2d + ee2910a commit d7d87cf
Show file tree
Hide file tree
Showing 15 changed files with 2,741 additions and 1,129 deletions.
39 changes: 30 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
[
"@babel/preset-env",
{
"corejs": { "version": 3, "proposals": true },
"useBuiltIns": "usage",
"modules": false,
"targets": {
"browsers": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
}
}],
"stage-2"
]
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"corejs": 3
}
],
"@babel/plugin-proposal-class-properties"
],
"plugins": ["transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["istanbul"]
"presets": [
"@babel/preset-env"
],
"plugins": [
"istanbul",
"@babel/plugin-proposal-class-properties"
]
}
}
}
20 changes: 17 additions & 3 deletions app-starter/static/app-conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@
"name": "Name",
"email": "Email",
"website": "Website"
}
},
"selectStyle": {
"radius": 10,
"strokeColor": "gray",
"strokeWidth": 5,
"fillColor": "rgb(255, 255, 0, 0.2)"
},
"doAppendSelectStyle": true
},
{
"type": "WFS",
Expand All @@ -88,7 +95,13 @@
"attributions": "© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors.",
"columnMapping": {
"name": "Name"
}
},
"selectStyle": {
"textIcon": "star",
"font": "normal 30px Material Icons",
"fillColor": "black"
},
"doAppendSelectStyle": false
},

{
Expand Down Expand Up @@ -230,7 +243,8 @@
},
"wgu-attributetable": {
"target": "menu",
"win": true
"win": true,
"syncTableMapSelection": true
}
}
}
15 changes: 4 additions & 11 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Wegue App Dir
This directory will contain your Wegue Application.
By using the command `npm run init:app` this directory is populated with
the contents from the `app-starter/` dir.
# Wegue App Starter Dir
This directory contains a Wegue starter app.
By using the command `npm run init:app` this directory is copied to the `app/` directory.
For now this copy will not overwrite files already present in the `app/` dir.

You can develop your Wegue app by modifying/adding files here, under the `app/` dir, for example:

* modifying the core `.vue` files like `app/WguApp.vue` and `app/WguAppTemplate.vue`
* placing or modifying custom/app-specific components under `app/components`
* placing or modifying static content like configuration, data, icons and css under `app/static`.

The default config file is `app/static/app-conf.json`.
3 changes: 3 additions & 0 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ module.exports = {
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('app'), resolve('src'), resolve('test'), resolve('node_modules/ol')],
options: {
presets: ['@babel/preset-env']
}
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
Expand Down
52 changes: 27 additions & 25 deletions docs/map-layer-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,36 @@ The following properties can be applied to all map layer types

## VECTOR

| Property | Meaning | Example |
|--------------------|:---------:|---------|
| **type** | Indicator that the layer is a vector layer, always `VECTOR` here | `"type": "VECTOR"` |
| **url** | The URL to the vector data resource (file) | `"url": "./static/data/2012_Earthquakes_Mag5.kml"` |
| **format** | The format of the data linked in `url` (either `KML` or `GeoJSON` ) | `"format": "KML"` |
| selectable | Boolean value, whether the features of the layer can be selected by click in order to display the attributes in a window | `"selectable": true` |
| hoverable | Boolean value, whether the features of the layer can be hovered in order to display an attribute (see `hoverAttribute`) in a tooltip | `"hoverable": true` |
| hoverAttribute | Attribute to be shown if a feature of the layer is hovered. Only has an effect if `hoverable` is set to `true` | `"hoverAttribute": "name"` |
| style | Object to define a rendering style for the features of the layer | see [style](map-layer-configuration?id=style-for-vectorlayers) |
| selectStyle | The style for a selected feature | see [style](map-layer-configuration?id=style-for-vectorlayers) |
| columnMapping | Maps the property names to human-readable text. Can be used by `AttributeTable`. | `"columnMapping": {"name": "Name", "email": "Email"}`
| Property | Meaning | Example |
|---------------------|:---------:|---------|
| **type** | Indicator that the layer is a vector layer, always `VECTOR` here | `"type": "VECTOR"` |
| **url** | The URL to the vector data resource (file) | `"url": "./static/data/2012_Earthquakes_Mag5.kml"` |
| **format** | The format of the data linked in `url` (either `KML` or `GeoJSON` ) | `"format": "KML"` |
| selectable | Boolean value, whether the features of the layer can be selected by click in order to display the attributes in a window | `"selectable": true` |
| hoverable | Boolean value, whether the features of the layer can be hovered in order to display an attribute (see `hoverAttribute`) in a tooltip | `"hoverable": true` |
| hoverAttribute | Attribute to be shown if a feature of the layer is hovered. Only has an effect if `hoverable` is set to `true` | `"hoverAttribute": "name"` |
| style | Object to define a rendering style for the features of the layer | see [style](map-layer-configuration?id=style-for-vectorlayers) |
| selectStyle | The style for a selected feature | see [style](map-layer-configuration?id=style-for-vectorlayers) |
| doAppendSelectStyle | If the selectStyle should be appended to the original style, defaults to `false` | `"doAppendSelectStyle": true` |
| columnMapping | Maps the property names to human-readable text. Can be used by `AttributeTable`. | `"columnMapping": {"name": "Name", "email": "Email"}`

## WFS

| Property | Meaning | Example |
|--------------------|:---------:|---------|
| **type** | Indicator that the layer is a WFS-based vector layer, always `WFS` here | `"type": "WFS"` |
| **url** | The URL to the Web Feature Service (WFS) | `"url": "https://ows.terrestris.de/geoserver/osm/wfs"` |
| **typeName** | The name of the FeatureType | `"typeName": "osm:osm-fuel"`|
| style | Object to define a rendering style for the features of the layer | see [style](map-layer-configuration?id=style-for-vectorlayers) |
| version | The version of the WFS, defaults to `1.1.0` | `"version": "2.0.0"`|
| maxFeatures | Limits the amount of features that are queried and displayed | `"maxFeatures": 50`|
| format | The format that should be used. Possible values are `GeoJSON`, `GML2`, `GML3` and `GML32`. Defaults to `GML3` | `"format": "GeoJSON"`|
| selectable | Boolean value, whether the features of the layer can be selected by click in order to display the attributes in a window | `"selectable": true` |
| selectStyle | The style for a selected feature| see [style](map-layer-configuration?id=style-for-vectorlayers) |
| columnMapping | Maps the property names to human-readable text. Can be used by `AttributeTable`. | `"columnMapping": {"name": "Name", "email": "Email"}`
| hoverable | Boolean value, whether the features of the layer can be hovered in order to display an attribute (see `hoverAttribute`) in a tooltip | `"hoverable": true` |
| hoverAttribute | Attribute to be shown if a feature of the layer is hovered. Only has an effect if `hoverable` is set to `true` | `"hoverAttribute": "name"` |
| Property | Meaning | Example |
|---------------------|:---------:|---------|
| **type** | Indicator that the layer is a WFS-based vector layer, always `WFS` here | `"type": "WFS"` |
| **url** | The URL to the Web Feature Service (WFS) | `"url": "https://ows.terrestris.de/geoserver/osm/wfs"` |
| **typeName** | The name of the FeatureType | `"typeName": "osm:osm-fuel"`|
| style | Object to define a rendering style for the features of the layer | see [style](map-layer-configuration?id=style-for-vectorlayers) |
| version | The version of the WFS, defaults to `1.1.0` | `"version": "2.0.0"`|
| maxFeatures | Limits the amount of features that are queried and displayed | `"maxFeatures": 50`|
| format | The format that should be used. Possible values are `GeoJSON`, `GML2`, `GML3` and `GML32`. Defaults to `GML3` | `"format": "GeoJSON"`|
| selectable | Boolean value, whether the features of the layer can be selected by click in order to display the attributes in a window | `"selectable": true` |
| selectStyle | The style for a selected feature | see [style](map-layer-configuration?id=style-for-vectorlayers) |
| doAppendSelectStyle | If the selectStyle should be appended to the original style, defaults to `false` | `"doAppendSelectStyle": true` |
| columnMapping | Maps the property names to human-readable text. Can be used by `AttributeTable`. | `"columnMapping": {"name": "Name", "email": "Email"}`
| hoverable | Boolean value, whether the features of the layer can be hovered in order to display an attribute (see `hoverAttribute`) in a tooltip | `"hoverable": true` |
| hoverAttribute | Attribute to be shown if a feature of the layer is hovered. Only has an effect if `hoverable` is set to `true` | `"hoverAttribute": "name"` |


## VECTORTILE
Expand Down
4 changes: 3 additions & 1 deletion docs/module-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ The attribute table displays features of vector layers. It is possible to specif

Module identifier: `wgu-attributetable`

No additional config options besides the general ones.
| Property | Meaning | Example |
|-----------------------------|:---------:|---------|
| syncTableMapSelection | Clicking on a row zooms to the respective feature. If the layer is `selectable` the feature will also be selected. Selecting a feature on the map selects the corresponsing row in the table. | `"syncTableMapSelection": true` |
Loading

0 comments on commit d7d87cf

Please sign in to comment.