Search in sources :

Example 1 with SearchResults

use of org.opennms.features.vaadin.nodemaps.internal.gwt.client.SearchResults in project opennms by OpenNMS.

the class NodeMarkerSearchCallback method doSearch.

protected JSObject doSearch(final String text) {
    logger.log(Level.INFO, "doSearch(" + text + ")");
    final Collection<JSNodeMarker> markers = search(m_markerProvider.getMarkers(), text);
    logger.log(Level.INFO, markers.size() + " markers returned.");
    final SearchResults results = SearchResults.create();
    for (final JSNodeMarker marker : markers) {
        final LatLng latLng = JSNodeMarker.coordinatesToLatLng(marker.getCoordinates());
        results.setProperty(marker.getNodeLabel(), latLng.getJSObject());
    }
    return results;
}
Also used : LatLng(org.discotools.gwt.leaflet.client.types.LatLng) SearchResults(org.opennms.features.vaadin.nodemaps.internal.gwt.client.SearchResults) JSNodeMarker(org.opennms.features.vaadin.nodemaps.internal.gwt.client.JSNodeMarker)

Aggregations

LatLng (org.discotools.gwt.leaflet.client.types.LatLng)1 JSNodeMarker (org.opennms.features.vaadin.nodemaps.internal.gwt.client.JSNodeMarker)1 SearchResults (org.opennms.features.vaadin.nodemaps.internal.gwt.client.SearchResults)1