Skip to content

Commit

Permalink
updated example with editable data
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz committed Jul 31, 2017
1 parent 4c565b6 commit 3de53b6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
40 changes: 26 additions & 14 deletions web/client/examples/featuregrid/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"map": {
"center": {"x": -8232108.5906099, "y": 4979998.6532879, "crs": "EPSG:900913"},
"center": {"x": -2712465.14, "y": 3678603.57, "crs": "EPSG:900913"},
"layers": [
{
"group": "background",
Expand All @@ -13,42 +13,54 @@
{
"describeLayer": {
"owsType": "WFS",
"geometryType": "LineString"
"geometryType": "Point"
},
"id": "atlantis:island",
"format": "image/png",
"group": "Vector",
"id": "tiger:poly_landmarks",
"name": "tiger:poly_landmarks",
"name": "atlantis:island",
"opacity": 1,
"title": "Landmarks",
"title": "Atlantis Islands",
"type": "wms",
"url": "https://demo.geo-solutions.it/geoserver/wms",
"visibility": true
},
{
},{
"describeLayer": {
"owsType": "WFS",
"geometryType": "Point"
},
"id": "tiger:tiger_roads",
"id": "atlantis:landmarks",
"format": "image/png",
"group": "Vector",
"name": "tiger:tiger_roads",
"name": "atlantis:landmarks",
"opacity": 1,
"title": "Lakes, Mountains and Forests",
"type": "wms",
"url": "https://demo.geo-solutions.it/geoserver/wms",
"visibility": true
},{
"describeLayer": {
"owsType": "WFS",
"geometryType": "Point"
},
"id": "atlantis:roads",
"format": "image/png",
"group": "Vector",
"name": "atlantis:roads",
"opacity": 1,
"title": "Roads",
"type": "wms",
"url": "https://demo.geo-solutions.it/geoserver/wms",
"visibility": true
},
{
},{
"describeLayer": {
"owsType": "WFS",
"geometryType": "Point"
},
"id": "tiger:poi",
"id": "atlantis:poi",
"format": "image/png",
"group": "Vector",
"name": "tiger:poi",
"name": "atlantis:poi",
"opacity": 1,
"title": "Points of Interest",
"type": "wms",
Expand All @@ -64,6 +76,6 @@
],
"projection": "EPSG:900913",
"units": "m",
"zoom": 12
"zoom": 6
}
}
4 changes: 2 additions & 2 deletions web/client/examples/featuregrid/plugins/LayerSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const LayerSelector = ({layers = [], selectedLayerId, onLayerSelect= () => {}} =
top: "10px",
left: "10px",
width: "250px",
height: "250px"
height: "300px"
}} header="Select a layer">
<h4>Manhattan (New York)</h4>
<h4>Atlantis</h4>
<Nav bsStyle="pills" activeKey={selectedLayerId} stacked onSelect={onLayerSelect}>
{layers.map(l => <NavItem eventKey={l.id} >{l.title}</NavItem>)}
</Nav>
Expand Down
2 changes: 1 addition & 1 deletion web/client/examples/featuregrid/stores/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = (plugins) => {
featureTypeSelectedEpic, wfsQueryEpic, viewportSelectedEpic,
initLoadFeatureGridDemo: (action$, store) =>
action$.ofType('MAP_CONFIG_LOADED', "FEATUREGRID_SAMPLE::SELECT_LAYER")
.switchMap(({id = 'tiger:poly_landmarks'} = {}) => {
.switchMap(({id = 'atlantis:poi'} = {}) => {
const state = store.getState();
if (hasChangesSelector(state) || hasNewFeaturesSelector(state)) {
return Rx.Observable.of(toggleTool("featureCloseConfirm", true))
Expand Down

0 comments on commit 3de53b6

Please sign in to comment.