3 * @var \App\View\AppView $this
7 Log::debug('[got into map template]');
9 <nav class="large-3 medium-4 columns" id="actions-sidebar">
11 <li class="heading"><?= __('Actions') ?></li>
12 <li><?= $this->Html->link(__('View Category'), ['action' => 'view', $category->id]) ?></li>
13 <li><?= $this->Html->link(__('Edit Category'), ['action' => 'edit', $category->id]) ?> </li>
14 <li><?= $this->Form->postLink(__('Delete Category'), ['action' => 'delete', $category->id], ['confirm' => __('Are you sure you want to delete # {0}?', $category->id)]) ?> </li>
15 <li><?= $this->Html->link(__('List Categories'), ['action' => 'index']) ?> </li>
16 <li><?= $this->Html->link(__('New Category'), ['action' => 'add']) ?> </li>
19 <div class="categories view large-9 medium-8 columns content">
20 <h3><?= h($category->name) ?></h3>
21 <table class="vertical-table">
23 <th scope="row"><?= __('Name') ?></th>
24 <td><?= h($category->name) ?></td>
27 <th scope="row"><?= __('Map of this Category\'s Locations') ?></th>
31 // dynamic map preparation below.
33 // see if clustering is turned on.
34 $clustering = in_array ( 'clustering', $selectedList );
36 // list options we want to override or add for the map.
38 'autoCenter' => true, // automatically encompass markers.
39 'clustering' => $clustering,
42 // provide the element with all the info it needs to set up the map.
44 'map_options' => $map_options,
45 'map_colors' => 'avmaps/js/sg2_map_colors.js',
46 'the_map' => $this->GoogleMap,
47 // we want to include the category ID when making ajax calls.
48 'ajax_options' => '{ category: "' . $category->id . '"}',
49 'default_options' => '{
50 iconColor: "' . $this->MapDisplay->defaultIconColor() . '",
51 json_provider: "/categories.json",
55 echo $this->element('Avmaps.google_map', $element_options);
57 // end of dynamic map preparation.
64 <th scope="row"><?= __('View Options') ?></th>
66 <?= $this->Form->create($category) ?>
68 echo $this->Form->control ( 'view_options._ids', [
71 'val' => $selectedList,
73 'clustering' => 'clustering'
78 <?= $this->Form->button(__('Modify View')) ?>
79 <?= $this->Form->end() ?>