use of org.discotools.gwt.leaflet.client.jsobject.JSObject in project opennms by OpenNMS.
the class MarkerCluster method getAllChildMarkers.
public final List<JSNodeMarker> getAllChildMarkers() {
final List<JSNodeMarker> markers = new ArrayList<JSNodeMarker>();
final JsArray<JSObject> markerObjects = getMarkerObjects();
if (markerObjects == null)
return markers;
for (int i = 0; i < markerObjects.length(); i++) {
final JSObject markerObject = markerObjects.get(i);
final JSNodeMarker marker = new JSNodeMarker(markerObject);
markers.add(marker);
}
return markers;
}
use of org.discotools.gwt.leaflet.client.jsobject.JSObject in project opennms by OpenNMS.
the class JSNodeMarker method setCategories.
public void setCategories(final String[] categories) {
final JsArrayString array = JsArrayString.createArray().cast();
for (final String category : categories) {
array.push(category);
}
final JSObject jsObject = array.cast();
getJSObject().setProperty(Property.CATEGORIES, jsObject);
}
use of org.discotools.gwt.leaflet.client.jsobject.JSObject in project opennms by OpenNMS.
the class MarkerClusterGroup method addLayers.
public MarkerClusterGroup addLayers(final List<ILayer> layers) {
final JsArray<JSObject> layerArray = JsArray.createArray().cast();
for (final ILayer marker : layers) {
layerArray.push(marker.getJSObject());
}
MarkerClusterGroupImpl.addLayers(getJSObject(), layerArray);
return this;
}
Aggregations