Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 61ff7718

Přidáno uživatelem Jakub Vašta před asi 4 roky(ů)

Re #8092, Re #8085
+ data source points location layer - circles
+ total number of activity in aggregation

Zobrazit rozdíly:

website/src/OpenDataManager.php
29 29
    }
30 30

  
31 31
    public function getAvailableCollections() {
32
        $openData = $this->manager->executeQuery('open-data-db.DATASETS', new Query([], ['projection' => ['name' => 1, '_id' => 0]]));
32
        $openData = $this->manager->executeQuery('open-data-db.DATASETS', new Query([], ['projection' => ['key-name' => 1, 'display-name' => 1, '_id' => 0]]));
33 33

  
34 34
        $openData->setTypeMap([
35 35
            'array' => 'array',
......
45 45
        $available = $this->getAvailableCollections();
46 46
        $index = 0;
47 47
        foreach ($available as $key => $value) {
48
            if ($this->isCollectionAvailable($value['name'], $date) && false == array_key_exists($value['name'], $availableInDate)) {
49
                $availableInDate[$value['name']] = $value['name'];
48
            if ($this->isCollectionAvailable($value['key-name'], $date) && false == array_key_exists($value['key-name'], $availableInDate)) {
49
                $availableInDate[$value['key-name']] = $value['display-name'];
50 50
            }
51 51
        }
52 52

  
......
87 87

  
88 88
        return empty($result) ? 1 : $result[0]['number'];
89 89
    }
90

  
91
    public function getDataSourcePositions($name = 'NONE') {
92
        $positions = $this->manager->executeQuery('open-data-db.'.$name.'DEVICES', new Query([], []));
93

  
94
        $positions->setTypeMap([
95
            'array' => 'array',
96
            'document' => 'array',
97
            'root' => 'array',
98
        ]);
99

  
100
        return $positions->toArray();
101
    }
90 102
}

Také k dispozici: Unified diff