All pastes #886750 Raw Edit

Untitled

public text v1 · immutable
#886750 ·published 2008-01-31 22:09 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("http://webapp.traqr.com/images/car.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,{icon : customIcon});
              GEvent.addListener(marker, 'click', function(){
                 marker.openInfoWindowHtml('Marker') ;
              });
              console.log(map); 
              map.addOverlay(marker);