close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Pin Limit? Having problems displaying anything more than 20 - 30 pins.

Thread began 7/11/2011 10:00 am by codamedia | Last modified 7/11/2011 3:55 pm by Jason Byrnes | 1140 views | 7 replies |

codamedia

Pin Limit? Having problems displaying anything more than 20 - 30 pins.

My cache has write permissions, and it is generating fine, but there are occassions where I have many (30 +) pins, and the page will not load, nor will the cache get created.

Here is how I tested it.
1: Delete my "_promaps_geocache.xml" file from the server
2: Test a known result that shows 10 pins. This works great, "_promaps_geocache.xml" is re-created.
3: Test another known result that shows 10 - 20 pins. Works great, "_promaps_geocache.xml" has all the new entries added to it.
4: Try a known result with 30+ records, the map does not display, and nothing is added to the XML page.
5: Delete the XML page and try #4 again. The map does not display, and the cache page is NOT re-created.

For both #4 and #5, the page load is done almost immediately, but again, the map does not render and the cache is not created or added. It is as if Google is refusing to generate anything. Obviously, the cache cannot be created if Google does not respond the first time.

I came across this thread, and wonder if I might be having the same problem.
showthread.php?t=8702

I would love to know why this is happening, and how it can be corrected.

Sign in to reply to this post

Jason ByrnesWebAssist

in 4 and 5 since the page load is done so quickly, I would suspect an error in the results set.

can you send a link where i can see the result of 4 to look into it.

Sign in to reply to this post

codamedia

EDIT: Post removed.

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the page that loads the map please.


when i view source of your page when it displays the map, i can sere the following code:


<script type="text/javascript">
/*wagmp*/
function WAMapRef(mapObj) {
this.obj = mapObj;
this.directions = false;
this.icons = [];
this.markers = [];
this.addresses = [];
this.points = [];
this.getPointByAddress = getPointByAddressFunc;
this.addressFailed = true;
return this;
}

function WAMapPoint(theMarker, theAddress, theIcon) {
this.icon = theIcon;
this.marker = theMarker;
this.address = theAddress;
return this;
}

function getPointByAddressFunc(value,attname) {
if (!attname) attname = "street";
for (var x=0; x < this.addresses.length; x++) {
if (eval("this.addresses[x]."+attname) == value) {
return WAMapPoint(this.markers[x],this.addresses[x],this.icons[x]);
}
}
return false;
}

function getHTTPObject(){
if (window.ActiveXObject)
return new ActiveXObject("Microsoft.XMLHTTP");
else if (window.XMLHttpRequest)
return new XMLHttpRequest();
else {
return null;
}
}

function searchCache(searchStr, zip) {
var xmlDoc = null;
if (window.ActiveXObject) {//IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
} else if(navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) { //webkit (Safari, Chrome)
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", "_promaps_cache/_promaps_geocache.xml", false);
xmlDoc.send(null);
}

return coordinates;
} else if (document.implementation.createDocument) {//gecko (Mozilla, Firefox, Opera)
xmlDoc=document.implementation.createDocument("","",null);
} else {
return '';
}
if (xmlDoc != null) {
xmlDoc.async=false;
try {
if(xmlDoc.load("_promaps_cache/_promaps_geocache.xml")) {
var x=xmlDoc.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) {
return x[i].getElementsByTagName("geocode")[0].childNodes[0].nodeValue;
}
}
}
}
catch(err) {
return '';
}
}
return '';
}

function addToCache(fullAddress,zip, geocode){
httpObject = getHTTPObject();
if (httpObject != null) {
httpObject.open("POST", "google_javascript/promaps_geocache_php.php", true);
httpObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var entryId = fullAddress.replace(/,/g, '');
if (zip != '') {
fullAddress = fullAddress.replace(zip+',', '');
}
entryId = escape(entryId);
fullAddress = escape(fullAddress);
geocode = escape(geocode);
httpObject.send("sender=promapsforgoogle&action=add&entryId="+entryId+"&address="
+fullAddress+"&geocode="+geocode);
}
}


function wagmp_map_1() {
if(GBrowserIsCompatible()) {
if(!document.getElementById('wagmp_map_1')) return false;
var map = new GMap2(document.getElementById('wagmp_map_1'));
wagmp_map_1_obj = new WAMapRef(map);
map.enableContinuousZoom();
map.enableDoubleClickZoom();
map.addControl(new GSmallZoomControl());
map.addControl(new GMapTypeControl());
var geocoder = new GClientGeocoder();

var fromAddress = {
enabled: false,
street: '',
city: '',
state: '',
zip: '',
country: '',
full: ''
};

var icon_0 = new GIcon();
icon_0.image = 'google_javascript/images/traditionalflat_pacifica.png';
icon_0.shadow = 'google_javascript/images/traditionalflat_shadow.png';
icon_0.iconSize = new GSize(34,35);
icon_0.shadowSize = new GSize(34,35);
icon_0.iconAnchor = new GPoint(9,33);
icon_0.infoWindowAnchor = new GPoint(19,0);
icon_0.printImage = 'google_javascript/images/traditionalflat_pacifica.gif';
icon_0.mozPrintImage = 'google_javascript/images/traditionalflat_pacifica_mozprint.png';
icon_0.printShadow = 'google_javascript/images/traditionalflat_shadow.gif';
icon_0.transparent = 'google_javascript/images/traditionalflat_pacifica_transparent.png';


etc...


}
}</script>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAzdubZVAMycelfiiPTYpVFBQPFfY7zKGhKSBgg4Uk6CKe9Mc3hhSAtsG1lpEwuqfqQ_TTP-avu9iPMQ">/*wagmp*/</script>

<div id="wagmp_map_1" style="width: 700px; height: 500px;"></div>




when it does not display the map all i see is:

<div id="wagmp_map_1" style="width: 700px; height: 500px;"></div>



there seams to be code in place preventing the map js from being built up in certain circumstances.

Sign in to reply to this post

codamedia

The only difference on the two pages is the number of results. It's just one page, and the session value of the city is what populates the database.

Out of curiosity, how do I send you any files? I don't want them to be publically available (it is not my site to share).

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

codamedia

Jason,

Thanks for your help on this. I actually have figured it out.

This map page is included on the main page with web assist "framework builder" and it's a buffer issue. If I simply create a stand alone map page it works fine.

Thanks for the help.

Sign in to reply to this post

Jason ByrnesWebAssist

ok, glad to hear it is working.

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...