Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Search that returns geometries

Has anyone developed a search mechanism for either Geospatial Portal or Consumer Portal that behaves as follows:

 

  1. User enters a search string into a field.
  2. As the user types search results start to display in a drop-down list and results are shown on the map.
  3. The user selects a search result which zooms to the extent of the geometry and the gemetry is highlighted/selected on the map to clearly show which object has been selected by the search

In Geospatial Portal the search tab control meets requirement 1 & 2 but when querying a WFS-G only the centre point of the result is displayed on the map. The full geometry is not displayed. All searches go to a defined zoom scale which may not be appropriate for the search result.

 

In Consumer Portal the search result again is a centroid but does zoom to the extent of the geometry (defined in search configuration) but the selected object is not highlighted/selected.

 

I am hopeful that someone may have developed something that provides this type of functionality or has some ideas on how it could be achieved?

 

Thanks,

Colin

Super Contributor
Posts: 360
Registered: ‎10-12-2015

Re: Search that returns geometries

Hi Colin,

 

We did a bespoke extension to the standard Consumer Portal search that highlights geometry being searched.

Will touch base offline to see if it is a fit.

 

Shaun

Contributor
Posts: 28
Registered: ‎01-14-2016

Re: Search that returns geometries

Dear Shaun,

 

Does your algorithm highlightes the result of the search request in a map window?

Sound interesting.

 

 

Thanks,

Kirill

Super Contributor
Posts: 360
Registered: ‎10-12-2015

Re: Search that returns geometries

Hi Krill,

 

How current implementation works:

 

  • User does standard search in consumer portal
  • Normal search result pins are shown in map window 
  • User clicks on an search result pin
  • Bespoke component is then envoked that fits the map extent to the extent of the underlying search result geometry (e.g. property) and the vector of the search result geometry is displayed as an overlay creating an highlighted effect.

The implementation is presently per search definition. i.e. it does not automatically implement for all consumer portal search definitions, you have to manually setup each search that needs the full fit/highlight (typically a property search).

The implementation retrieves the GeoJSON from an WFS request (in our case we actually download all the GeoJSON to a local directory every night - at the time we implemented webmap was in early stages of supporting GeoJSON so we converted from GML to GeoJSON, with webMap WFS now natively supporting GeoJSON if I was doing it again it would be a direct live call to the WFS). 

 

Looks like I neglected to add the idea to the community product ideas section - must get around to that.

Contributor
Posts: 28
Registered: ‎01-14-2016

Re: Search that returns geometries

Hi Shaun,

 

 

We found your solution very intresting.

My developer asks if it possible to share a source code or a part of the code responsible for: 

"Bespoke component is then envoked that fits the map extent to the extent of the underlying search result geometry (e.g. property) and the vector of the search result geometry is displayed as an overlay creating an highlighted effect"

 

Would be very glad for your support.

 

 

Thanks,

Kirill

kir.zernov@gmail.com

 

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.