All pastes #886745 Raw Edit

Untitled

public text v1 · immutable
#886745 ·published 2008-01-31 22:01 UTC
rendered paste body
              map = new GMap2(document.getElementById(mapElement));
              map.addControl(new GSmallMapControl());
              map.addControl(new GMapTypeControl());              
              map.setCenter(new GLatLng(el['lat'], el['long']), 15);

              /* Creating the custom icon */
              customIcon = new GIcon(G_DEFAULT_ICON, "/images/jeep.gif");
              customIcon.iconSize = new GSize(32, 18);
              customIcon.iconAnchor = new GPoint(16, 9);

              var point = new GLatLng(el['lat'], el['long']);
              marker = new GMarker(point);
              GEvent.addListener(marker, 'click', function(){
                 marker.openInfoWindowHtml('Marker') ;
              });
              console.log(map); 
              map.addOverlay(marker, {icon : customIcon});