Comment geo feature - GeoSmartCity-CIP/gsc-client GitHub Wiki
###Comment Geo Feature The module provides the choice of clicking over a feature and uploads a comment about it.
This component will create a Bootstrap button. When this button is clicked, it changes the cursor waiting for a map’s point. Then it will make a FeatureInfo call to the indicated layer.
A dialog will be open showing a list of features on the clicked point, see the figure below. The user must select a feature and must write a comment. The Send button will call to the indicated URL with the form information like post-data parameters.
API
API is available on GitHub at src/GeoComment/GeoComment.js.
##Dependencies This library depends on jQuery, OpenLayers and dust.
##Example This is the basic functionality of the geo-comment component. Is necessary to define the layer that contains the features to comment, a CSS selector for the DOM object where the form will be rendered and the URL that will be called passing the form’s data like JSON notation.
var comment=gsc.GeoComment({
map:gsc.map,
container:".botonera",
layer:navarre_cadaster,
url:"service/"
});
Example code can be found here.