Fixed #1634 added support to custom search services and minor fixes#1664
Merged
MV88 merged 6 commits intoMar 31, 2017
Conversation
offtherailz
requested changes
Mar 30, 2017
| }, params)) | ||
| .then( response => response.features ); | ||
| }, | ||
| bzVie: (searchText, {pathname, lang}) => { |
Member
There was a problem hiding this comment.
This is a custom service. Please remove it from pull request
| return []; | ||
| }); | ||
| }, | ||
| bzCivico: (searchText, {pathname, item}) => { |
| .mergeAll() | ||
| .scan( (oldRes, newRes) => [...oldRes, ...newRes].sort( (a, b) => get(b, "__PRIORITY__") - get(a, "__PRIORITY__") ) .slice(0, 15)) | ||
| .map((results) => searchResultLoaded(results, false, services)) | ||
| .map((results) => searchResultLoaded(results, false, API.Services)) |
Member
There was a problem hiding this comment.
probably API.Services is not needed
| .then( | ||
| (response= []) => response.map(result => ({...result, __SERVICE__: service, __PRIORITY__: service.priority || 0})) | ||
| )) | ||
| .retryWhen(errors => errors.delay(200).scan((count, err) => { |
Member
There was a problem hiding this comment.
indent back, retryWhen is applied to the Observable, not to the service's promise
| .switchMap(action => { | ||
| const item = action.item; | ||
| let itemSelectionStream = Rx.Observable.of(action.item) | ||
| // retrieve geometry from geomService or pass the item directly |
Member
There was a problem hiding this comment.
this comment is relative to the function code. Move inside the function
| action$.ofType(TEXT_SEARCH_ITEM_SELECTED) | ||
| .switchMap(action => { | ||
| const item = action.item; | ||
| let itemSelectionStream = Rx.Observable.of(action.item) |
Member
There was a problem hiding this comment.
You can comment itemSelectionStream with something like :
// emits actions for zoom and marker add
offtherailz
approved these changes
Mar 31, 2017
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added also the support for geomService.
Fixed minor things.