close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Displaying only 11 records

Thread began 10/05/2014 6:15 pm by LWag48648773 | Last modified 10/29/2014 5:59 pm by LWag48648773 | 1804 views | 8 replies |

LWag48648773

Displaying only 11 records

Hi,
I thought I re-asked this question but I don't see it so to make sure, I'm asking again.
My map is only displaying 11 records. My recordset displays all of them but I only get 11 pointers on the map.
Is this a known issue and what do I do about it?
Thank you,
Laura

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

LWag48648773

Thanks Jason. This is the page. I just re-did the map again to make sure. You can see the bars listed at the top. Many of these addresses are made up but that doesn't seem to be an issue because many of the made-up ones are showing up. It's always the same - when I get to 11 pointers, it quits but yet all the bars are listed above the map.
<moved to private>

Thank you,
Laura

Sign in to reply to this post

Jason ByrnesWebAssist

in the webassist/google_javascript/wagmp_map_2.php file, i fixed the probelm by editing the searchCache function:


function searchCache(searchStr, zip) {
var xmlDoc = null;
var coordinates = '';
xmlDoc = getHTTPObject();
if(xmlDoc) {
xmlDoc.onreadystatechange = function() {
if(xmlDoc.readyState == 4) {
var x = xmlDoc.responseXML.getElementsByTagName("geocode_entry");
var geocode, id;
searchStr = searchStr.replace(/,/g, ''); //remove commas
for (i=0; i < x.length; i++) {
id = x[i].getAttribute("ID");
if (id == searchStr) {
coordinates = x[i].getElementsByTagName("geocode")[0].childNodes[0].nodeValue;
return coordinates;
}
}
}
}
xmlDoc.open("GET", "webassist/_promaps_cache/_promaps_geocache.xml", false);
xmlDoc.send(null);
} else {
return '';
}
return '';
}



to:

function searchCache(searchStr, zip) {
var xmlDoc = null;
var coordinates = '';
xmlDoc = getHTTPObject();
if(xmlDoc) {
xmlDoc.onreadystatechange = function() {
if(xmlDoc.readyState == 4) {
var x = xmlDoc.responseXML.getElementsByTagName("geocode_entry");
var geocode, id;
searchStr = searchStr.replace(/,/g, ''); //remove commas
for (i=0; i < x.length; i++) {
id = x[i].getAttribute("ID");
if (id == searchStr) {
coordinates = x[i].getElementsByTagName("geocode")[0].childNodes[0].nodeValue;
return coordinates;
}
}
}
}
xmlDoc.open("GET", "webassist/_promaps_cache/_promaps_geocache.xml", false);
xmlDoc.send(null);
} else {
return '';
}
return coordinates;
}



basicly, i changed the second to last line:
return '';

to:
return coordinates;

i have logged a bug for this to have it corrected in the next update.

Sign in to reply to this post

LWag48648773

Thank you Jason. When I make the other maps, I'll just change that bit of code.
However, now I'm still missing one record. I should have 18 for Sheboygan but only 17 pins are on the map.

While I'm here, is there a way to use a custom marker graphic rather than a pin or star?
And can I make it so that the little box doesn't pop up automatically for one record? It looks like the last record always show the pop-up info. Is it possible to have them pop-up on mouse-over rather than click? I didn't see an option for that in the wizard.

Thank you,
Laura

Sign in to reply to this post

Jason ByrnesWebAssist

Which one is missing?

The code that sets the pins on the map is in the map file:

image: new google.maps.MarkerImage('plugins/webassist/google_javascript/images/pushpin_deepjungle.png', new google.maps.Size(40,41), new google.maps.Point(0,0), new google.maps.Point(7,38)),
shadow: new google.maps.MarkerImage('plugins/webassist/google_javascript/images/pushpin_shadow.png', new google.maps.Size(40,41), new google.maps.Point(0,0), new google.maps.Point(7,38)),


you can change that to use your own images.

to prevent the default info window opening, you can remove the following code:


// open info window for default address
if (isDefault) {
infowindow.open(map2,marker);
setTimeout("google.maps.event.trigger(wagmp_map_2_obj.markers[" + wagmp_map_2_obj.markers.length + "], 'click')",1000);
//map2.setCenter(point);
}


It is not supported to open on hover rather than click, but require editing this code:

google.maps.event.addListener(marker, 'click', function() {
for (var x=0; x < wagmp_map_2_obj.infowindows.length; x++) {
wagmp_map_2_obj.infowindows[x].close();
}
infowindow.open(map2,marker);
});


to change the listener.

Sign in to reply to this post

LWag48648773

Thanks Jason for all the tips on customizing. I'm not sure if I'm missing a map marker or not. I have to get the actual data in and stop messing with fake addresses. I think they may all be showing but it just wasn't finding one because I made up the address.
Thanks again!

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome.

Sign in to reply to this post

LWag48648773

spry tabbed panels conflict with map

I finally got back to this Jason. Getting rid of the pop-up window worked. I didn't try to change the marker image yet. I might try that when I have more time.

Now a new problem. I finally got spry tabbed panels to work dynamically. It's a bit clunky but it works.
They were working great until I put the map back on the page. Now there is an empty record showing up before the 3 good records.
http://moonshinenetwork.com/bars-sheboygan.php

Do you have any idea why that might be?

Here is code. If you need more access, let me know. Thank you so much!

<?php require_once('Connections/connMoonshine.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_connMoonshine, $connMoonshine);
$query_rsBars = "SELECT * FROM Bars WHERE county = 'Sheboygan' ORDER BY bar_name ASC";
$rsBars = mysql_query($query_rsBars, $connMoonshine) or die(mysql_error());
$row_rsBars = mysql_fetch_assoc($rsBars);
$totalRows_rsBars = mysql_num_rows($rsBars);
?>
<!doctype html>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta charset="utf-8">
<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Moonshine Network</title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/menu.css">
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script type="text/javascript">
/*wagmp*/
<?php include("webassist/google_javascript/wagmp_map_1.php"); ?>
</script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&key=AIzaSyBk_QNQvUEnfi3WRseIjwiTFIQUXJHIOik">/*wagmp*/</script>
</head>
<body>
<div id="wrapper100">
<div class="head_line"></div>
<div class="wrapper">
<div class="logo"><?php require_once('includes/logo.php'); ?>
<!-- end logo --></div>
<!-- head_block --><div class="head_block">
<div class="nav-top">
<?php require_once('includes/nav-top.php'); ?>
<!-- end nav --></div>
<div class="header">
<div class="tag"><?php require_once('includes/tag.php'); ?>
<!-- end phone --></div>
<!-- //header --></div>
<div class="clear"></div>
<!-- end head_block --></div>
<div class="clear"></div>
<!-- main nav -->
<?php require_once('includes/main-nav.php'); ?>
<!-- end main nav -->
<div class="bannerImages">
<!-- end bannerImages --></div>
<div class="main">
<div class="left">
<?php require_once('includes/nav-features.php'); ?>
<!-- end main-col1 --></div>
<div class="main-wide">
<h2 align="center" class="special-large-title">Bars in Sheboygan County</h2>
<?php do { ?>
<table class="bar-listings-outer" width="610" border="0" cellspacing="0" cellpadding="5">
<tr><td align="center">
<div id="<?php echo $row_rsBars['tabbed_panels_name']; ?>" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"><b><?php echo $row_rsBars['bar_name']; ?></b></li>
<li class="TabbedPanelsTab" tabindex="1">Menu</li>
<li class="TabbedPanelsTab" tabindex="2">Details</li>
</ul>
<div class="TabbedPanelsContentGroup">
<!-- tab 1 content --><div class="TabbedPanelsContent">
<table class="bar-listings" width="580" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><tr>
<td width="150" align="center"><img src="../images/beer-mug.png" alt="beer mug"></td>
<td width="350"><b><?php echo $row_rsBars['bar_name']; ?></b><br>
<?php echo $row_rsBars['street_address']; ?><br>
<?php echo $row_rsBars['city']; ?>,&nbsp;WI&nbsp;<?php echo $row_rsBars['zip']; ?><br>
<?php echo $row_rsBars['phone']; ?><br>
<a href="http://<?php echo $row_rsBars['website']; ?>" target="_blank"><?php echo $row_rsBars['website']; ?></a><br>
</td>
<td width="80" align="center" valign="top"><a href="http://<?php echo $row_rsBars['facebook']; ?>" target="_blank"><img src="../images/sm-facebook.png" width="25" height="25" alt="Facebook"></a> </td>
</tr></td>
</tr>
</table>
<!-- end tab 1 --></div>
<!-- tab 2 content --><div class="TabbedPanelsContent">
<table class="bar-listings" width="580" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><tr>
<td width="150" align="center"><img src="../images/beer-mug.png" alt="beer mug"></td>
<td width="350"><a href="http://<?php echo $row_rsBars['menu']; ?>" target="_blank"><span class="menu"><?php echo $row_rsBars['bar_name']; ?>&nbsp;Menu</span></a><br>
</td>
</tr>
</table>
<!-- end tab 2 content --></div>
<!-- tab 3 content --><div class="TabbedPanelsContent"><h4 align="left"><?php echo $row_rsBars['bar_name']; ?></h4>
<p align="left"><b><i>HOURS:</i></b> <?php echo $row_rsBars['hours']; ?></p>
<p align="left"><?php echo $row_rsBars['description']; ?></p>
<p align="left"><b>Features:</b><br>
<?php echo $row_rsBars['feature1']; ?><br>
<?php echo $row_rsBars['feature2']; ?><br>
<?php echo $row_rsBars['feature3']; ?><br>
<?php echo $row_rsBars['feature4']; ?></p>
<p align="center"><img src="http://moonshinenetwork.com/photos-bars/<?php echo $row_rsBars['photo1']; ?>" alt="photo taken at <?php echo $row_rsBars['bar_name']; ?>">&nbsp;
<img src="http://moonshinenetwork.com/photos-bars/<?php echo $row_rsBars['photo2']; ?>" alt="photo taken at <?php echo $row_rsBars['bar_name']; ?>">&nbsp;
<img src="http://moonshinenetwork.com/photos-bars/<?php echo $row_rsBars['photo3']; ?>" alt="photo taken at <?php echo $row_rsBars['bar_name']; ?>"></p>
<!-- end tab 3 content --></div>
<!-- end tabbed panels content group --></div>
<!-- end tabbed panels --></div>
</td></tr>
</table>
<?php } while ($row_rsBars = mysql_fetch_assoc($rsBars)); ?>
<?php
mysql_free_result($rsBars);
?>
<table>
<tr>
<td align="center"><h4>Click markers on map to see info about bar.</h4>
<div id="wagmp_map_1" style="width: 600px; height: 450px; border:double; border-radius:5px;"></div></td></tr>
</table>
<!-- end main-col2 --></div>
<div class="clear"></div>
<!-- end main --></div>

<?php require_once('includes/poll-links.php'); ?>
<!-- end #wrapper --></div>
<div class="clear"></div>
<div class="footer100">
<div id="footer">
<?php require_once('includes/footer.php'); ?>
<!-- end #footer --></div>
<!-- end #footer100 --></div>
<!-- end #wrapper100 --></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="js/superfish.js"></script>
<script type="text/javascript" src="js/myscript.js"></script>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
var TabbedPanels3 = new Spry.Widget.TabbedPanels("TabbedPanels3");
var TabbedPanels3 = new Spry.Widget.TabbedPanels("TabbedPanels4");
</script>
<script type="text/javascript" src="webassist/google_javascript/wagmp_maps.js">/*wagmp*/</script>
</body>
</html>

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...