Add custom icons to My Places in Google Maps
How to use your own placemark icons on your customized My Places maps.
By Donald Ritchie
In an earlier tutorial (Getting started with My Places in Google Maps), I showed you how to create your own maps in My Places, and how to populate them with your placemarks and routes. When adding an icon for a placemark, you can choose from around a hundred built-in images. But you can also use your own custom icons if those that are supplied don't meet your needs.
In this tutorial, I'll explain how to do that. The process is reasonably straightforward. The only potential difficulty is that you will need a publicly-accessible web location to host your icons. More on this point in a moment.
Figure 1 shows an example of a map with custom icons.
Figure 1: A My Places map with custom icons.
First, get your icon
When creating an icon for your map, the best advice is to keep is simple. The image will need to be clearly visible, but you don't want it to overwhelm the map. In most cases, a simple image or pictogram, with an 8-bit color depth (that's 256 colors), will be adequate.
The icon can be any size you like. But if it's larger than 64 x 64 pixels, Google Maps will scale it down to that size. The built-in icons are all about 32 pixels high by 20 pixels wide, so if you stick to those dimensions for your own icons, you won't go far wrong.
Ideally, the image should include a "hot spot", that is, a point, cross, arrowhead, or some similar device, that points to the precise spot on the map that the marker is intended to identify. This is less important if you want to mark a wide area, such as a park or a lake. But, in most case, a hot spot will help in clearly flagging the point of interest.
You will, of course, need a tool for creating the icon. I use IconLover from Aha-Soft (Figure 2), but there are many similar products to choose from.
Figure 2: Aha-Soft's IconLover is one of many
tools that can be used to create custom icons.
Whatever method you use for creating the icon, be sure to save it as either a BMP, JPG, GIF or PNG file. My own preference is for GIFs or PNGs. That's partly because icons in these formats are very much smaller than the others, and partly because they both allow the image to have a transparent background. (In the case of BMP files, any pure white areas will also be rendered as transparent.)
As I mentioned earlier, you will need a publicly-accessible web location to host your icons. Ideally, you will use your own website for that purpose. If you don't have a website (or you don't have control over the files that can placed on it), you can use a suitable on-line file hosting service instead. Many such services exist. But be sure that it really is publicly-accessible: services that require a log-in won't work. (You can use Dropbox to host your icons, but only if you place them in a public folder.)
Even if a log-in isn't required, the service might not be suitable. A simple test is to check the URL of the image's file (this is the URL that the service will give you for sharing the image). If the URL ends in the file's extension (GIF, PNG or whatever), that should be fine. If not, paste the URL into the browser's address bar. If you see the image and nothing else, that's a good sign too.
Figure 3: The placemark editor.
But if you see a web page that contains the image alongside some text, navigation or other content, you need to find a way to isolate the image. Here's one possibility. First, go to the URL in Firefox. Then go to the Tools menu and choose Page Info. Click the Media tab, then scroll down the list of images until you see your icon in the Preview box. The address that is highlighted will be the URL of the icon (it should end in GIF, PNG, etc.). Copy this to the clipboard, then double-check it by pasting it into the browser's address bar. If all is well, you should see the image and nothing else.
Add it to the map
Once you have the URL of the relevant image file, you are ready to add the icon to your map. So head over to Google Maps, click the My Places button, open your map, and click the Edit button.
Now, add a placemark to the map in the usual way. When you drop the icon, the normal placemark editor will open (Figure 3). In this window, click the box in the top-right corner (the one that contains an existing placemark icon). This will open a window containing a palette of images, like the one in Figure 4. Click "Add an icon".
You will now be prompted for the icon's URL. This is the one that we discussed earlier - the address of the actual image file, ending in GIF, PNG or whatever. After you have entered this and dismissed the prompt, the icon should be visible on the map.
The next time you want to use the same icon, you won't have to go through the whole of this procedure again. From now on, the icon in question should be present in the icon palette (if necessary, click "My icons" in order to see it). You can re-use the icon as often as you like.
Figure 4: The palette of custom icons.
Things that can go wrong
If you make a mistake when entering the URL, nothing will happen. You won't see an error or warning message of any kind. Google will simply ignore your action. The same will happen if the icon is no longer available for any reason. In these cases, double-check that you have provided the correct URL, and that the image is still present at the hosting site.
When this article was first published, custom icons didn't show up in the printed versions of My Places maps. Google has now fixed this issue. All icons - custom and otherwise - will now appear as expected when you print your map.
More about My Icons
The My Icons pane shows all the icons - custom and otherwise - that you have used in all your maps. You can't directly delete icons from My Icons. But if you no longer wish to use a particular icon, just delete the corresponding placemarks from your maps, or change them to show a different icon. Once your custom icon is no longer present on any of your maps, it will disappear from My Icons.
As I hope this tutorial has shown, adding your own icons to My Places is a great way to personalize your maps and give them a polished, professional look. Give it a try.
First Published: December 2011. Revised: December 2012
Please note: The information given on this site has been carefully checked and is believed to be correct, but no legal liability can be accepted for its use. Do not use code, components or techniques unless you are satisfied that they will work correctly with your sites or applications.