Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Any MySQL examples of a Custom Sidebar Example?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Craig Fryer  
View profile  
 More options Nov 5 2012, 12:20 am
From: Craig Fryer <whatsups...@gmail.com>
Date: Sun, 4 Nov 2012 21:20:16 -0800 (PST)
Local: Mon, Nov 5 2012 12:20 am
Subject: Any MySQL examples of a Custom Sidebar Example?

I was wondering if anyone had managed to get the Custom Sidebar working
with a MySQL data base. I am having a bit of trouble getting this to work.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eatc7402  
View profile  
 More options Nov 5 2012, 7:46 pm
From: eatc7402 <eatc7402.55...@gmail.com>
Date: Mon, 5 Nov 2012 16:46:29 -0800 (PST)
Local: Mon, Nov 5 2012 7:46 pm
Subject: Re: Any MySQL examples of a Custom Sidebar Example?

This is done in PHP-MySql-GoogleMaps API V3. The sidebar is totally custom.

http://www.extraalarm.org/St_Paul_Street_Guide/St_Paul_Streets_routes...
Is this what you are looking for?

eatc7402


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Fryer  
View profile  
 More options Nov 6 2012, 3:09 am
From: Craig Fryer <whatsups...@gmail.com>
Date: Tue, 6 Nov 2012 19:09:50 +1100
Local: Tues, Nov 6 2012 3:09 am
Subject: Re: Any MySQL examples of a Custom Sidebar Example?

Yes. Would you be willing to share the basic code you used to do this?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eatc7402  
View profile  
 More options Nov 6 2012, 7:52 pm
From: eatc7402 <eatc7402.55...@gmail.com>
Date: Tue, 6 Nov 2012 16:52:04 -0800 (PST)
Local: Tues, Nov 6 2012 7:52 pm
Subject: Re: Any MySQL examples of a Custom Sidebar Example?

Sure. Pass me an email address for you and I'll send you the code. And then
you can ask questions
if you wish.

eatc7402


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris  
View profile  
 More options Nov 7 2012, 1:38 am
From: Chris <ch...@lesfragnes.com>
Date: Tue, 6 Nov 2012 22:38:05 -0800 (PST)
Local: Wed, Nov 7 2012 1:38 am
Subject: Re: Any MySQL examples of a Custom Sidebar Example?

On Monday, November 5, 2012 6:20:16 AM UTC+1, Craig Fryer wrote:

> I was wondering if anyone had managed to get the Custom Sidebar working
> with a MySQL data base. I am having a bit of trouble getting this to work.

-------------------------------------------
Craig,

This doesn't use the (brilliant) php Googlemap library any more is it has
been reworked to fit in the MODX framework but you can take  look if you
are interested.

http://www.fishingholidaysfrance.com/points-of-interest.html

Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brad Wedell  
View profile  
 More options Nov 7 2012, 1:47 am
From: Brad Wedell <b...@mycnl.com>
Date: Tue, 6 Nov 2012 23:47:02 -0700
Local: Wed, Nov 7 2012 1:47 am
Subject: Re: Any MySQL examples of a Custom Sidebar Example?
Craig,

Did you check out the example at
http://www.bradwedell.com/phpgooglemapapi/demos/advanced_marker_opene...
?  It sounds like you might have and you are receiving errors of some
sort.  Can you describe the issues you're encountering in a bit more
detail?

-Brad


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Fryer  
View profile  
 More options Nov 7 2012, 3:46 am
From: Craig Fryer <whatsups...@gmail.com>
Date: Wed, 7 Nov 2012 19:46:10 +1100
Local: Wed, Nov 7 2012 3:46 am
Subject: Re: Any MySQL examples of a Custom Sidebar Example?

My issue is more an issue with getting the data out of my data base into
the correct format for the API.

This is the example code I have been trying to modify.:
http://www.bradwedell.com/phpgooglemapapi/demos/advanced_marker_opene...

Here is my output:
http://www.gojapango.com/travel/japanese_castles_map_test.html

Here is the code:
<?php
include_once("../includes/GoogleMap.php");
include_once("../includes/JSMin.php");
require ("../includes/databaseconnect.inc");
mysql_select_db("gojapan_hotel",$db);

// ************************* DEFINE MAP ****************

$marker_web_location = "http://www.gojapango.com/images/map_icons/";
$marker_count = '0';

if (($parent_poi_category_id==19) OR ($parent_poi_category_id==22) OR
($parent_poi_category_id==23))
{$zoom_level='12';}
else {$zoom_level='15';}

$MAP_OBJECT = new GoogleMapAPI();
$MAP_OBJECT->_minify_js = isset($_REQUEST["min"])?FALSE:TRUE;
$MAP_OBJECT->type_controls_style="DROPDOWN_MENU";
$MAP_OBJECT->width="470px";
$MAP_OBJECT->height="640px";
$MAP_OBJECT->zoom="$zoom_level";
$MAP_OBJECT->disableSidebar();

$SIDEBAR_HTML = "";

// Selects all the rows in the POI table.
$query = 'SELECT * FROM poi Inner Join poi_subcategory ON
poi.POI_sub_cat_ID = poi_subcategory.POI_sub_cat_ID WHERE
poi.POI_category_ID = 25 AND poi.POI_sub_cat_ID <> 1';
$result = mysql_query($query);

if (!$result)
{
  die('Invalid query: ' . mysql_error());

}

// Iterates through the MySQL results, creating one Placemark for each row.
while ($row = @mysql_fetch_assoc($result))
{
$marker_count = $marker_count + 1;
$map_icon = $marker_web_location.$row['Subcategory_map_icon'];
$DescriptionHTML = '<table
width="220"><tbody><tr><td>'.$row['Description'].'</td></tr></tbody></table >';
$marker_id =
$MAP_OBJECT->addMarkerByCoords($row['Longitude'],$row['Latitude'],$row['Tit le'],$DescriptionHTML,$tooltip="",$map_icon);

    //create an id to be used for the marker opener
    $opener_id = "opener_".$marker_id;

 //append li item to sidebar html
    $SIDEBAR_HTML .= '<li id="$opener_id"><a
href="#">'.$row['Title'].'</a></li>';

    //add marker opener id to map object
    $MAP_OBJECT->addMarkerOpener($marker_id, $opener_id);

}

// ************************* FILE HEADER *******************************

echo   ("
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' '
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<title>JAPANESE CASTLES MAP</title>
<meta name='description' content='Japanese Castles Map shows the location
of $marker_count of the current and former Japanese Castles. This Japanese
Castles Map provides details, links to more information and in some cases
pictures of Japanese Castles' />
<meta name='keywords' content='JAPANESE CASTLES MAP' />
<link href='../templates/gojapango_std.css' rel='stylesheet'
type='text/css' />

<!-- GOOGLE ANALYTICS-->
<script type='text/javascript'>
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-199931-6']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript';
ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : '
http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
  })();
</script>");

echo $MAP_OBJECT->getHeaderJS();
echo $MAP_OBJECT->getMapJS();

echo   ("<style type='text/css'>
    .sidebar, #map{
        float:left;
    }
    .sidebar{
        width:470px;
        border:1px #000 solid;
        margin-left:5px;
    }
    h5{
        margin:0px;
        padding:5px;
        background-color:#F00;
        color:#fff;
    }
    ul, li{
        list-style:none;
        margin:0px;
        padding:0px;
    }
    li{
        border-bottom:1px #000 solid;
        display:block;
    }
    li a{
        display:block;
        padding:5px;
        background-color:#CCC;
    }
    li a:hover{
        background-color:#999;
    }

    li p{
        padding:5px;
    }
</style>

    </head>");

// ************************* BODY *******************************

echo   ("<body class='thrColAbsHdr'>
<div id='container'>
<div id='header'>
<!-- end #header --></div>");

//  ****************** MAIN CONTENT *********************
echo   ("  <div id='mainContent'>
<h1>JAPANESE CASTLES MAP</h1>
        <p class='style3'>Japanese Castles Map shows the location of
$marker_count of the current and former Japanese Castles. This Japanese
Castles Map provides details, links to more information and in some cases
pictures of Japanese Castles</p>

        ");
//********* DISPLAY MAP ***************************************

echo $MAP_OBJECT->printOnLoad();
echo $MAP_OBJECT->printMap();

echo ("<div class='sidebar'>
    <h5>Japanese Castle Sidebar</h5>
    <ul>");

    echo $SIDEBAR_HTML;

echo ("</ul>
    </div>");

echo (" <br />
        <p class='style3'><a href='japanese_castles_map.kml'>Japanese
Castle Map</a> data in the form of Google KML format which allows you to
load these Japanese Castles onto your GPS or Smart phone to assist with
directions.</p>
        <img src='images/DSC05901.jpg' border='0' width='470' height='352'
alt='Japanese Castle' />
        <p class='style_picture'><a href='himeji_castle.html'>Himeji
Castle</a> - the best example of a Japanese Castle</p>
<!-- end #mainContent --></div> ");

// ********* END MAIN CONTENT ***************************************

// ****************** LEFT SIDE BAR ********************* -->
echo ("  <div id='sidebar1'>
    <div align='center'><a href='http://www.gojapango.com'>
      <img src='../images/gojapango_logo_141x100.png' width='160'
height='113' border='0' alt='Japan' /></a>
    </div>

      <a style='text-decoration:none'
href='japanese_castles.html'><h2>JAPANESE CASTLES</h2></a>

            <p class='MenuOn'>
    <a href='japanese_castles_map.html'>Japanese Castles Map</a><br/>
          <a href='japanese_castles_world_heritage.html'>Japanese Castles
World Heritage</a><br/>
    <a href='japanese_castles_list.html'>List of Japanese Castles</a><br/>
          <a href='japanese_castles_history.html'>Japanese Castles
History</a><br/>
    <a href='japanese_castles_region.html'>Japanese Castles by
Region</a><br/>
    <a href='kansai_castles.htm'>Kansai Castles</a><br/>
          <a href='japanese_castles_architecture.html'>Japanese Castles
Architecture</a><br/>
          <br/>
          <strong>Featured Japanese Castles</strong><br/>
  <a href='shiga_hikone_castle.htm'>Hikone Castle</a><br/>
  <a href='himeji_castle.html'>Himeji Castle</a><br/>
  <a href='kyoto_nijo_castle.htm'>Nijo Castle</a><br/>
          <a href='osaka_castle.htm'>Osaka Castle</a><br/>
          </p>

<div id='sidebar1_footer'>
<p class='MenuOn'>
   <a href='traveltojapan.html'><strong>OTHER JAPAN
DESTINATIONS</strong></a><br/>
          <a href='../tokyo/'>Tokyo</a><br/>
          <a href='osaka.htm'>Osaka</a><br/>
          <a href='kyoto.htm'>Kyoto</a><br/>
</p>
          </div>

  <!-- end #sidebar1 --></div>");

// ****************** RIGHT SIDE BAR ********************* -->
echo ("  <div id='sidebar2'>
     <!-- GOOGLE SITE SEARCH -->
<div id='cse-search-form' style='width: 100%;'>Loading</div>
<script src='http://www.google.com/jsapi' type='text/javascript'></script>
<script type='text/javascript'>
  google.load('search', '1', {language : 'en'});
  google.setOnLoadCallback(function() {
    var customSearchOptions = {};
    var imageSearchOptions = {};
    imageSearchOptions['layout'] = google.search.ImageSearch.LAYOUT_POPUP;
    customSearchOptions['enableImageSearch'] = true;
    customSearchOptions['imageSearchOptions'] = imageSearchOptions;
    customSearchOptions['adoptions'] = {'layout': 'noTop'};
    var customSearchControl = new google.search.CustomSearchControl(
      '008091552920632978614:yl12fes0l-0', customSearchOptions);

customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESU LTSET);
    var options = new google.search.DrawOptions();
    options.enableSearchboxOnly('
http://www.gojapango.com/includes/search.htm');
    customSearchControl.draw('cse-search-form', options);
  }, true);
</script>

<!-- AddThis Button BEGIN -->
<div class='addthis_toolbox addthis_default_style '>
<a class='addthis_button_facebook_like' fb:like:layout='button_count'></a>
<a class='addthis_button_tweet'></a>
<a class='addthis_counter addthis_pill_style'></a><br />
<p>Follow GoJapanGo for Daily Pictures, Tips
<a class='addthis_button_facebook_follow'
addthis:userid='japaneselifestyle'></a></p>
</div>
<script type='text/javascript' src='
http://s7.addthis.com/js/250/addthis_widget.js#pubid=mimarket'></script>
<!-- AddThis Button END -->

<br />

  <a href='../travel/japan_hotels.htm'><img
src='../advert/hotels_300x250.gif' alt='Japan Hotels' width='300'
height='250' border='0' /></a><br /><br />");

echo ("  <!-- end #sidebar2 --></div>");

// ****************** FOOTER *********************
echo ("  <div id='footer'>
  <table width='90%' border='0' cellspacing='0' cellpadding='0'>
      <tr>
        <th valign='top' scope='col'>
        <p class='MenuSmallOn'>
        <a href='../culture/culture.html'>Japanese Culture</a><br/>
        <a href='../japan_picture/index.php'>Japan Pictures</a><br/>
        <a href='map_of_japan.html'>Japan Map</a><br/>
        <a href='../japanese_friends/japanese_girls.html'>Japanese
Girls</a><br/>
        <a href='../japanese_friends/japanese_dating.htm'>Japanese
Dating</a><br/></p>
    </th>
        <th valign='top' scope='col'>
        <p class='MenuSmallOn'>
        <a
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »