buildUrl() public static method

This will build the url to google maps for a large map
public static buildUrl ( array $settings, array $markers = [] ) : string
$settings array
$markers array
return string
Example #1
0
 /**
  * Load the data
  */
 protected function loadData()
 {
     $this->item = FrontendLocationModel::get($this->data['id']);
     $this->settings = FrontendLocationModel::getMapSettings($this->data['id']);
     if (empty($this->settings)) {
         $settings = $this->get('fork.settings')->getForModule('Location');
         $this->settings['width'] = $settings['width_widget'];
         $this->settings['height'] = $settings['height_widget'];
         $this->settings['map_type'] = $settings['map_type_widget'];
         $this->settings['zoom_level'] = $settings['zoom_level_widget'];
         $this->settings['center']['lat'] = $this->item['lat'];
         $this->settings['center']['lng'] = $this->item['lng'];
     }
     // no center point given yet, use the first occurrence
     if (!isset($this->settings['center'])) {
         $this->settings['center']['lat'] = $this->item['lat'];
         $this->settings['center']['lng'] = $this->item['lng'];
     }
     $this->settings['maps_url'] = FrontendLocationModel::buildUrl($this->settings, array($this->item));
 }