How to add a custom marker icon on gmap using the gmap module? I want to add a custom marker to the list of markers on the gmap module 
I tried the following link which is as described below :http://mydrupaltricks.be/article/drupal-7-custom-gmap-markers  but it did not worked

&lt;?php
$markerdir = variable_get('gmap_markerfiles', drupal_get_path('module', 'gmap') . '/markers');
?&gt;


By setting the "gmap_markerfiles" variable, we can change the location of our new markers folder. We have to set this variable only once so we put the code in our "my_module.install" file.

&lt;?php
/**
* Implements hook_install().
*/
function my_module_install() {
  variable_set("gmap_markerfiles", drupal_get_path("module", "my_module_name") . "/markers");
}
?&gt;
Now we can create the new "markers" folder in our new module. Gmap expects a .ini file to describe all your markers. We add the file "markers/my_module.ini".
; Defaults
[defaults]
; Note: An empty shadow property will break IE.
; Leave it commented out if you aren't supplying an image.
; shadow = ""
anchorX = 15
anchorY = 17
infoX = 17
infoY = 6

; Marker sets

[drupal]
name = "drupal"
sequence = "marker-green.png"

[salepoint]
name = "salepoint"
sequence = "marker-green.png"

[headquarter]
name = "headquarter"
sequence = "marker-green.png"

[shop]
name = "shop"
sequence = "marker-yellow.png"
You do not really need to write your own module (unless it does something out of the box) in order to use custom markers.

Here is an guide how you can do that (I assume we use gmap module and views module to display google map.


Upload you custom markers to Drupal website, f.x. to your theme folder (i.e. /sites/all/themes/yourtheme/images/markers or another location that suit you more.
In that folder you need to create an INI file and declare your custom markers (give them name etc). See example with 1 custom marker below.

Go to gmap settings /admin/config/services/gmap and specify folder where you saved your marker image and ini file (see image below).

Now make sure you saved everything and cleared cache.
Go to your view and in the settings you must get your custom marker available (at the bottom).