Add a letter (A,B,C, etc) to a Google Map Marker

Posted on 2010-11-16
Last Modified: 2012-05-10
How can I use a STANDARD Google Map Marker & cause a different letter (A, B, C, etc.) to be superimposed on the marker?

Is it possible to use the "standard" marker & change it's color?

My code is in the code window.

Thank you.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


<html xmlns="">


	<title>Test Geocoding Appts</title>

<style type="text/css">






.maintable td




	.pt18 {font-size: 18pt; font-family: Arial}

	.pt14 {font-size: 14pt; font-family: Arial}	

	.pt12 {font-size: 12pt; font-family: Arial}

	.pt11 {font-size: 11pt; font-family: Arial}

	.pt10 {font-size: 10pt; font-family: Arial}

	.pt8  {font-size: 8pt; font-family: Arial}

	.pt9  {font-size: 9pt; font-family: Arial}	

	.pt7  {font-size: 7pt; font-family: Arial}


<script src=";v=2.x&amp;key=ABQIAAAAH82qcpE-n4Sa6uJ45nihgxQmxjvj1xUHQRzNiSXUnkhbPQTbbxTo2fquIiNtppisdZ_VE_i29EBvWA" type="text/javascript"></script>

<script language="JavaScript">	


	var URL = unescape(location.href);

addrs = new Array();

	addrs[0] = "1356 N Crestline, Wichita, KS";

	addrs[1] = "1424 S Maize Rd, Wichita, KS";

	addrs[2] = "11415 Taft, Wichita, KS";

	addrs[3] = "9221 Suncrest, Wichita, KS";

	addrs[4] = "1837 Valley View, Wichita, KS";

	addrs[5] = "330 Kennedy, Wichita, KS";

	addrs[6] = "14915 Valley Hi Cir., Wichita, KS";

	addrs[7] = "12561 Hardtner, Wichita, KS";

	addrs[8] = "102 N Wood, Wichita, KS";

	addrs[9] = "2926 W Columbine, Wichita, KS";

	addrs[10] = "856 Country Acres, Wichita, KS";

	addrs[11] = "P O Box 75511, Wichita, KS";

	addrs[12] = "3529 S. Hiram, Wichita, KS";

	addrs[13] = "11004 W Binter, Wichita, KS";

	addrs[14] = "8210 W Aberdeen, Wichita, KS";

	addrs[15] = "5801 W 41st Cr S, Wichita, KS";

	addrs[16] = "1841 N. Valleyview, Wichita, KS";

	addrs[17] = "3026 N Topaz, Wichita, KS";

	addrs[18] = "543 Fawnwood Ct, Wichita, KS";

	addrs[19] = "1319 Covington Cir, Wichita, KS";

	addrs[20] = "221 N. Parkdale, Wichita, KS";

	addrs[21] = "503 N Wheatland Pl, Wichita, KS";

	addrs[22] = "4232 W Central, Wichita, KS";

 	var map = null; 

    var geocoder = null;

    var bounds = new GLatLngBounds(); 

    var geocoder;

    var currentAddress;

    function initialize() {

      if (GBrowserIsCompatible()) { 

        map = new GMap2(document.getElementById("map"), 100); 

        map.addControl(new GSmallMapControl()); 

        map.addControl(new GMapTypeControl()); 

        map.setCenter(new GLatLng(37.665, -97.327), 13); 

        geocoder = new GClientGeocoder(); 


        geocoder.getLocations(addrs[0], addMarkerToMap);

        currentAddress = 0;





    function addMarkerToMap(response){


        // Retrieve the latitude and longitude


            place = response.Placemark[0];      

            point = new GLatLng(place.Point.coordinates[1],



            //show larger view

            if(currentAddress == 0) map.setCenter(point, 9);

            //extend bound



            //add to map



            document.getElementById('mapProcInfo').innerHTML = 'Error while geocoding. Address is invalid!'



        //if we got more address call this function again



            geocoder.getLocations(addrs[currentAddress], addMarkerToMap);

            document.getElementById('mapProcInfo').innerHTML = 'Processing markeres. Please wait: ' + (currentAddress+1) + '/' + addrs.length;


            //hide info and zoom map to markers

            document.getElementById('mapProcInfo').innerHTML = '';




    function showAddrSngl(address) {

      if (geocoder) {



          function(point) {

            if (!point) {

              alert(address + " not found");

            } else {

              map.setCenter(point, 13);

              var marker = new GMarker(point);








        function showAddress(address,number) { 

            if (geocoder) { 


                   function(point) { 

                        if (!point) { 

                                alert(address+" not found"); 

                        } else { 

                             if(number==0) { 



                             var marker = createMarker(point,address); 







        }//end of function showAddress 


        function createMarker(point,address) { 

           var marker = new GMarker(point); 

           GEvent.addListener(marker, "click", 

                function() { 



           return marker; 

        }//end of function createMarker  			

// -->



<body onload="initialize()" onunload="GUnload()">

<div class="pt14"><b>Appointments on a map for 11/16/10</b></div><br>

		<table class="maintable">



                    <div id="mapProcInfo"></div>

                    <div id="map" style="width: 650px; height: 450px"></div>






Open in new window

Question by:Richard Korts
LVL 13

Accepted Solution

Molnar István earned 500 total points
ID: 34153549

to create a custom marker with wizard and generate code: (selecting label marker from types you can add a label text)

to create a custom marker from image:

here are the iconpacks from google:,_in_10_Colors

hope i understand correctly your question

Author Closing Comment

by:Richard Korts
ID: 34154867
That helps, I had already figured it out, appreciate the response.

Stay tuned for likely more Google Maps API Questions.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL and Geo based Data 2 689
Recenter map after form is resubmitted 6 84
Viper alarm on silent 3 101
Multiple points on Google Maps 16 101
I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now