Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marioestrada committed May 26, 2011
1 parent 002013d commit f933a41
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions jquery.gmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@

if(content)
{
if(content == '_latlng')
content = latitude + ', ' + longitude;

var infowindow = new google.maps.InfoWindow({
content: opts.html_prepend + content + opts.html_append
});

google.maps.event.addListener(gmarker, 'click', function()
{
last_infowindow.close();
Expand Down Expand Up @@ -183,7 +187,7 @@
{
// Check for reference to the marker's address
if (marker.html == '_address')
marker.html = opts.html_prepend + marker.address + opts.html_prepend;
marker.html = marker.address;

// Get the point for given address
$geocoder.geocode({
Expand All @@ -194,17 +198,13 @@
// Create marker
if(gresult.length > 0)
{
$(this).trigger('gMap.addMarker', [marker.html, gresult[0].geometry.location.latitude, gresult[0].geometry.location.longitude, gmarker[j]]);
$(this).trigger('gMap.addMarker', [gresult[0].geometry.location.latitude, gresult[0].geometry.location.longitude, marker.html, gmarker[j]]);
}
};
})(j)
);
}else{
// Check for reference to the marker's latitude/longitude
if (marker.html == '_latlng')
marker.html = opts.html_prepend + marker.latitude + ', ' + marker.longitude + opts.html_append;

$(this).trigger('gMap.addMarker', [marker.html, marker.latitude, marker.longitude, gmarker[j]]);
$(this).trigger('gMap.addMarker', [marker.latitude, marker.longitude, marker.html, gmarker[j]]);
}
}
});
Expand All @@ -229,7 +229,7 @@
iconsize: [20, 34],
shadowsize: [37, 34],
iconanchor: [9, 34],
shadowanchor: [19, 34]
shadowanchor: [6, 34]
}
}

Expand Down

0 comments on commit f933a41

Please sign in to comment.