Change google map marker image

Posted: March 28, 2012 in PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Google Map</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Maps JavaScript API Example</title>
    <script src=";v=2&amp;key=YOUR_KEY&sensor=true"
    <script type="text/javascript">

    function initialize()
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(23.005, 72.5959), 15);
        map.setUIToDefault(); // will add top menu,left menu etc	

		var new_icon = new GIcon();
		new_icon.image = "images/car_blue.png" ; // image path
		new_icon.size = new GSize(16,16) ;
		new_icon.iconAnchor = new GPoint(6, 20);
		new_icon.infoWindowAnchor = new GPoint(5,1)  ;
		var marker = new GMarker(new GLatLng(23.005, 72.5959), new_icon);
  <body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 700px; height: 500px"></div>
  You can check more gmap images from
  <br /><a href="" target="_blank"></a>
  <br /><a href="" target="_blank"></a>


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s