[jQuery] jquery google map namespace conflict?
I am toying with this plugin
http://www.mayzes.org/
googlemaps.jquery.html#examples
and have found what I think is a
namespace conflict
I am by no means expert and I could be wrong...
Here is how to see it.
I am using Google api loader thus:
<script src="http://www.google.com/jsapi?key=mykey"></script>
<script type="text/javascript" charset="utf-8">
google.load
"maps", "2"
;
google.load
"jquery", "1"
;
</script>
I have some code that was working previously that used loader and was
doing an address lookup using the Geocoder object, like this:
function showAddress
address
{
geocoder = new google.maps.ClientGeocoder
;
if
geocoder
{
geocoder.getLatLng
address,
function
point
{
if
!point
{
alert
address
" not found"
;
} else {
alert
'point--'
point
;
}
}
;
}
}
This worked great. What I am now trying to do is use the plugin to
handle the map update and display. I have a reference to the plugin
and can instantiate it. I know this 'cause I have an alert near the
top of the plugin like so:
jQuery.fn.googleMaps = function
options
{
if
!window.GBrowserIsCompatible
!GBrowserIsCompatible
alert
'is compat'
;
...
The issue seems to be that if I leave "google.load
"maps", "2"
;" the
plugin will not load and I will not get my "is compat" alert. If I
comment out "// google.load
"maps", "2"
;" then I get the "is compat"
message but I cannot perform my reverse lookup.
Any insight that anyone can provide on overcoming this conflict would
be appreciated. I have spent the last several hours scouring the web
to see if this is a common jquery / google maps issue and cannot seem
to find any other complaints.
TIA.