Google Map API v3 with labels / text
I found a solution for placing a label / text on google market. What's in this link http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.8/docs/reference.html
My problem is the markers are being placed in one place. But the label / text on each marker is placed at the correct points. Can anyone help me?
Below is the code inside the jQuery $ .each () function for the loop.
geocoder.geocode( { 'address': address }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var contentString = "sample text";
var infowindow = new google.maps.InfoWindow({
content: contentString;
});
var marker = new MarkerWithLabel({
position: results[0].geometry.location,
map: map,
animation: google.maps.Animation.DROP,
title: address,
labelContent: lblAddress,
labelAnchor: new google.maps.Point(7, 30),
labelClass: "map-labels", // the CSS class for the marker
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map, this);
});
}
The image shown above shows markers from two different points at the same location. I am sure of this because when I click on the "18107 Gold Mesa" shortcut, the infoindustry will open, but the information will be displayed on "3611 Alonzo Fields". There are two markers at this point.
But when I am not using a third party library. The markers are placed at the correct points. using google map method when placing markers.new google.maps.Marker
Thanks Justin
source to share