Proposals_GenericSearch - mapfish/mapfish GitHub Wiki
This page describes a generic search system, fell free to add your comments !
##. Tooltips
The tooltip is triggered when the user hover or click on the map.
###. client part Existing code:
- widget: browser:/trunk/MapFish/client/mfbase/mapfish/widgets/search/Point.js
- core: browser:/trunk/MapFish/client/mfbase/mapfish/core/Searcher/XY.js
Demo:
Requirements:
- Recenter to a specific feature's geometry
- Highlight matching features (vector highlight, add a marker on the feature, ...)
- Display results in an OpenLayers.Popup, an ExtJs widget, or anywhere on the page (innerHTML)
###. server part Request parameters (json format):
- lang - Output language (eg: 'fr', 'en'). If not present, the controller should take the browser language (Accept-Language)
- layers - List of visible layers (eg: 'a,b,c')
Requirements:
- Return (Geo)Json and/or html string.
- Highlight matching feature, WMS highlight or vector highlight
- html output: The user should be able to create a custom html template for each layer type. By default an unique template is used.
Configuration:
- for each layer: specify the model (sqlalchemy), the returned attributs and the template name.
##. form search
###. client part Existing code:
- core : browser:/trunk/MapFish/client/mfbase/mapfish/core/Searcher/Form.js
Demo:
Requirements:
- same as tooltips
###. server part request parameters:
- lang
- form values - the keys/values from the html form.
- bbox - Current map extent, used to restrict the search. Requirements:
- same as tooltips