DMXzone Google Maps Support Product Page

Answered

mysql integration

Asked 07 Jul 2011 22:39:29
1
has this question
07 Jul 2011 22:39:29 Ron Bigus posted:
Hello,
I am trying to use data from a mysql database to populate the map but I keep getting an error without a map being generated. The Error is:
Webpage error details
Message: 'b.markers[...].latitude' is null or not an object
Line: 12
Char: 198
Code: 0
URI: www.flpropsearch.com/ScriptLibrary/jquery.gmap.min.js


The url to the page is www.flpropsearch.com/Gmaps2.php

As you can see I have echoed the addresses retrieved to make sure they are valid. Hopefully you can point out my problem.

Thanks

Official Answer

Replied 25 Jul 2011 08:34:29
Hello Ron,

Yes - the extension uses dynamic data. There is a limitation, provided by Google for using more than 10 markers added as addresses.
If you need to use it with more 10 markers, just use coordinates /lat, lon/

Replies

Replied 08 Jul 2011 18:47:34
08 Jul 2011 18:47:34 Ron Bigus replied:
Here is the actual code used since viewing source doesn't give the whole picture.

<?php require_once('Connections/mls1.php'); ?>
<?php
$zip_code="32407";
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $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;
}
}

$maxRows_Recordset1 = 25;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
  $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_mls1, $mls1);
$query_Recordset1 = "SELECT mls_res.MLS_ACCT, mls_res.BATHS_FULL, mls_res.BEDROOMS, mls_res.STREET_NUM, mls_res.STREET_NAME, mls_res.SUBDIVISION, mls_res.UNIT_NUM, mls_res.LIST_PRICE, mls_res.ZIP, mls_res.COMMUNITY, mls_res.CITY_CODE, mls_res.GEO_PRECISION FROM mls_res WHERE mls_res.ZIP='$zip_code' ORDER BY mls_res.LIST_PRICE";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $mls1) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
  $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
  $all_Recordset1 = mysql_query($query_Recordset1);
  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?><!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>Untitled Document</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.gmap.min.js"></script>
</head>

<body><?php
  do { ?>
  <?php echo $row_Recordset1['STREET_NUM']; ?>&nbsp;<?php echo $row_Recordset1['STREET_NAME']; ?>&nbsp;<?php echo $row_Recordset1['CITY_CODE']; ?>&nbsp;FL&nbsp;<?php echo $row_Recordset1['ZIP']; ?><br />
  <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>
<div class="dmxGoogleMaps" id="map1" style="width:600px;height:400px;">
</div>
<script type="text/javascript">
  // <![CDATA[
 jQuery(document).ready(
   function()
     {
       jQuery("#map1").gMap(
         {width:600, height:400,  zoom:14, markers:[<?php
  do { ?>
 {address:{sstr:"<?php echo $row_Recordset1['STREET_NUM']; ?>&nbsp;<?php echo $row_Recordset1['STREET_NAME']; ?>&nbsp;<?php echo $row_Recordset1['CITY_CODE']; ?>&nbsp;FL&nbsp;<?php echo $row_Recordset1['ZIP']; ?>", estr:{}}} <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>,]}
       );
     }
 );
  // ]]>
</script>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
Replied 09 Jul 2011 19:25:52
09 Jul 2011 19:25:52 Ron Bigus replied:
Please process a refund of my Payment for your Google Maps.

I have hand coded the info to create a map and it works fine, the only other explaination is that your extension can't handle the addresses sent to them, it MUST be geocoded before submission. This of course is impractical for a dynamic data site where the retrieved addresses change on a daily basis.

Thanks
Replied 13 Jul 2011 10:20:42
13 Jul 2011 10:20:42 Teodor Kuduschiev replied:
Hello Ron,

For Using DMXzone Google Maps with many records please check this article: www.dmxzone.com/go?18850
Replied 15 Jul 2011 21:42:58
15 Jul 2011 21:42:58 Ron Bigus replied:
Well, thanks for the info, after Purchase and a week after first asking for help thru email.

This way of creating the markers just isn't practical for my application. In Real Estate databases supplied thru our MLS, lat & long isn't supplied and it would take a full time employee to do it as you suggest.

Once Again since the extension doesn't live up to the email and product description about Easily allow users to see dynamic maps I would Again request a refund... I would have liked to do this privately...but no one answers the support Emails.
Replied 18 Jul 2011 09:02:58
18 Jul 2011 09:02:58 Miroslav Zografski replied:
Hello Ron,

This is not an extension problem and it is a limitation applied by the provider of the service - Google. The video was available for your review prior to your purchase.

Replied 20 Jul 2011 18:58:18
20 Jul 2011 18:58:18 Ron Bigus replied:
Gee...Isn't that what everyone does...Read the Manual and watch all the video Tutorials before making a purchase.

Get real..the implied usability was to be able to use dynamic data....not massaged data...but dynamic...meaning ever changing.

If you are not Honerable enough to stand behind your Product for a past Customer then My CC company will be notified.

Replied 25 Jul 2011 08:34:29
25 Jul 2011 08:34:29 Teodor Kuduschiev replied:
Hello Ron,

Yes - the extension uses dynamic data. There is a limitation, provided by Google for using more than 10 markers added as addresses.
If you need to use it with more 10 markers, just use coordinates /lat, lon/

Reply to this topic