• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Google Maps: How to use default labelled markers?

lozina

Lifer
I have a page which allows the user to enter an address to verify their location.

Sometimes, the address is ambiguous and the geocoding results in multiple possible locations.

In this situation I want to display all the alternatives on the map like Google Maps does with their very basic standard A, B, C red pushpin type labels. And then the user can pick which one is the right one.

But the only default marker I can find is the red pushpin with a little black dot in the middle, not the ones labelled with letters.

Does anyone know how I can use those labeled ones?

 
if you supply the address exactly it should automatically center and label "A" with a baloon popup,

You can create a really long link with directions and each marker. I once mapped my running route in a loop from A to D.
 
function createMarker(point, text, letter, id) {
// Create a lettered icon for this point using our icon class
var letteredIcon = new GIcon(baseIcon);
letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";

// Set up our GMarkerOptions object
markerOptions = { icon:letteredIcon };
var marker = new GMarker(point, markerOptions);

GEvent.addListener(marker, "click", function() {
clicked(id);
marker.openInfoWindowHtml(text);
});
return marker;
}


It's not all neccessary, but it gives you the url of the markers.
 
Back
Top