From: Steve Sutton Date: Thu, 10 Jul 2014 18:37:01 +0000 (-0400) Subject: Include static page for course maps X-Git-Tag: v1.0^2~31 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=dbda502cf9afb61522b49894a5ee2d691cae62d8;p=web%2FBigFore.git Include static page for course maps Taken from their old site. --- diff --git a/Toolkit/Page.php b/Toolkit/Page.php index 97853a7..f21fb14 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -819,7 +819,7 @@ class Toolkit_Page $sql = " SELECT id FROM rotatingimages.application - WHERE page = " . $this->_catid; + WHERE page = " . $this->topParentId; $appId = $dbh->query($sql)->fetchColumn(); if ($appId) { diff --git a/assets/blacklake.gif b/assets/blacklake.gif new file mode 100755 index 0000000..d1649ef Binary files /dev/null and b/assets/blacklake.gif differ diff --git a/assets/dunmaglas.gif b/assets/dunmaglas.gif new file mode 100755 index 0000000..3cee2b7 Binary files /dev/null and b/assets/dunmaglas.gif differ diff --git a/assets/hamletvillage.gif b/assets/hamletvillage.gif new file mode 100755 index 0000000..76d4e85 Binary files /dev/null and b/assets/hamletvillage.gif differ diff --git a/assets/hiddenriver.gif b/assets/hiddenriver.gif new file mode 100755 index 0000000..9d8ca12 Binary files /dev/null and b/assets/hiddenriver.gif differ diff --git a/assets/littletraverse.gif b/assets/littletraverse.gif new file mode 100755 index 0000000..3442eb6 Binary files /dev/null and b/assets/littletraverse.gif differ diff --git a/assets/troutcreek.gif b/assets/troutcreek.gif new file mode 100755 index 0000000..3bbd791 Binary files /dev/null and b/assets/troutcreek.gif differ diff --git a/libjs/coursesMashUp.js b/libjs/coursesMashUp.js new file mode 100644 index 0000000..c22519f --- /dev/null +++ b/libjs/coursesMashUp.js @@ -0,0 +1,163 @@ +/* ============================== */ +// Google Maps mashup for bigfore golf courses +// +// Gaslight Media (c) 2008 +// Author: Jamie Kahgee +/* ============================== */ +var GMaps = +{ + centerLat: 45.356005, + centerLong: -84.690857, + startZoom: 9, + + init: function() + { + if (GBrowserIsCompatible()) + { + var map = new GMap2($('map')); + var loc = new GLatLng(GMaps.centerLat, GMaps.centerLong); + var marker; + var base_url = $('mapsURL').value + 'assets/'; + map.addControl(new GSmallMapControl()); + map.addControl(new GMapTypeControl()); + map.setCenter(loc, GMaps.startZoom); + + var markers = [ + { + 'lat' : 45.292304, + 'long' : -85.160198, + 'name' : 'Dunmaglas', + 'func' : GMaps.dunmaglas, + 'icon' : base_url + 'dunmaglas.png' + }, + { + 'lat' : 45.295177, + 'long' : -85.26412, + 'name' : 'Hidden River', + 'func' : GMaps.hiddenRiver, + 'icon' : base_url + 'hiddenriver.png' + }, + { + 'lat' : 45.32504, + 'long' : -84.218519, + 'name' : 'Black Lake Golf Club', + 'func' : GMaps.blackLake, + 'icon' : base_url + 'blacklake.png' + }, + { + 'lat' : 45.442706, + 'long' : -84.896482, + 'name' : 'Little Traverse Bay Golf Club', + 'func' : GMaps.littleTraverse, + 'icon' : base_url + 'littletraverse.png' + }, + { + 'lat' : 45.471746, + 'long' : -84.914849, + 'name' : 'Hamlet Village', + 'func' : GMaps.hamletVillage, + 'icon' : base_url + 'hamletvillage.png' + }, + { + 'lat' : 45.482054, + 'long' : -84.914336, + 'name' : 'Trout Creek', + 'func' : GMaps.troutCreek, + 'icon' : base_url + 'troutcreek.png' + } + ]; + + markers.each(function(n) { + loc = new GLatLng(n.lat, n.long); + if (n.icon != '') + { + var icon = new GIcon(); + icon.image = n.icon; + icon.shadow = base_url + 'shadow-old.png'; + icon.iconSize = new GSize(20, 34); + icon.iconAnchor = new GPoint(14, 25); + icon.infoWindowAnchor = new GPoint(14, 14); + marker = new GMarker(loc, icon); + } + else + { + marker = new GMarker(loc); + } + map.addOverlay(marker); + GEvent.addListener(marker, 'click', n['func']); + }); + } + }, + + denit: function() + { + GUnload(); + }, + + dunmaglas: function(event) + { + var title = new Element('h2', {'class': 'title'}).update('Dunmaglas Golf Course'); + var address = new Element('div', {'class': 'address'}).update('9031 Boyne City Rd
Charlevoix, MI 49720
(231) 547-4653'); + var link = new Element('a', {target: '_blank', href: 'http://maps.google.com/maps?f=q&hl=en&geocode=&q=9031+Boyne+City+Rd,+Charlevoix,+MI+49720&sll=45.417025,-84.267797&sspn=0.007441,0.014119&ie=UTF8&ll=45.292928,-85.160265&spn=0.007457,0.014119&z=16&iwloc=addr'}).update('Get Directions'); + + var wrapper = new Element('div').insert({bottom: title}).insert({bottom: address}).insert({bottom: link}); + this.openInfoWindowHtml(wrapper); + }, + + hiddenRiver: function(event) + { + var title = new Element('h2', {'class': 'title'}).update('Belvedere Golf Club'); + var address = new Element('div', {'class': 'address'}).update('5731 Marion Center Rd
Charlevoix, MI 49720
(866) 547-2611'); + var link = new Element('a', {target: '_blank', href: 'http://g.co/maps/qyp99'}).update('Get Directions'); + + var wrapper = new Element('div').insert({bottom: title}).insert({bottom: address}).insert({bottom: link}); + this.openInfoWindowHtml(wrapper); + }, + + blackLake: function(event) + { + var title = new Element('h2', {'class': 'title'}).update('Black Lake Golf Club'); + var address = new Element('div', {'class': 'address'}).update('2800 Maxon Rd
Onaway, MI 49765
(989) 733-4653'); + var link = new Element('a', {target: '_blank', href: 'http://maps.google.com/maps?f=q&hl=en&geocode=&q=2800+Maxon+Road,+Onaway,+MI+49765&sll=45.508332,-84.758642&sspn=0.007429,0.014119&ie=UTF8&ll=45.417025,-84.267797&spn=0.007441,0.014119&z=16&iwloc=addr'}).update('Get Directions'); + + var wrapper = new Element('div').insert({bottom: title}).insert({bottom: address}).insert({bottom: link}); + this.openInfoWindowHtml(wrapper); + }, + + littleTraverse: function(event) + { + var title = new Element('h2', {'class': 'title'}).update('Little Traverse Bay Golf Club'); + var address = new Element('div', {'class': 'address'}).update('995 Hideaway Valley Dr
Harbor Springs, MI 49740
(231) 526-6200'); + var link = new Element('a', {target: '_blank', href: 'http://maps.google.com/maps?f=q&hl=en&geocode=&q=995+Hideaway+Valley+Dr,+Harbor+Springs,+MI+49740&sll=45.292928,-85.160265&sspn=0.007457,0.014119&ie=UTF8&ll=45.443256,-84.895585&spn=0.007437,0.014119&z=16&iwloc=addr'}).update('Get Directions'); + + var wrapper = new Element('div').insert({bottom: title}).insert({bottom: address}).insert({bottom: link}); + this.openInfoWindowHtml(wrapper); + }, + + hamletVillage: function(event) + { + var title = new Element('h2', {'class': 'title'}).update('Hamlet Village'); + var address = new Element('div', {'class': 'address'}).update('5484 Pleasantview Rd
Harbor Springs, MI 49740
(231) 526-2641'); + var link = new Element('a', {target: '_blank', href: 'http://maps.google.com/maps?f=q&hl=en&geocode=&q=5484+Pleasantview+Rd,+Harbor+Springs,+MI+49740&sll=45.443256,-84.895585&sspn=0.007437,0.014119&ie=UTF8&ll=45.472471,-84.914682&spn=0.007433,0.014119&z=16&iwloc=addr'}).update('Get Directions'); + + var wrapper = new Element('div').insert({bottom: title}).insert({bottom: address}).insert({bottom: link}); + this.openInfoWindowHtml(wrapper); + }, + + troutCreek: function(event) + { + var title = new Element('h2', {'class': 'title'}).update('Trout Creek'); + var address = new Element('div', {'class': 'address'}).update('4749 S Pleasantview Rd
Harbor Springs, MI 49740
(231) 526-2148'); + var link = new Element('a', {target: '_blank', href: 'http://maps.google.com/maps?f=q&hl=en&geocode=&q=4749+S+Pleasantview+Rd,+Harbor+Springs,+MI+49740&sll=45.472471,-84.914682&sspn=0.007433,0.014119&ie=UTF8&ll=45.483018,-84.91451&spn=0.007432,0.014119&z=16&iwloc=addr'}).update('Get Directions'); + + var wrapper = new Element('div').insert({bottom: title}).insert({bottom: address}).insert({bottom: link}); + this.openInfoWindowHtml(wrapper); + } +}; + +//Event.observe(window, 'load', GMaps.init); +//Event.observe(window, 'unload', GMaps.denit); + +$(function(){ + GMaps.init; +}); \ No newline at end of file diff --git a/static/11.phtml b/static/11.phtml new file mode 100644 index 0000000..29954a0 --- /dev/null +++ b/static/11.phtml @@ -0,0 +1,28 @@ + + + + 'dunmaglas.gif', + 'Belvedere Golf Club' => 'hiddenriver.gif', + 'Trout Creek' => 'troutcreek.gif', + 'Little Travese Bay Golf Club' => 'littletraverse.gif', + 'Hamlet Village' => 'hamletvillage.gif', + 'Black Lake Golf Club' => 'blacklake.gif', +); + +foreach ($courses as $k => $v) { + $url = BASE_URL; + $markers[] = <<<_OUT +\n + {$k}\n + {$k}\n + +_OUT; +} +for ($i = 0; $i < count($markers); ++$i) { + $rows[] = "{$markers[$i++]}\n{$markers[$i]}"; +} +echo '' . implode("\n", $rows) . "
"; +?> +