Hot answers tagged

3

If you already have a GeoServer WMS service, then the most straightforward way is to use the getFeatureInfo capabilities of the WMS protocol. See https://github.com/heigeo/leaflet.wms and http://docs.geoserver.org/latest/en/user/services/wms/reference.html#wms-getfeatureinfo


2

You could use the CartoDB SQL API with CartoDB.js to call the data that you want to display depending on where the user click. In this section of the CartoDB documentation you can find more information about using theCartoDB SQL API within CartoDB.js. In this example you can find how a buffer is created everytime that a user clicks on the map and the points ...


1

you want to create a layer with a single feature so you must use: features: [features[0]]


1

Add an ol.interaction.Select to your map. It allows multi-selects (shift+click), and sends an array of selected and deselected features in its 'select' event. It uses an ol.Collection to store selection results. For instance: var int_select = new ol.interaction.Select({ features: new ol.Collection(); }); map.addInteraction(int_select); int_select.on('...



Only top voted, non community-wiki answers of a minimum length are eligible