Did you read the posting guide lines?
Have you seen the documentation?

http://code.google.com/apis/maps/documentation/javascript/v2/overlays.html#Custom_Icons




On Jul 24, 11:25 am, Fabrizio <[email protected]> wrote:
> Can any one tell me what and were i need to add to the below code to
> have a custom GMarker (house_icon.png) icon in place of the standard
> GMarker ?
> I try to search in the precedent post but if i just add this:
>
> var icon = new GIcon();
> icon.image = "house_icon.png";
> icon.shadow = "house_icon_shadow.png";
> icon.iconSize = new GSize(50, 50);
> icon.shadowSize = new GSize(50, 50);
> icon.iconAnchor = new GPoint(7, 7);
> icon.infoWindowAnchor = new GPoint(12,2);
>
> It not work :(
>
> Thank you in advance for your help.
>
> My gmaps code:
>
>     <title>Google Maps JavaScript API Example: Simple Map</title>
>                 <script src="http://maps.google.com/maps?
> file=api&amp;v=2&amp;key=ABQIAAAAuXCsgtFbun9VDKmTtofpsRT1j4YpvHOHiC5kQPc9yCF7N4lTLBSI53SaDUC21NIY0fFfohMMCuCkvA"
> type="text/javascript"></script>
>     <script type="text/javascript">
>
>     function initialize() {
>       if (GBrowserIsCompatible()) {
>         var map = new GMap2(document.getElementById("map_canvas"));
>                 map.addMapType(G_PHYSICAL_MAP) ;
>                 map.addControl(new GSmallZoomControl());
>         map.setCenter(new GLatLng(40.122781,9.13968),
> 4,G_PHYSICAL_MAP);
>                 map.addOverlay(new GMarker(new GLatLng(40.122781,9.13968)));
>
>       }
>     }
>
>     </script>
>   </head>
>   <body onload="initialize()" onunload="GUnload()">
>     <div id="map_canvas" style="width: 300px; height: 130px"></div>
>   </body>
> </html>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to