Custom Pushpin’s Offset in Virtual Earth

johnWeeGo.jpgA little trick for when you add your custom Pushpin in Virtual Earth, if you need to modify the postion of the pin slighty to line up the point of pin or centre of crosshair with the correct pixel you must set a “iconstyle” and do it in css.


//set an iconStyle when adding the pin in js
var x = new VEPushpin(id, location, icon_url, title,
       details, iconStyle, titleStyle, detailsStyle);

/*The css class for the pushpin, use left and top to adjust offset*/
.MyPushpinStyle {position:absolute;left:0px;top:-20px;}