2 use Avmaps\Controller\Component\SimpleMapsComponent;
5 * @var \App\View\AppView $this
8 <nav class="large-3 medium-4 columns" id="actions-sidebar">
10 <li class="heading"><?= __('Actions') ?></li>
11 <li><?= $this->Html->link(__('Edit Location'), ['action' => 'edit', $location->id]) ?> </li>
12 <li><?= $this->Form->postLink(__('Delete Location'), ['action' => 'delete', $location->id], ['confirm' => __('Are you sure you want to delete # {0}?', $location->id)]) ?> </li>
13 <li><?= $this->Html->link(__('List Locations'), ['action' => 'index']) ?> </li>
14 <li><?= $this->Html->link(__('New Location'), ['action' => 'add']) ?> </li>
17 <div class="locations view large-9 medium-8 columns content">
18 <h3><?= h($location->name) ?></h3>
19 <table class="vertical-table">
21 <th scope="row"><?= __('Name') ?></th>
22 <td><?= h($location->name) ?></td>
25 <th scope="row"><?= __('Location') ?></th>
26 <td><?= h($location->location) ?></td>
30 //beginning of static map junk...
32 [ 'address' => $location->lat
33 . ',' . $location->lng
38 'color' => $this->MapDisplay->defaultIconColor(),
42 $markers = $this->GoogleMap->staticMarkers($addresses, $marker_options);
45 'center' => $location->lat
46 . ',' . $location->lng,
47 'markers' => $markers,
51 $map = $this->GoogleMap->staticMap($map_options);
55 $this->GoogleMap->finalize();
57 //end static map junk.
63 <th scope="row"><?= __('Lat&Long') ?></th>
64 <td><?= h($location->lat . ',' . $location->lng) ?></td>
67 <th scope="row"><?= __('Zip Code (RGC)') ?></th>
70 $results = SimpleMapsComponent::reverseGeocode($location->lat, $location->lng, [
76 echo h('failed to reverse geocode');
82 <th scope="row"><?= __('Address (RGC)') ?></th>
83 <td><?= h($results[1]) ?></td>
86 <th scope="row"><?= __('Categories') ?></th>
88 <?= $this->Form->control('categories._ids', [
91 'val' => $selectedList,
92 'options' => $categoriesList,