View Full Version : Any way to remove the location info "bubble"?
Nathon Jones
06-05-2009, 06:03 AM
Is there any way to remove the location info bubble from the map?
I just want to have a flagged point on the map as I have the location info alongside the map plus I don't really like the way the bubble covers the map.
I've had a look at this line in the wagmp_map_1.asp file:
var address_0 = {
street: '',
city: '',
state: '',
zip: '',
country: '',
infowindow: 'custom',
infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;">Bubble Text Here</span>',
full: '<%=Replace(Cstr("" & cStr((rsEVENT.Fields.Item("googlelatitude").Value)) & ""), "'", "\'")%>,<%=Replace(Cstr("" & cStr((rsEVENT.Fields.Item("googlelongitude").Value)) & ""), "'", "\'")%>'
Can I edit a setting here that would prevent the bubble from displaying? Thanks.
Nathon.
Nathon Jones
06-05-2009, 06:08 AM
I've removed the following line from the wagmp_map_1.asp file:
icon_0.infoWindowAnchor = new GPoint(8,3);
...and that seems to have done the trick. Removing that line won't cause any problems, will it?
Thanks.
Nathon
Ray Borduin
06-05-2009, 07:57 AM
I would just comment the lines that have .openInfoWindow instead of that line.
Nathon Jones
06-05-2009, 08:13 AM
How do I comment out a line? Sorry, I know I should know that but it's not something I ever really do. Thanks Ray.
Ray Borduin
06-05-2009, 08:14 AM
add two slashes in front of it: //
Nathon Jones
06-05-2009, 08:34 AM
Even if it's an ASP page?
Any occurences I have in wagmp_map_1.asp, of .openInfoWindow are prefixed with "marker_0". Does that matter?
Ray Borduin
06-05-2009, 08:40 AM
I am talking about the client side javascript code. The server language doesn't matter.
Nathon Jones
07-30-2009, 09:01 AM
.openInfoWindow appears six times in my wagmp file. I've commented them all out, by adding the two forward slashes at the start of that line, but I'm now getting "error on page"?
I'm not sure if it's important but they're .openInfoWindowHtml not .openInfoWindow. Does that matter?
Here are the six lines that have that code (now commented out):
Line 184:
// marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
Line 191:
// marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
Line 212:
// marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
Line 219:
// marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
Line 235:
// marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
Line 242:
// marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
Any idea's why this is now producing the error?
Thanks.
Regards
Nathon
Ray Borduin
07-30-2009, 09:15 AM
that looks right.
Do you have a url where I can view it?
If you remove the comments you don't get an error any more?
Nathon Jones
07-30-2009, 09:38 AM
Here's a page with that on, without the comments:
http://www.tmsa.org.uk/DRAFT/scottish-music-event.asp?e=935&b=1
...and yes, you're right, I no longer get the error.
Did you want me to re-write IN those errors so you can take a look?
Ray Borduin
07-30-2009, 09:54 AM
It might not have liked having the empty function declaration.
GEvent.addListener(marker_0_0, 'click', function() {
marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);
});
would become:
GEvent.addListener(marker_0_0, 'click', function() {
// marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);
});
instead comment out the line before and after it as well like:
// GEvent.addListener(marker_0_0, 'click', function() {
// marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);
// });
and comment just the one line before in the second example:
// if('address_0_0' == 'address_0_0')
// marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);
Nathon Jones
07-31-2009, 06:06 AM
Hi Ray,
I changed those six lines and added the extra comments but am now receiving this error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Fri, 31 Jul 2009 11:08:01 UTC
Message: Syntax error
Line: 266
Char: 11
Code: 0
URI: http://www.tmsa.org.uk/DRAFT/scottish-music-event.asp?e=935
Message: Object doesn't support this property or method
Line: 6
Char: 24
Code: 0
URI: http://www.tmsa.org.uk/DRAFT/google_javascript/wagmp_maps.js
This has got me as confused as hell now!
Regards
Nathon
Ray Borduin
07-31-2009, 06:28 AM
It looks like I had you comment out too many lines in the second section.
Since the IF line didn't end with "{"
I shouldn't have had you comment the line after with "}"
that might have been the problem.
Nathon Jones
07-31-2009, 09:47 AM
Hi Ray,
I've changed the code to the following:
// GEvent.addListener(marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>, 'click', function() {
// marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
// });
if(!fromAddress.enabled || 'address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>' != 'address_0_0') {
if('address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>' == 'address_0_0')
map.setCenter(point, 13);
map.addOverlay(marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>);
// if('address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>' == 'address_0_0')
marker_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.openInfoWindowHtml(address_0_<%=CStr(rsEVENT_2_0_repeat_index)%>.infowindowtext);
...but the bubble still remains. Is the above wrong? I'm totally confused now!
Perhaps it's just not possible to hide the bubble?
Nathon.
Nathon Jones
08-03-2009, 03:10 AM
I haven't changed anything and, yet, today I'm now receiving this error again:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Mon, 3 Aug 2009 10:07:59 UTC
Message: 'x' is null or not an object
Line: 1360
Char: 71
Code: 0
URI: http://maps.gstatic.com/intl/en_ALL/mapfiles/159e/maps2.api/main.js
Does anyone know what this error is? I've been wrestling with Pro Maps for Google for almost 10 days now and I feel like I'm getting nowhere!
Regards
Nathon
Ray Borduin
08-06-2009, 01:20 PM
Many people have hidden the info window successfully. I now get a recordset error when viewing the page, so it appears you may be in the middle of something else.
It could be a permissions problem. Our extension creates a cache file with the geocoded results to prevent a limitation in the number of data points, and if the file is not created properly because of permissions it may cause other errors. Can you find the cache xml file and see if it is being created and populated? That might be the issue.
Having a url where I could view the problem would help me debug it.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.