Search in sources :

Example 11 with GetAdminEntities

use of org.activityinfo.legacy.shared.command.GetAdminEntities in project activityinfo by bedatadriven.

the class PolygonLayerGenerator method queryBounds.

private void queryBounds(DispatcherSync dispatcher, Filter layerFilter) {
    GetAdminEntities query = new GetAdminEntities();
    query.setLevelId(layer.getAdminLevelId());
    AdminEntityResult entities = dispatcher.execute(query);
    for (AdminEntityDTO entity : entities.getData()) {
        if (entity.hasBounds()) {
            AdminMarker marker = new AdminMarker(entity);
            overlay.addPolygon(marker);
        }
    }
}
Also used : AdminEntityDTO(org.activityinfo.legacy.shared.model.AdminEntityDTO) AdminMarker(org.activityinfo.legacy.shared.reports.content.AdminMarker) AdminEntityResult(org.activityinfo.legacy.shared.command.result.AdminEntityResult) GetAdminEntities(org.activityinfo.legacy.shared.command.GetAdminEntities)

Aggregations

GetAdminEntities (org.activityinfo.legacy.shared.command.GetAdminEntities)11 AdminEntityResult (org.activityinfo.legacy.shared.command.result.AdminEntityResult)8 Test (org.junit.Test)7 AdminEntityDTO (org.activityinfo.legacy.shared.model.AdminEntityDTO)3 TreeStore (com.extjs.gxt.ui.client.store.TreeStore)1 GetSchema (org.activityinfo.legacy.shared.command.GetSchema)1 ListResult (org.activityinfo.legacy.shared.command.result.ListResult)1 AdminMarker (org.activityinfo.legacy.shared.reports.content.AdminMarker)1 MockEventBus (org.activityinfo.ui.client.MockEventBus)1 DispatcherStub (org.activityinfo.ui.client.dispatch.DispatcherStub)1 AdminGroupingModel (org.activityinfo.ui.client.page.entry.grouping.AdminGroupingModel)1 Before (org.junit.Before)1