diff --git a/application/controllers/front/page.php b/application/controllers/front/page.php index 48fd849..cffeff0 100644 --- a/application/controllers/front/page.php +++ b/application/controllers/front/page.php @@ -68,49 +68,15 @@ class Page_Controller extends Base_Front_Controller $this->view->meta_keywords = $page->meta_keywords; } - $gmap = new Gmap('gmap', array - ( - #'ScrollWheelZoom' => true, - 'DoubleClickZoom' => true, - 'ContinuousZoom' => true, - #'InfoWindow' => true, - )); - $center = Kohana::config('application.gmaps.center'); - // Set the map center point - $gmap->center($center['lat'], $center['lon'], $center['zoom'])->controls('small'); - - // Add a custom marker icon -/* $gmap->add_icon('tinyIcon', array - ( - 'image' => 'http://labs.google.com/ridefinder/images/mm_20_red.png', - 'shadow' => 'http://labs.google.com/ridefinder/images/mm_20_shadow.png', - 'iconSize' => array('12', '20'), - 'shadowSize' => array('22', '20'), - 'iconAnchor' => array('6', '20'), - 'infoWindowAnchor' => array('6', '20') - )); -*/ - $gmap->add_icon('markerIcon', array - ( - 'image' => 'http://www.google.com/intl/en_ALL/mapfiles/marker.png', - 'shadow' => 'http://www.google.com/intl/en_ALL/mapfiles/shadow50.png', - 'iconSize' => array('20', '34'), - 'shadowSize' => array('37', '34'), - 'iconAnchor' => array('10', '34'), - 'infoWindowAnchor' => array('10', '34') - )); - $marker = Kohana::config('application.gmaps.marker'); - // Add a new marker - $gmap->add_marker($marker['lat'], $marker['lon'], $marker['html'], array('icon' => 'markerIcon', 'title' => $marker['title'])); $page_view->page = $page; + $page_view->map_center = $center; + $page_view->map_marker = $marker; $this->view->content = $page_view; - $this->view->api_url = Gmap::api_url(); - $this->view->gmap = $gmap->render(); $this->view->message = $this->session->get('message'); $this->view->render(true); } -} \ No newline at end of file +} diff --git a/application/views/front/page_contact.php b/application/views/front/page_contact.php index e72c877..7f1f082 100644 --- a/application/views/front/page_contact.php +++ b/application/views/front/page_contact.php @@ -4,6 +4,27 @@