close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Number of markers that display is not consistant

Thread began 11/06/2009 10:15 am by office125319 | Last modified 11/09/2009 8:16 am by office125319 | 3221 views | 8 replies |

office125319

Number of markers that display is not consistant

Hi,

I have a web page, atac-membership-search-results.asp, that displays member office locations in a Google Pro Map. Try searching for Yorkshire, West members and you will see the recordset that displays the list of members displays 12 members in the list. The map uses a seperate recordset generated from the same data source via a stored procedure. The map markers sometime appear as 12 and sometimes 11 and sometimes 10 in number. I have tried inserting the code "rsMap_cmd.ActiveConnection.cursorLocation = 3 " in to the map recordet code as suggested in another thread on the forum ( see below ) but this doesn't resolve the problem!

<%
Dim rsMap
Dim rsMap_cmd
Dim rsMap_numRows

Set rsMap_cmd = Server.CreateObject ("ADODB.Command")
rsMap_cmd.ActiveConnection = MM_ConnARCAD_STRING
rsMap_cmd.ActiveConnection.cursorLocation = 3
rsMap_cmd.CommandText = "EXEC uspFindATaCMembersMap ?"
rsMap_cmd.Prepared = true
rsMap_cmd.Parameters.Append rsMap_cmd.CreateParameter("param1", 200, 1, 50, rsMap__MMColParam) ' adVarChar
Set rsMap = rsMap_cmd.Execute
rsMap_numRows = 0
%>

I understand there is an XML cache file used by Pro Maps to help speed up the map display and that this can cause problems. Can this cache file by turned off? Also where do you find the cache file to delete it?

If someone could kindly point me in the right direction to get this reseolved I would be most grateful.

Thanks
David

Sign in to reply to this post

Jimmy Wu

I've loaded the map several times and I always get the same result. Is there any consistency to which results are left out for you?

The Cache file will be in the _promaps_cache directory. There isn't an option to turn off caching however.

Sign in to reply to this post

office125319

Markers

Jimmy, thanks for your reply. Have you used the search menu to view the map for "Yorkshire, West" members? If you have then have you seen 12 markers each time you refresh this page. I will get anything ranging from 9 - 12. I don't get 12 each time which is the issue I am trying to resolve. Could you kindly take another look and let me know if you can see the issue I have described and possible fixes. Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

Most likely the problem is that the cache file isn't working properly. The cache file fixed the problem where maps with more than 10 data points could stop working because of too many geocache calls. I think you actually need to figure out how to get the cache file working and not how to disable it.

Were you not able to find it? My bet is that it can't create it because of permissions. I'd create the cache file in the proper location manually so that it can start working. I'll bet that will fix the issue.

Sign in to reply to this post
Did this help? Tips are appreciated...

office125319

Markers

Thanks Ray for your advice. However, when you say "create the cache file in the proper location manually so that it can start working" could you kindly let me have some detailed instructions on how to do this. Cheers!

Sign in to reply to this post

office125319

Markers

Hi Guys,

I really need a full and proper answer from you to this issue of markers not displaying, because at the moment it is not working reliably. If you know your MAP EXTENSION doesn't work reliably then appreciate knowing this as I can spend my time trying to source a solution with Google. If, as I hope, it does work reliably then I really need a detailed TO DO LIST from you on what needs checking and what needs changing to ensure that the right number of markers display consistently.

Just to recap. If you go to www.atac.org.uk and use the Find A Member search form for say "Yorkshire, West" you will see 12 members listed in the left column and on the Google Map you will see anything from 9 - 12 markers for these same members.

I have just ran a test by searching for "Glamorgan" - 5 out 6 markers show ; "Essex" - 10 out of 13 arkers show ; "Yorkshire, West" - 10 out of 12 markers show ; Yorkshire, South" - 6 out 6 markers show. If I run this test again I would get slightly different results. Clearly there is something going on which is a not working 100% reliably.

The search web page that displays the results uses the same database table and strored procedure to retrieve the data for both the list and the map. I have executed the map stored procedure on the server with a variety of input parameters and it works perfectly, i.e. retrurns the correct number of records. The problem then is not with the recordset or stored procedure. I have pasted below the ASP code that shows the 2 stored procedure in the search results page below.

The only other file used is your asp include file. I have pasted the code for this below as well.

I would be most grateful if you could provide me with a detailed set of instruction on resolving this problem. ATAC are a very important client of mine I need this working 100%.

I look forward to hearing from you soon and appreciate your help.

SOURCE CODE FOR SEARCH RESULTS WEB PAGE

<%
Dim rsMap__MMColParam
rsMap__MMColParam = "Surrey"
If (Request.Form("County") <> "") Then
rsMap__MMColParam = Request.Form("County")
End If
%>
<%
Dim rsMap
Dim rsMap_cmd
Dim rsMap_numRows

Set rsMap_cmd = Server.CreateObject ("ADODB.Command")
rsMap_cmd.ActiveConnection = MM_ConnARCAD_STRING
rsMap_cmd.CommandText = "EXEC uspFindATaCMembersMap ?"
rsMap_cmd.Prepared = true
rsMap_cmd.Parameters.Append rsMap_cmd.CreateParameter("param1", 200, 1, 50, rsMap__MMColParam) ' adVarChar
Set rsMap = rsMap_cmd.Execute
rsMap_numRows = 0
%>
<%
Dim rsMembers__MMColParam
rsMembers__MMColParam = "Surrey"
If (Request.Form("County") <> "") Then
rsMembers__MMColParam = Request.Form("County")
End If
%>
<%
Dim rsMembers
Dim rsMembers_cmd
Dim rsMembers_numRows

Set rsMembers_cmd = Server.CreateObject ("ADODB.Command")
rsMembers_cmd.ActiveConnection = MM_ConnARCAD_STRING
rsMembers_cmd.CommandText = "EXEC uspFindATaCMembers ?"
rsMembers_cmd.Prepared = true
rsMembers_cmd.Parameters.Append rsMembers_cmd.CreateParameter("param1", 200, 1, 50, rsMembers__MMColParam) ' adVarChar

Set rsMembers = rsMembers_cmd.Execute
rsMembers_numRows = 0
%>
<%
Dim RepeatMembers__numRows
Dim RepeatMembers__index

RepeatMembers__numRows = -1
RepeatMembers__index = 0
rsMembers_numRows = rsMembers_numRows + RepeatMembers__numRows
%>

SOURCE CODE FOR ASP INCLUDE FILE

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

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

var icon_0 = new GIcon();
icon_0.image = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.png';
icon_0.shadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.png';
icon_0.iconSize = new GSize(34,35);
icon_0.shadowSize = new GSize(34,35);
icon_0.iconAnchor = new GPoint(9,23);
icon_0.infoWindowAnchor = new GPoint(19,0);
icon_0.printImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.gif';
icon_0.mozPrintImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_mozprint.png';
icon_0.printShadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.gif';
icon_0.transparent = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_transparent.png';

<%
Dim rsMap_repeat_index
rsMap_repeat_index = 0
While (NOT rsMap.EOF)
%>
var address_0_<%=CStr(rsMap_repeat_index)%> = {
street: '',
city: '',
state: '',
zip: '',
country: '',
infowindow: 'custom',
infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><%=Replace(Cstr("<strong>" & cStr((rsMap.Fields.Item("CompanyName").Value)) & "</strong><br><br />" & cStr((rsMap.Fields.Item("OfficeAddress1").Value)) & "<br>" & cStr((rsMap.Fields.Item("PostCodeTown").Value)) & " " & cStr((rsMap.Fields.Item("PostCode").Value)) & ""), "'", "\'")%></span>',
full: '<%=Replace(Cstr("" & cStr((rsMap.Fields.Item("Lat").Value)) & ""), "'", "\'")%>,<%=Replace(Cstr("" & cStr((rsMap.Fields.Item("Long").Value)) & ""), "'", "\'")%>',
isdefault: true,
addressType: 'coordinates',
loop: 'rsMap',
latitude: '<%=Replace(Cstr("" & cStr((rsMap.Fields.Item("Lat").Value)) & ""), "'", "\'")%>',
longitude: '<%=Replace(Cstr("" & cStr((rsMap.Fields.Item("Long").Value)) & ""), "'", "\'")%>',
markerStyle: 'Google Traditional (flat)',
markerColor: 'Pacifica'
};

geocoder.getLatLng (
address_0_<%=CStr(rsMap_repeat_index)%>.full,
function(point) {
if(point) {
var marker = new GMarker(point, icon_0);
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(address_0_<%=CStr(rsMap_repeat_index)%>.infowindowtext);
});
if(!fromAddress.enabled || 'address_0_<%=CStr(rsMap_repeat_index)%>' != 'address_0_0') {
map.setCenter(point, 9);
map.addOverlay(marker);
}
}
else {
map.setCenter(point, 9);
map.addOverlay(marker);
}
}
);
<%
rsMap_repeat_index = rsMap_repeat_index + 1
rsMap.MoveNext()
Wend
%>

}
}

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you may be using an older version of Google maps without the cache file.

What version do you have installed? I don't see any reference to the cache file, which I believe will be the solution to this problem.

Sign in to reply to this post
Did this help? Tips are appreciated...

office125319

Markers

Thanks Ray,

You are right, I am using version 1.0.0. I will download the latest version and see what happens.

Sign in to reply to this post

office125319

Markers

Just to let you know that the latest version 1.0.6 resolved all the problems!! Thanks for pointing me in the right direction.

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