forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial multiservice support for search
- Changed internal representation from nominatim to GeoJson - Fixed geosolutions-it#1507 Now Openlayers uses default style too - Fixes geosolutions-it#1505 Now the markers are correctly displaced - The selector for layers with marker generate marker layers only inside the selector (still to remove loading from flat layer to get better performances) - Initial support for WFS as external services - Moved businness logic from UI into a new epic
- Loading branch information
1 parent
ba1ed63
commit bd3cf3a
Showing
20 changed files
with
471 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
var context = require.context('./web', true, /(-test\.jsx?)|(-test-chrome\.jsx?)$/); | ||
var context = require.context('./web/client/epics', true, /(-test\.jsx?)|(-test-chrome\.jsx?)$/); | ||
context.keys().forEach(context); | ||
module.exports = context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright 2017, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const React = require('react'); | ||
const {get} = require('lodash'); | ||
|
||
|
||
let SearchResult = React.createClass({ | ||
propTypes: { | ||
item: React.PropTypes.object, | ||
displayName: React.PropTypes.string, | ||
idField: React.PropTypes.string, | ||
icon: React.PropTypes.string, | ||
onItemClick: React.PropTypes.func | ||
}, | ||
getDefaultProps() { | ||
return { | ||
displayName: "properties.display_name", | ||
idField: "id", | ||
icon: "properties.icon" | ||
}; | ||
}, | ||
onClick() { | ||
let item = this.props.item; | ||
this.props.onItemClick(item); | ||
}, | ||
render() { | ||
if (this.props.item === undefined) { | ||
return null; | ||
} | ||
let item = this.props.item; | ||
return ( | ||
<div key={item.osm_id} className="search-result NominatimResult" onClick={this.onClick}> | ||
<div className="icon"> <img src={item.icon} /></div> | ||
{get(item, this.props.displayName) } | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = SearchResult; |
Oops, something went wrong.