private function getStores()
    {
        $collection = $this->getRetailerCollection();
        $cacheKey   = sprintf("%s_%s", 'checkout_storedelivery', $collection->getStoreId());

        $markers = $this->cache->load($cacheKey);
        if (!$markers) {
            $markers = [];
            /** @var RetailerInterface $retailer */
            foreach ($collection as $retailer) {
                $address    = $retailer->getExtensionAttributes()->getAddress();
                $coords     = $address->getCoordinates();
                $markerData = [
                    'id'           => $retailer->getId(),
                    'latitude'     => $coords->getLatitude(),
                    'longitude'    => $coords->getLongitude(),
                    'name'         => $retailer->getName(),
                    'address'      => $this->addressFormatter->formatAddress($address, AddressFormatter::FORMAT_ONELINE),
                    'url'          => $this->storeLocatorHelper->getRetailerUrl($retailer),
                    'directionUrl' => $this->map->getDirectionUrl($address->getCoordinates()),
                    'setStoreData' => $this->getSetStorePostData($retailer),
                    'addressData'  => $address->getData(),
                ];

                $markerData['schedule'] = array_merge(
                    $this->scheduleHelper->getConfig(),
                    [
                        'calendar'            => $this->scheduleManager->getCalendar($retailer),
                        'openingHours'        => $this->scheduleManager->getWeekOpeningHours($retailer),
                        'specialOpeningHours' => $retailer->getExtensionAttributes()->getSpecialOpeningHours(),
                    ]
                );

                $markers[] = $markerData;
            }

            $markers = json_encode($markers);
            $this->cache->save(
                $markers,
                $cacheKey,
                $collection->getNewEmptyItem()->getCacheTags()
            );
        }

        return json_decode($markers);
    }
private function getStores()
    {
        $collection = $this->getRetailerCollection();
        $cacheKey   = sprintf("%s_%s", 'checkout_storedelivery', $collection->getStoreId());

        $markers = $this->cache->load($cacheKey);
        if (!$markers) {
            $markers = [];
            /** @var RetailerInterface $retailer */
            foreach ($collection as $retailer) {
                $address    = $retailer->getExtensionAttributes()->getAddress();
                $coords     = $address->getCoordinates();
                $markerData = [
                    'id'           => $retailer->getId(),
                    'latitude'     => $coords->getLatitude(),
                    'longitude'    => $coords->getLongitude(),
                    'name'         => $retailer->getName(),
                    'address'      => $this->addressFormatter->formatAddress($address, AddressFormatter::FORMAT_ONELINE),
                    'url'          => $this->storeLocatorHelper->getRetailerUrl($retailer),
                    'directionUrl' => $this->map->getDirectionUrl($address->getCoordinates()),
                    'setStoreData' => $this->getSetStorePostData($retailer),
                    'addressData'  => $address->getData(),
                ];

                $markerData['schedule'] = array_merge(
                    $this->scheduleHelper->getConfig(),
                    [
                        'calendar'            => $this->scheduleManager->getCalendar($retailer),
                        'openingHours'        => $this->scheduleManager->getWeekOpeningHours($retailer),
                        'specialOpeningHours' => $retailer->getExtensionAttributes()->getSpecialOpeningHours(),
                    ]
                );

                $markers[] = $markerData;
            }

            $markers = json_encode($markers);
            $this->cache->save(
                $markers,
                $cacheKey,
                $collection->getNewEmptyItem()->getCacheTags()
            );
        }

        return json_decode($markers);
    }
private function getStores ( ) { $ collection = $ this -> getRetailerCollection ( ) ; $ cacheKey = sprintf ( "%s_%s" , 'checkout_storedelivery' , $ collection -> getStoreId ( ) ) ; $ markers = $ this -> cache -> load ( $ cacheKey ) ; if ( ! $ markers ) { $ markers = [ ] ; /** @var RetailerInterface $retailer */ foreach ( $ collection as $ retailer ) { $ address = $ retailer -> getExtensionAttributes ( ) -> getAddress ( ) ; $ coords = $ address -> getCoordinates ( ) ; $ markerData = [ 'id' => $ retailer -> getId ( ) , 'latitude' => $ coords -> getLatitude ( ) , 'longitude' => $ coords -> getLongitude ( ) , 'name' => $ retailer -> getName ( ) , 'address' => $ this -> addressFormatter -> formatAddress ( $ address , AddressFormatter :: FORMAT_ONELINE ) , 'url' => $ this -> storeLocatorHelper -> getRetailerUrl ( $ retailer ) , 'directionUrl' => $ this -> map -> getDirectionUrl ( $ address -> getCoordinates ( ) ) , 'setStoreData' => $ this -> getSetStorePostData ( $ retailer ) , 'addressData' => $ address -> getData ( ) , ] ; $ markerData [ 'schedule' ] = array_merge ( $ this -> scheduleHelper -> getConfig ( ) , [ 'calendar' => $ this -> scheduleManager -> getCalendar ( $ retailer ) , 'openingHours' => $ this -> scheduleManager -> getWeekOpeningHours ( $ retailer ) , 'specialOpeningHours' => $ retailer -> getExtensionAttributes ( ) -> getSpecialOpeningHours ( ) , ] ) ; $ markers [ ] = $ markerData ; } $ markers = json_encode ( $ markers ) ; $ this -> cache -> save ( $ markers , $ cacheKey , $ collection -> getNewEmptyItem ( ) -> getCacheTags ( ) ) ; } return json_decode ( $ markers ) ; }
List of markers displayed on the map.

@return array
List of markers displayed on the map .