qgis / qwc2-demo-app

QWC2 demo application
Other
240 stars 149 forks source link

using the startup marker in relation to the fulltext search service #492

Open danceb opened 8 months ago

danceb commented 8 months ago

Would be nice, If one can place the startup marker while using an url with parameters for the fulltext search service like: https://your.webgis.com/?hp=<search product>&hf=<search filter>&ht=<search text>&hc=1

In this case, hc=1 is added to the resulting url indeed, but not shown within the map.

manisandro commented 8 months ago

It should work if you also supply c=x,y alongside hc=1.

danceb commented 8 months ago

If I am using c and hc the ht parameter is ignored and I don't getting the Text highlight in the map. In addition the benefit of this approach here is in my opinion, that I don't have to know the center coords, as the fulltext search service zooms to the feature itself. While supplying c=x,y I don't have to use hp and hf.

manisandro commented 8 months ago

Hmm I don't see any indication in the code that ht is ignored if either c or hc is set?

Also, ht, used together with hp, formulates a search query, and if that returns a unique result, this result is highlighted.

In short, what you'd like is that in addition to highlighting the feature, hc=1 also sets a pin in the center of the map? The one potential issue I see is that for many geometries, the center the highlighter geometry might actually not cover the center of the map, hence the pin would not be attached to the geometry.

danceb commented 8 months ago

In short, what you'd like is that in addition to highlighting the feature, hc=1 also sets a pin in the center of the map?

yes, thats exactly what I tried to achieve.

the pin would not be attached to the geometry.

yes, I see this. But this is not really an issue regarding the search via hp and ht. This is more a question if it make sense to zoom to a geometry and set a marker in general. So for polygons and lines maybe it isn't that useful, but for points it works really well.