Skip to content

Fix 3817 map info url#4000

Merged
tdipisa merged 12 commits intogeosolutions-it:masterfrom
MV88:3817_mapinfo_url
Jul 24, 2019
Merged

Fix 3817 map info url#4000
tdipisa merged 12 commits intogeosolutions-it:masterfrom
MV88:3817_mapinfo_url

Conversation

@MV88
Copy link
Copy Markdown
Contributor

@MV88 MV88 commented Jul 23, 2019

Description

This pr add the possibility to use actions in queryparams for map viewer

Not all the actions can be dispatched, only the ones in the whiteList here

  • SEARCH:SEARCH_WITH_FILTER
  • ZOOM_TO_EXTENT

whitelist can be configured from localConfig by using the property "initialActionsWhiteList", see here

This will be documented in the API - map query parameters section

Issues

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Feature

What is the current behavior? (You can also link to an open issue here)
You cannot dispatch actions from query params for the map viewer

What is the new behavior?
You can

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No (bbox still works)

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Some important point of this pr:

  • changes to identify epic
  • changes to search epic
  • moving the share epic into a more generic epic that manages map query params
  • changes to main function in order to take the general queryparam epic
    this point could be harmful for old projects that are not using main.jsx file

MV88 added 8 commits July 18, 2019 09:44
* changed main comp to fetch new epic
* added whitelist
* add error handling for map info from url
* added possibility to restrict list of queriable layers to perform GFI
* added possibility to override some request param for specific layers
*
# Conflicts:
#	web/client/actions/search.js
#	web/client/epics/__tests__/search-test.js
#	web/client/epics/search.js
@MV88 MV88 requested a review from mbarto July 23, 2019 10:58
@MV88 MV88 self-assigned this Jul 23, 2019
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 23, 2019

Coverage Status

Coverage increased (+0.002%) to 82.128% when pulling 81168e3 on MV88:3817_mapinfo_url into 724408a on geosolutions-it:master.

@@ -0,0 +1,77 @@
# Map query parameters
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Map query parameters
# MapViewer query parameters

@@ -0,0 +1,77 @@
# Map query parameters

In this section we will describe the available map query parameters
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name these parameters MapViewer parameters, but this is just my opinion.

that can be used when the map is loaded.

## Retro-compatibility
In the past it has been introduced a **bbox** query param with value that corresponds to extent in the viewport.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the past it has been introduced a **bbox** query param with value that corresponds to extent in the viewport.
In the past a **bbox** query param has been introduced whose value corresponds to extent in the viewport.


For more details on it see [sharing a map](../user-guide/share).

## New way to dispatch actions in MapStore
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## New way to dispatch actions in MapStore
## Dynamically dispatching initial actions in MapStore


## New way to dispatch actions in MapStore

**actions** is the new query param and it will be used to dispatch actions (in the map viewer) that are limited to a whitelist.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**actions** is the new query param and it will be used to dispatch actions (in the map viewer) that are limited to a whitelist.
to dispatch additional actions when the map viewer is started, the **actions** query param can be used. Only actions from a configured whitelist can be dispatched in this way.

```
For more details check out the [searchLayerWithFilter](https://mapstore2.geo-solutions.it/mapstore/docs/#actions.search.exports.searchLayerWithFilter) in the framework documentation

#### Add Layers (not implemented yet)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not document something that is not implemented yet. You can add this documentation together with the related implementation.

mkdocs.yml Outdated
- Plugins Architecture: 'developer-guide/plugins-architecture.md'
- Configuring Plugins: 'developer-guide/plugins-documentation.md'
- API:
- Map query paramaters: 'developer-guide/map-query-parameters.md'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Map query paramaters: 'developer-guide/map-query-parameters.md'
- MapViewer query paramaters: 'developer-guide/map-query-parameters.md'

});
});

it('reset reverse geocode data', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the test name correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope XD

return {
type: INIT_MAP
type: INIT_MAP,
location
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this addition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, it was there from a first implementation and it is no longer used.
going to fix it

];
},
actions: ({value = ''}) => {
const whiteList = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like this whitelist to be configurable from localConfig.json

"bingApiKey",
"mapquestApiKey",
// list of actions that are available to be launched dynamically from query param (#3817)
"initialActionsWhiteList": [{"type":"ZOOM_TO_EXTENT", "extent":[minx,minx,maxx,maxy]}],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a list of strings (the list of action types, not a list of objects)

@tdipisa tdipisa merged commit a90ce55 into geosolutions-it:master Jul 24, 2019
mbarto added a commit that referenced this pull request Aug 5, 2019
* 3523 manage exponential number coord editor (#3907)

* Fixed exponential problem with input type number for coordiante entry

* 'e' and 'E' chars are disabled for coordinate entry
* both on aeronautical or decimal
* updated doc
* restored onkeyDown prop, and added more tests to check that is called
* removed comment

* Fix #3908 Time sync support for FeatureGrid (#3909)

* Fix for #3845. Restored Identify and other plugins doc (#3921)

* FIx #3785 Implemented Layer Filter (#3898)

* Closes #3785 #3778 #3779 #3788

* Fixed lint error and added layerfilter tests

* Fixes on Lorenzo's review

* Added comments and fixed query tooltip string

* Fixesx after Lorenzo's second review

* Fixess on Lorenzo's last review

* Removed console.log

* Fixed btntooltip

* use protocol-relative URL for CartoDB provider (#3938)

* Fix 3945 zoom to feature for point now zooms correctly (#3946)

* Fix 3945 zoom to feature for point now zooms correctly

* fix max zoom default

* added a todo for max zoom customization

* fix #3915 wrong overflow in feature info settings (#3941)

* Fix Glich of query panels roi styles (#3948)

* Fix Glith of query panels roi styles

* remove onmount double call in feature editor

* Fix 3942 with correct positioning of tutorial for GFI step (#3943)

* Fix 3942 with correct positioning of tutorial for GFI step

* changed implementation

* Fix #3928 widget builder color selector box shows wrong labels (#3937)

* Fix dashboard autoreload (#3951)

* Fix thematic maps color labels (#3952)

* Fixes #3955 filter layer minor issues (#3956)

* Fix fr-FR translation for options menu (#3961)

* Fix #3913 GFI window does not close when opening the catalog (#3913) (#3944)

* Fix #3913 GFI window does not close when opening the catalog (#3913)

fix #3913

* move the epic to their more appropriate file

* Fix #3910 Text annotations - wrong text align in preview (#3954)

fix #3910

* Fix link on quickstart page (#3968)

* Add infoFormat to Identify plugin documentation (#3966)

* Add infoFormat to Identify plugin documentation

* changed documentation message

* Fix 3960 Template editor of feature info settings has slow response on typing (#3965)

* add internal state to feature info editor to reduce on change calls

* add default state in feature info editor component

* Added missing Croatian translations & fix typos (#3959)

* Added missing Croatian translations & fix typos

* Fix typo

* Added missing strings that were not added automatically by devs

* Fix #3957 Avoid showing the MapStore version number (2) in translations (#3971)

fix #3957

* #3950: the whole group containing the annotations layer disappears in 3d mode, also if it contains other layers (#3974)

* #3863: improved Print plugin documentation with info on printing usin… (#3975)

* #3863: improved Print plugin documentation with info on printing using custom scales

* #3863: fixed typo

* Fix #3940 Integrate the tooltip for metadata with missing params (#3973)

* Fix #3940 Integrate the tooltip for metadata with missing params

fix #3940

* sort the templateMetadata in translation

* Fix #3906  the 'back' button does not undo the annotation creation (#3967)

* Fix #3906  the 'back' button does not undo the annotation creation

fix #3906

* improve test coverage

* Fix 3976 Search Plugin improved (#3977)

* Fix 3976 Search Plugin improved
* sort is correct
* maxRsults is configurable and limits the results size
* add test to check results sorting
* Update web/client/epics/search.js
Co-Authored-By: Lorenzo Natali <offtherailz@gmail.com>
* Update web/client/epics/__tests__/search-test.js
Co-Authored-By: Lorenzo Natali <offtherailz@gmail.com>

* #3972: fixed print of vector layers for solid dash stroke (#3978)

* update style of annotation text symbolizer to avoid horizontal scrollbar (#3979)

* #3962: removed old examples (#3986)

* fix #3969 annotation description field is not clickable in safari (#3982)

* #3784 Activate Sync Map by default (#3984)

* Fix #3958 hide layer related buttons when removing a layer from the map (#3980)

* Fix WidgetLegend preview (#3994)

* Fix WidgetLegend preview

* Update web/client/components/widgets/enhancers/legendWidget.js

* Ewsterrenburg vietnamese translations (#3999)

* Add Vietnamese translation

* Removed erroneous comma

* Fixing tests

* removed console.log

* Update featuregrid.js

* Fix 3985 add catalog autosearch (#3988)

* Fix 3895 catalog autosearch

* Fix reducer default, fix epic for autosearch

* test was hard to provide since it is using a thunk
* anyway it has been tested so i removed the test for epic

* added missing default in catalog reducer

* #3989: fixed the broken examples (#4003)

* Fix #3934 Cross layer filter: some wfs requests fails (#3991)

* Fix 3817 map info url (#4000)

* Wip 3817 mapinfo on map loading

* Wip GetFeatureInfo after GetFeature

* wip

* moved queryparam logic in a separate epic

* changed main comp to fetch new epic
* added whitelist
* add error handling for map info from url

* added a generic api for queryparam actions

* added possibility to restrict list of queriable layers to perform GFI
* added possibility to override some request param for specific layers
*

* Added documentation

* fix doc link

* fix german translations

* fix others translations

* Fix documentation and make whitelist configurable

* update doc

* Save filterLayer in layer object (#4010)

* Fix Print tool with vendor param (CQL_FILTER) (#4006)

* Fix 2749 search urls for cross layer filter are compared ignoring "dirty" chars (#4004)

* Fix 2749 search urls for cross layer filter are compared ignoring "dirty" url

* fix test and check for dirty chars

* Fix 4007 hide filter layer when no layers are present in TOC (#4008)

* Fix 4007 hide filter layer whne no layers are present

* even if a group is present with no layers
* Fix tests

* Fixed issues due to sameURL check in #4004 (#4013)

* Fix #3805 User edit password field retain value across users (#4016)

On editing user, the form use to retain password field across editing
session. This commit fix and enable password field reset on close edit
dialog

*  #3929 Cross layer filter cannot be disabled when filled (#3998)

#3929 Cross layer filter cannot be disabled when filled

* refix #2953 to work along #3929

* [docs] Update User Guide (#3995)

* [docs] Update TOC section

* [docs] filtering layers

* [docs] Search tool updates

* [docs] metadata template for CSW services

* [docs] custom tooltip in layer settings

* [docs] updating 'quering objects' section with coordinates editor

* [docs] updating annotations section

* [docs] layer filter persistence

* [docs] crs selector section (#4012)

* #3622: some fixes to involved documentations (#4018)

* Some updates to the CRS selector documentation (#4019)

* #3817 Fixing documentation (#4023)

* #3817 fixing documentation

* Update docs/developer-guide/map-query-parameters.md

Co-Authored-By: mbarto <maurobartolomeoli@gmail.com>

* Update docs/developer-guide/map-query-parameters.md

Co-Authored-By: mbarto <maurobartolomeoli@gmail.com>

* Update .travis.yml (#4027)

* Remove IN PROGRESS (#4026)

* Close #3025 Add boundary for draggable dialog (#4025)

* Close #3025 Add boundary for draggable dialog

* simplification of dialog boundary solution

* make snapshot dialog draggable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants