public function map($locations, $config = array())
    {
        if($locations instanceof ComLocationsDomainEntityLocation){
            $locations = array($locations);
        }

        $data = array();

        foreach($locations as $location){
            $data[] = array(
                'longitude' => $location->longitude,
                'latitude' => $location->latitude,
                'name' => $location->name,
                'url' => route($location->getURL())
            );
        }

        $config['locations'] = htmlspecialchars(json_encode($data), ENT_QUOTES);
        $config['service'] = get_config_value('locations.service', 'google');

        return $this->_render('map_'.$config['service'], $config);
    }